I have a compiled Applescript Studio app that uses the ‘keystroke’ command from System Events in quite a few instances. Do users of the compiled app also need this Apple GUI Scripting installed and configured on their machines to use the app?
Yes.
I’m assuming so also but we need to know for sure before we start to advertise and distribute our app.
On my machine, I still have the older System Events.app v1.1.1, along with the new System Events.app v1.2
cd /System/Library/CoreServices/System Events 1.1.1.app/Contents/Resources/ ; ls -al
cd /System/Library/CoreServices/System Events.app/Contents/Resources/;ls -al
That will put you inside the package for both app’s, respectively. Once there, you’ll find the file named “Processes.scriptTerminology” in both packages. Compare them in BBEdit. or any Text Editor, and you’ll see why AppleScripts using System Events v1.2 will not work on System’s that are running System Events v1.1.X, or earlier.
The easiest way to test it would be if you had another Hard Drive, or another partition with Mac OS X installed without the GUI beta.
It’s possible that you can make the same observation by opening the dictionary of each version of System Events.
I generally keep or create a new (virgin) user for the purpose of testing and troubleshooting.
– Rob
Since the keystrokes invoked target text views within the app itself, we’ll probably recode using other methods. Using this one was quick and easy, as fast as psuedocode. The change shouldn’t be too difficult.
Is there a quick way (other than using ‘keystroke’ and the ascii of the arrow keys) to set the offset of the active insertion point from the end of the contents of a text view?
I don’t know the answer to this but if you don’t get an answer here, you might want to ask on the AppleScript Studio forum (I think that some BBS participants don’t check all forums).
– Rob