PDA

View Full Version : Simple Applescript for seti


War_Hawk
01-30-2002, 01:59 PM
Hey guyes after pulling out all my hair today and yesterday i finally created a simple Apple Script that will launch the command line version of seti automatically here's what i did (bare in mind that i'm not a big time programer, suggestions are welcome) paste the following into "Apple Script editor" application

property c : 0
tell application "Terminal"
do script with command "/Users/usernam/setiathome & && exit"
repeat 500000 times
c = c + 1
end repeat
quit
end tell


Ok let me explain what the script does. it lanuches the "Termnal"app and runs seti and it issues an exit command. I found out that with every "do sript with command" another terminal window will open. so thats why i added the "exit" command with the seti launch. Now i couldn't figure out how to pause or tell the script to wait. so i did it the cheaters way. i had the script do a little loop. The reason i added the loop is My dual 800 G4 is too fast. i had to give the script a chance to caught up. Next make sure that the path is correct to your seti command line app. Now save the script as a application. Next in OS X i went in System Prefs>Login>Login Items and i added my app to the login apps. So now every time you login the seti command line app launches without you doing a single thing. Again, i'm not a programer, if someone has suggestion to clean this up let me know.

--WH
(Update :better version below keep scrolling)

rusto
01-30-2002, 02:12 PM
Thanks for the script, I'll give it a try after I solve this problem:

SETI CLI runs great but doesn't seem to able to access the server to upload results...just keeps "trying again after an hour"...lost a whole day of crunching while it just sat there.

I'm assuming the powerpc-apple-darwin1.2 download is the proper one to use for CLI in OS X.

I've got a B&W G3/350 running 10.1.2, any help would be appreciated!

mervTormel
01-30-2002, 02:26 PM
War_Hawk,

to find dictionaries of applescript commands:

in script editor, select menu File->Open Dictionary...

is scans for dicts and a file selection dialog box opens, scroll and select scripting additions.

in there is a command called delay

delay: Pause for a fixed amount of time
delay integer -- the number of seconds to delay

War_Hawk
01-30-2002, 03:11 PM
mervTormel,
Thxs! I knew there was an easier way. I did try looking for the Dictionaries in OS X but it didn't allow me :-(.

rusto,
Yes it is commandline version for dawin.

OK everyone thx to mervTormel here's the seti script v1.2 LOL

tell application "Terminal"
do script with command "/Users/staffier/setiathome & && exit"
delay 3
end tell

tell application "Terminal"
quit
end tell

(that looks alot cleaner) :-)

--WH