Le 27/10/2014 à 07:59, Shane Stanley <email@hidden> a écrit :
On 27 Oct 2014, at 12:06 pm, Shane Stanley <
email@hidden> wrote:
You can download v1.0.2 of ASObjCExtras.framework here: <http://www.macosxautomation.com/applescript/apps/ASObjCExtras.html>.
Blink and you missed it.
I've decided to pull the clicking command. I suspect Robert's problem is a Script Editor bug, although it's impossible to be sure unless he posts the log. But there's a bigger issue: it doesn't seem to work when run from an applet. I don't really know why -- it's more or less the same code that seems to work fine in ASObjC Runner -- but I'm afraid GUI-related stuff tries my patience. A command that works only sometimes is worse than none at all.
As for the Script Editor bug... it looks like it's not always recognizing enums loaded from frameworks. Every other app I've tried does, and the enums work fine in an applet saved from SE, but it refuses to recognize them when you hit the Run button. Bummer.
--
Shane Stanley <
email@hidden>
<
www.macosxautomation.com/applescript/apps/>
Hello Shane
Here is the events log which I got after running :
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "ASObjCExtras"
activate application "Finder"
tell application "System Events" to tell process "Finder"
tell window 1
set buttonPos to position of button 2
end tell
end tell
current application's SMSFord's clickAt:buttonPos clickType:(current application's SMSClickOnce) keysDown:(current application's SMSPressOptionKey)
Now the Events log :
tell application "Finder"
activate
end tell
tell application "System Events"
get position of button 2 of window 1 of process "Finder"
Résultat :
error "unable to set argument 3 - the AppleScript value <NSAppleEventDescriptor: 'obj '{ 'form':'usrp', 'want':'prop', 'seld':'utxt'(\"SMSClickOnce\"), 'from':null() }> could not be coerced to type q." number -10000
As always, I ran the system in french.
Yvan KOENIG (VALLAURIS, France) lundi 27 octobre 2014 10:36:15