Help on getting a certain script

Discussion in 'Mac Programming' started by Snorremans, Nov 12, 2010.

  1. macrumors newbie

    Joined:
    Nov 12, 2010
    #1
    I currently have an applescript which does the following

    open ''Enter site here''
    Delay 2
    Repeat

    It is a script where I can refresh my page every 2 seconds.
    Now I want to add something to it. If a shortcut to a certain link appears on the page, I want my script to open it immediately. Does anyone know how I work this out in programming language?
     
  2. macrumors regular

    Joined:
    Jun 25, 2007
    Location:
    Houston, TX
    #2
    I don't know how one would do it in applescript, but I can outline the sequence of steps you'll probably need to take.
    1. Download the target html file into a local file (example 1, example 2, example 3)
    2. Search the contents of the file for the link you are expecting (example 1, example 2)
    3. If found, open new url in safari, otherwise return to step 1
     

Share This Page