set dialNumber to "{query}"
try
tell application "Safari"
activate
tell window 1
try
set current tab to tab "AirDroid Web | Manage your phone on web"
on error e
try
set current tab to tab "AirDroid"
on error e
set the clipboard to e as text
end try
end try
end tell
delay 2
say "here"
tell application "System Events"
tell process "Safari"
click at {1014, 106}
delay 1
say "here2"
click at {752, 397}
keystroke dialNumber
delay 1
click at {796, 635}
end tell
end tell
end tell
end try
I have set this osascript as my phone action.
I can hear "here1" and "here2" but no clicking is done. The same script run fine when run from Script Editor.app.