Help with terminal

cookieme

macrumors regular
Original poster
Aug 22, 2005
156
1
I'd like to know if I can speed up the following process using the terminal and if someone could explain the necessary commands. I connect to a remote mac using Apple Remote Desktop and then I open safari on the remote mac, copy and past rapidshare links one by one and download. I really don't need the GUI for this, so can I login using the terminal locally and once I'm connected to the remote mac download the files?

Hope it makes sense. Thanks.
 

asdasd616

macrumors newbie
Jul 30, 2007
28
0
An easy way is to create a file.scpt and add

tell application "Safari"
make new document at end of documents
set url of document 1 to "http://URL"
end tell

replacing URL with the address, then type 'osascript file.scpt' into Terminal.
I'm not sure how to add more then one address to file.scpt though.
 

cookieme

macrumors regular
Original poster
Aug 22, 2005
156
1
Thanks for the suggestion, but I was thinking more of logging into the other mac remotely via the terminal and then executing some command to begin download each file. I guess I would start by using SSH to get access to the mac and then whatever command is needed to start downloading. I don't know unix, so no idea how to do this.
 

asdasd616

macrumors newbie
Jul 30, 2007
28
0
I did the same thing a couple of weeks ago.

create file.scpt in TextEdit, pust Cmd+Shift+T, add contents.

In terminal 'scp file.scpt user@remote-address:~/'
to copy the file to the remote computer.

'ssh user@remote-address'
to login to remote computer.

On the remote computer type 'osascript file.scpt'
which is an applescript to launch safari and open that address.

To add more than one address to file.scpt

tell application "Safari"
make new document at end of documents
set url of document 1 to "http://URL"
delay 10
set url of document 1 to "http://URL2"
end tell
 

Similar threads

Register on MacRumors! This sidebar will go away, and you'll see fewer ads.