Bug: Mac AppleScript change text returns replacement except last character
Search ("find what") and replace ("change to") does not return the expected results when replacing text. It truncates the replacement by one character.
Steps to reproduce
1. Create a new InDesign file (see attached test.indd)
2. Create a text box
3. Add text in the text box including the word "test"
4. Run the following script (see attached) test.scpt
5. Expected the return results to be "foo" but it returns "fo"
tell application "Adobe InDesign CC 2019"
set find text preferences to nothing
set change text preferences to nothing
set properties of find text preferences to {find what:"test"}
set properties of change text preferences to {change to:"foo"}
tell document 1
set _r to change text
return _r's first item as string
end tell
end tell
Environment
ProductName: Mac OS X
ProductVersion: 10.13.6 (High Sierra)
BuildVersion: 17G65
Adobe InDesign 14.0.1
AppleScript 2.7
Script Editor 2.10 (194)
Hello All,
Thank you for reporting the issue to us.
We have fixed the issue in the latest version of InDesign, Id 15.0
Please upgrade your InDesign application to the latest version to try out the fix.
If you face any problems with the new update, do let us know in the comments.
You may also follow the below given link for the list of all fixed issues in Id 15.0
https://helpx.adobe.com/indesign/kb/fixed-issues.html
-InDesign Team
-
medium_jon commented
Does this fix extend to JavaScript versions too? The same bug existed in CC 2019 of Adobe InDesign. CC 2018 did into have it.
-
Shawn Pyle commented
Search ("find what") and replace ("change to") does not return the expected results when replacing text. It truncates the replacement by one character.