Simple Safari Applescript needed

Discussion in 'Mac Apps and Mac App Store' started by blodwyn, Apr 19, 2005.

  1. blodwyn macrumors 65816

    Joined:
    Jul 28, 2004
    Location:
    Portland, Oregon
    #1
    I could really use an Applescript that reloads the current page in Safari every 60 seconds.

    Background is that I will have a browser window open to our company's support page which displays new support requests. I just need a way of auto-refreshing the page every 60 seconds so I can see if any new requests have come in. I figure an Applescript could do the job, but any other suggestions welcome.

    Thanks in advance for any help with the script
     
  2. jackieonasses macrumors 6502a

    jackieonasses

    Joined:
    Mar 3, 2004
    Location:
    the great OKLAHOMA....
    #2
    Just train a monkey to type Apple-R everytime a stopwatch beeps!


    kidding. You could wait for automator on Tiger..

    that is the easy way out (in a couple of weeks)

    kyle
     
  3. blodwyn thread starter macrumors 65816

    Joined:
    Jul 28, 2004
    Location:
    Portland, Oregon
    #3
    Not sure if I want the upkeep of a monkey, but I've pre-ordered Tiger so I could wait. It sounds like it should be a simple script, so if anyone can post one, that would be great.
     
  4. jackieonasses macrumors 6502a

    jackieonasses

    Joined:
    Mar 3, 2004
    Location:
    the great OKLAHOMA....
    #4
    I know it can be done.. and easily. I just don't know Applescript at all...


    I know hexmonkey can help you.. if no one gives an answer pm him.

    kyle
     
  5. James Philp macrumors 65816

    James Philp

    Joined:
    Mar 5, 2005
    Location:
    Oxford/London
    #5
    tell safari.app
    reload page=http:xxxxxxx.xxxxx.xxxx
    end tell
    Wait 60
    Repeat


    No, not really! Sorry! But it will be something like that! I tried looking up the safari scripts dictionary, but I can't find anything!

    Try looking in your AppleScript>Examples folder for inspiration!
    Try googling also like "safari scripts"
     
  6. jackieonasses macrumors 6502a

    jackieonasses

    Joined:
    Mar 3, 2004
    Location:
    the great OKLAHOMA....
  7. Doctor Q Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #7
    This is my attempt.

    Code:
    tell application "Safari"
    	activate
    	repeat while true
    		do JavaScript "history.go(0)" in document 1
    		delay 60
    	end repeat
    end tell
     
  8. blodwyn thread starter macrumors 65816

    Joined:
    Jul 28, 2004
    Location:
    Portland, Oregon
    #8
    Thanks to Jackieonassis and Doctor Q, both suggested scripts work great.

    Much appreciated
     

Share This Page