PDA

View Full Version : Help on getting a certain script




Snorremans
Nov 12, 2010, 07:52 PM
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?



MasConejos
Nov 13, 2010, 07:37 AM
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.

Download the target html file into a local file (example 1 (http://lists.apple.com/archives/AppleScript-Users/2007/Mar/msg00024.html), example 2 (http://forums.mozillazine.org/viewtopic.php?f=12&t=1424775), example 3 (http://forums.macrumors.com/showthread.php?t=256413))
Search the contents of the file for the link you are expecting (example 1 (http://macscripter.net/viewtopic.php?id=24656), example 2 (http://www.mactech.com/articles/mactech/Vol.21/21.07/WorkingWithText/index.html))
If found, open new url in safari, otherwise return to step 1