Will AppleScript do this?

Discussion in 'Mac Basics and Help' started by ClarkeB, Apr 30, 2006.

  1. ClarkeB macrumors 6502

    ClarkeB

    Joined:
    Jan 24, 2005
    #1
    My uncle is a lawyer and he's arguing in some court that has a webcast. My grandmother wants to see the feed desperately and will be the only one at home when it is on. Is there anyway I can use applescript (the main computer in my house only has Panther) so that the link (which I have put on the desktop) will open at a certain time and just go?

    Thank you!
     
  2. mjstew33 macrumors 601

    mjstew33

    Joined:
    May 29, 2005
    Location:
    Illinois
    #2
    Not sure, but you could do this:

    You could set the home page to the link that you want, tell her that all you have to do is press this button and it'll launch to it at whatever time.

    just an idea. :eek:
     
  3. ClarkeB thread starter macrumors 6502

    ClarkeB

    Joined:
    Jan 24, 2005
    #3
    Oh, wow...I never thought of that! thank you so much
     
  4. mkaake macrumors 65816

    Joined:
    Apr 10, 2003
    Location:
    mi
    #4
    drag the link to the desktop, so that double clicking opens the URL. then you can open up ical, and set up a new event, and make the alarm (set to 0 minutes before) opening that file. then it'll open at whatever time you set up.
     
  5. motulist macrumors 68040

    motulist

    Joined:
    Dec 2, 2003
    #5
    Or if you wanted to do it the way you originally described then you could just set up an ical event that launches the file that is a bookmark to that page. Or you could write a simple html page that uses 2 frames and the refresh tag so she could just double click the html file you wrote and it would load that page you want and then it would continually reload at whatever interval you specify. There are lots of ways you could do it depending on exactly what you want to achieve. Think outside the 6 sided polyhedron.
     
  6. Unorthodox macrumors 65816

    Unorthodox

    Joined:
    Mar 3, 2006
    Location:
    Not at the beach...
    #6
    Yes sir you can.

    Copy past this text into "Script Editor":

    tell application "Safari"
    repeat
    activate
    open location "
    URL of website. must be full URL and include http://"
    delay
    put the amount of minutes you want to go by before refreshing multiplied by 60 here
    end repeat
    end tell


    Now go to File>save as, give it a name, make sure to save it as an Application, deselect the "Run Only", Startup Screen" and "Stay Open" check boxes. Hit save.
    Navigate to the place where you saved it and double click it.
    Safari will now open the specified web-page and refresh at the specified interval!

    Unfortunately Im not a very good scripter, so unless you put a number after "repeat" (example: repeat 5) it will keep repeating into infinity.
    The only way to stop the beast is to use the command, option esc and force quit it......
     
  7. SC68Cal macrumors 68000

    Joined:
    Feb 23, 2006
    #7
    There is a functionality for running system events according to date, I saw it used for an applescript to back up your files.

    EDIT: the basic setup for your applescript to hande dates is as follows,

    Code:
    global todaysDate
    global today
    set todaysDate to current date
    set today to time of todaysDate as string
    return today
    
    From there, just use that variable to handle whatever it is you want to do

    I'm trying to figure out why it's giving me a strange number for today, for example it returns "8675" instead of 2:24 AM....
     

Share This Page