Re: click at under Mavericks
Re: click at under Mavericks
- Subject: Re: click at under Mavericks
- From: Axel Luttgens <email@hidden>
- Date: Fri, 03 Jan 2014 13:58:52 +0100
Le 2 janv. 2014 à 18:04, koenig.yvan a écrit :
> [...]
>
> I decided to test under 10.8.5.
> When the instruction was in the block tell first window (1), it issued an error missing value
> When it was out of the block (2), it worked flawlessly.
Hello Yvan,
I guess this was more or less to be expected, as "click at" seems to be intended to be sent to an application process.
As a result, the problematic piece of your description could be summarized as:
tell application "TextEdit" to activate
tell application "System Events"
tell application process "TextEdit"
keystroke "p" using {command down}
delay 1
set {x, y} to position of first menu button of sheet 1 of window 1
click at {x, y}
--> 10.8: the local menu "PDF" is displayed
--> 10.9: error "Can't make {xxx, yyy} into type list"
end tell
end tell
Interestingly, this variant works fine in both environments:
tell application "TextEdit" to activate
tell application "System Events"
tell application process "TextEdit"
keystroke "p" using {command down}
delay 1
click at position of first menu button of sheet 1 of window 1
--> 10.8: the local menu "PDF" is displayed
--> 10.9: the local menu "PDF" is displayed
end tell
end tell
The problem thus seems to be related to the occurrence of an AppleScript list of integers as the "at" argument for the "click" command:
tell application "System Events"
tell application process "TextEdit"
click at {200, 200}
--> 10.8: text area 1 of scroll area 1 of...
--> 10.9: error "Can't make {xxx, yyy} into type list"
end tell
end tell
even if such a list is liable to be correctly interpreted in other contexts, for example:
tell application "System Events"
tell application process "TextEdit"
set position of front window to {200, 200}
--> 10.8: TextEdit's window is moved
--> 10.9: TextEdit's window is moved
end tell
end tell
> [...]
>
> Would be fine to know if you get the same behavior on your machines.
Yes. ;-)
I would be tempted to agree with Christopher: there's a bug with System Events' "click at" command under Mavericks.
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden