Ok I have added open application “Scans” and it does open and run but here is what I get. Scans got an error: Can’t continue open. So my script stops right there.
Could someone tell me what I am doing wrong here.
set urlBase to "http://mybnt.net/rsmove.php?engage=1&destination="
set urlpage to "http://mybnt.net/main.php"
set delayURL to 5
display dialog "Enter the beginning and end sectors to get." default answer "" buttons {"Cancel", "OK"} default button 2
copy the result as list to {text_returned, button_pressed}
set {firstNum, secondNum} to stripNumbers(text_returned)
repeat with i from firstNum to secondNum
set theURL to urlBase & i
open location theURL
delay 1
open location urlpage
delay delayURL
open application "Scans"
tell application "Safari"
close window 1
end tell
end repeat
(*========= SUBROUTINES ==========*)
on stripNumbers(theText)
set text item delimiters to "sector"
set b to text items of theText
set text item delimiters to ""
set c to b as text
set text item delimiters to "to"
set b to text items of c
set text item delimiters to ""
set c to b as text
set text item delimiters to ""
return words of c
end stripNumbers
As far as I can see the Automator app does what it should. It opens and goes to mybnt.net/main.php and then it gets the text from that page and then put it in text edit for me.
And because Main.php updates as I go from one sector to the other so ever time it opens a new link for me I need the Applescript to run this Automator app for me so that I have a log of everything for me.
Any help here will help.
Thanks for your time.
Model: iBook G4 1.02 GHz 512 MB of RAM
AppleScript: Version 2.2 (2.2) AppleScript 2.0
Browser: Safari 3.1 (5525.9)
Operating System: Mac OS X (10.5)