Results 1 to 6 of 6

Thread: applescript

  1. #1


    Member Since
    Nov 26, 2009
    Posts
    64
    applescript
    So this morning I saw my sister play a game on her computer. I, kinda naively, told her i could automate the actions she did. The basic idea is that I want safari to click on 5 locations with some time interval. Here is what I wrote;

    repeat 10 times
    delay 2
    tell application "System Events"
    tell application process "Safari"
    delay 2
    click (click at {683, 378})
    delay 2
    click (click at {683, 378})
    delay 2
    click (click at {683, 378})
    delay 2
    click (click at {515, 489})
    delay 2
    click (click at {665, 417})
    end tell
    end tell
    end repeat

    however when I run it; I get no errors but nothing happens within safari.

    Anyone can help me on this?

    tnx

  2. #2


    Member Since
    Nov 26, 2009
    Posts
    64
    added: text scpt (mac-forums doesn't allow me to add the actual script)
    Attached Files Attached Files

  3. #3


    Member Since
    Nov 26, 2009
    Posts
    64
    This is what I get when I run it;

    tell application "System Events"
    click application process "Safari" at {683, 378}
    --> missing value
    click missing value
    click application process "Safari" at {683, 378}
    --> missing value
    click missing value
    click application process "Safari" at {683, 378}
    --> missing value
    click missing value
    click application process "Safari" at {515, 489}
    --> missing value
    click missing value
    click application process "Safari" at {665, 417}
    --> missing value
    click missing value
    Result:
    error "User canceled." number -128

  4. #4

    McYukon's Avatar
    Member Since
    May 14, 2009
    Location
    Near Whitehorse, Yukon
    Posts
    2,052
    Specs:
    2012 MBP i7 2.7 GHz 15" Matte - 16 GB RAM - 120 GB Intel SSD - 500 GB DataDoubler Mac OS 10.9
    Works fine here, have you enabled "Enable access for assistive devices" in System Preferences>Universal Access ?
    Also there are some items in webpages that somehow mess up automated clicking and stops it from working, be it Applescript or Automators "watch me do" action
    Use the reputation system if a post helps you!
    Mac Forums IRC Channel - Help build it by hanging out with us
    The next sentence is true. The previous sentence is false.

  5. #5


    Member Since
    Dec 14, 2010
    Posts
    4
    Hi i know this is oldish but i have written a similar script except using runescape. I can get up until logging in but once I hit "play" it says missing value. same with minecraft. Everything up until I hit singleplayer. These buttons are both ingame. I have "Enable access for assistve decices" turned on.. any help?

  6. #6

    McYukon's Avatar
    Member Since
    May 14, 2009
    Location
    Near Whitehorse, Yukon
    Posts
    2,052
    Specs:
    2012 MBP i7 2.7 GHz 15" Matte - 16 GB RAM - 120 GB Intel SSD - 500 GB DataDoubler Mac OS 10.9
    Yeah, both Runescape and Minecraft use java, and Applescript doesn't seem to have been made compatible with Java at all.
    I'm afraid that your pretty much at a dead end here, since there are plenty of people out there with the same problem and no fix.
    Use the reputation system if a post helps you!
    Mac Forums IRC Channel - Help build it by hanging out with us
    The next sentence is true. The previous sentence is false.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Applescript
    By EdMarx in forum OS X - Apps and Games
    Replies: 0
    Last Post: 02-10-2012, 04:06 AM
  2. Applescript
    By SgtDave in forum OS X - Development and Darwin
    Replies: 6
    Last Post: 01-19-2011, 03:50 PM
  3. Applescript help please?
    By thtguyjosh in forum OS X - Apps and Games
    Replies: 8
    Last Post: 08-22-2010, 07:22 PM
  4. Applescript
    By nixonbw in forum OS X - Operating System
    Replies: 0
    Last Post: 07-17-2008, 07:00 PM
  5. AppleScript
    By TehHero in forum OS X - Apps and Games
    Replies: 0
    Last Post: 01-26-2008, 09:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •