Skip to main content
Mohsen Alyafei
Participant
July 12, 2019
Question

Disappearing script

  • July 12, 2019
  • 1 reply
  • 1210 views

After entering a Custom Keystroke Script in the edit box, the script works but it disappears from the edit box when revisiting the format properties.

It is also not shown in the "Edit All Scripts" lists of scripts.

Even after saving the file and opening it again, the script is gone but still works.

Using Acrobat Pro DC 2019.012.20035

Note: There is no Custom Format Script; only a Custom Keystroke Script.

How can I view the Custom Keystroke Script again and update it?

Thanks

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
July 12, 2019

This happens when you include specific strings that the application thinks are a part of an internal code that is used for the built-in Keystroke commands. It then attempts to display the matching option in the GUI and hides the code. I think it should still be available via Edit All JavaScripts, though...

If you didn't use an undocumented JS method then you can overcome this issue by making sure your code doesn't contain the string "AF".

Mohsen Alyafei
Participant
July 13, 2019

Thank you try67.

Here is the sccript.

if(!event.willCommit){ 

num=AFMergeChange(event);

num=NumToWordsInt(num);

this.getField("Output").value=num;

}

It updates the output box with converted number.

try67
Community Expert
Community Expert
July 13, 2019

The use of the AFMergeChange function is what's causing it to happen.