osx - Apple Script Error: Can't continue click -


i'm trying open messaging application (it not have apple script dictionary (command + shift + o)), click on text, , type text box, , hit send.

pop up: script error - telegram got error: can't continue click after application becomes active.

result tab: error "telegram got error: can’t continue click." number -1708

p.s., messaging application telegram.

apple script:

tell application "telegram"     activate     delay 1     click on text "chat name"     keystroke "some text"          //assuming works because text box first responder when chat opens.     click on text "send" end tell 

if application lacks applescript dictionary, command except standard commands launch, activate, open, reopen , quit throw error.

the solution gui scripting: built-in application system events bridge send mouse clicks , keyboard events target application.

i don't know application telegram @ all, code might fail, might starting point

activate application "telegram" tell application "system events"   tell process "telegram"     tell window 1       keystroke "some text"            click button "send"     end tell   end tell end tell 

Comments

Popular posts from this blog

php - Admin SDK -- get information about the group -

dns - How To Use Custom Nameserver On Free Cloudflare? -

Python Error - TypeError: input expected at most 1 arguments, got 3 -