1

This is the script I've found on the web I'm trying to just have the script drop items for me by pressing 1, but it works only for a little while before script comes up with an error "error "System Events got an error: Connection is invalid." number -609"

I use this script

delay 3  
tell application "RuneScape" to activate  
repeat  
    delay 5  
    set mydate to current date  
    repeat while ((current date) - mydate < 1)  
        tell application "System Events" to keystroke (key code 83)  
    end repeat  
end repeat  
  • How many times are you expecting it to press the key? Once? Every 5 seconds? As fast as it can until tomorrow? – Tetsujin Dec 28 '14 at 8:42
  • Well I really only want it to click a couple of times every 5 seconds – Eugene Dec 28 '14 at 10:25
1

For a double-click every 5 seconds, until you quit the script, try just

delay 3  
tell application "RuneScape" to activate  
repeat  
    delay 5  
    tell application "System Events"  
        keystroke (key code 83)  
        keystroke (key code 83)  
    end tell  
end repeat  
  • foe some reason when I try this it only wants to type 1 in the comments section it does not want to press 1 in my action bar. It seems to only work when I put the date section in there? – Eugene Dec 28 '14 at 20:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .