Purnima Sethi
Purnima Sethi

Reputation: 1

script is not allowed to send keystorke

Applescript is not allowing to send keystrokes is my error

my script is

set texttowrite to "[ep] t [ef] t [ed] t [ed] [ts] [ed] t [ed]"
tell application "Roblox" to activate
tell application "System Events"
    repeat with i from 1 to count characters of texttowrite
        keystroke (character i of texttowrite) 
        delay 0.08
    end repeat
end tell

keystroke (character i of texttowrite) part is not working

Upvotes: -2

Views: 1169

Answers (1)

Robert Kniazidis
Robert Kniazidis

Reputation: 1878

  1. Go System Preferences --> Security & Privacy --> Accessibility.
  2. Find application "yourScriptAppName" in the list of applications enabled to control your computer.
  3. Set its checkbox.

If yourScriptAppName is not in list at all, then add it using button "+" of the Accessibility window.

Now, you can send keystrokes to Roblox.app any time.

Upvotes: 0

Related Questions