Re: Clicking the mouse?
Re: Clicking the mouse?
- Subject: Re: Clicking the mouse?
- From: Deivy Petrescu via AppleScript-Users <email@hidden>
- Date: Sat, 9 Nov 2019 20:23:07 -0500
> On Nov 9, 2019, at 18:48 , @lbutlr via AppleScript-Users
> <email@hidden> wrote:
>
> I have the following script:
>
> tell application "System Events"
> keystroke "2" using {control down}
> tell application "Battle.net" to activate
> delay 1.5
> click at {260, 1360}
> end tell
>
> I thought this would click on the large “Play” button in the Battle.net app,
> but the click action does nothing. I’ve veyfied the portion on the screen,
> and the location is just about dead-center on the button (which is quite
> large).
>
> The app is open, the delay is to account for the screen switching.
>
> When I run the script in Script Editor, Script editor returns
>
> group 1 of scroll area 1 of application process "Finder" of application
> "System Events”
>
> If I change the {} to ()s I get:
>
> window "Blizzard Battle.net" of application process "Battle.net" of
> application "System Events”
>
> But in neither case is the button clicked.
>
>
> --
> I don't have a solution but I admire the problem.
>
Try:
tell application "System Events"
keystroke "2" using {control down}
set frontmost of process "Battle.net" to true
delay 1.5
click at {260, 1360}
end tell
Battle.net is inside a System Events tell bloc.
Deivy Petrescu
email@hidden
_______________________________________________
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