On Aug 21, 2015, at 20:31, Stockly, Ed < email@hidden> wrote: That worked, but now I'm getting this error from the script:
display alert "This script must be run from the main thread." buttons {"Cancel"} as critical
Both SD and SE, both with no other windows or scripts open
______________________________________________________________________
Hey Ed,
C'mon. We have Google. :)
I had the same issue earlier today.
Google to the rescue — search:
AppleScript "main thread"
First hit:
Search for "main thread" in Safari.
Found.
“AppleScript Editor is now more responsive while running a script, and can run several scripts simultaneously. Previous versions would let you start running a second script, but the first one would pause until the second one finished. It does this by running scripts on background threads. If this causes trouble, typically because a third-party scripting addition has claimed to be thread-safe but isn’t, you can force the script to run on the main thread by holding the Control key and selecting the Run command, which will show as “Run in Foreground” in the menu.”
That took about 30 seconds of effort, although I admit I wasted about 10 seconds thinking about asking on the list before turning to Google.
I too am finding learning ASObjC to be difficult, but I will persevere — because it adds so much power to AppleScript.
Now you have a hook that interests you exploit it.
For me that's regular expressions. I use them all the time and know how they work — figuring out how to make them work in ASObjC will let me do all kinds of things for users who won't use the Satimage.osax — and I'll be able to create turnkey solutions for them — instead of having to say "If you'll only install the Satimage.osax...".
That of course does NOT mean I'll stop using either the Satimage.osax or Smile any time soon. ;-)
-- Take Care, Chris
|