Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Issues writing Applescript loop...

Hi,


I am new to using AppleScript and was googling how to use Applescript to open a Terminal session and connect to a remote box using SSH.


This was successful in a single instance, using the script:

tell application "Terminal"


activate

do script "ssh root@10.10.51.1"


-- // write some linux commands to remote server

end tell


Then saving it as an application.


As this now works, the issue I have is that I have a list of box's that I need to connect to on a regular basis (i've just moved from a Windows machine where I used putty) and need to create Applescripts, for each one.


I am having trouble in finding out how to use this list (currently a numbers spreadsheet) to create some kind of loop, to create individual files, for each one.


I was thinking about converting it to a csv file and the creating a script that uses the column headers:

IP address

Number

Name

Location


Opens script editor, enters the same script as before, replaces the IP address, saves the script, using the naming convention Number-Name and then putting them into subfolders for each location. However as I said earlier, as I'm new to scripting in AppleScript, I'm finding it hard to trall through all the tutorials and forums for assistance.


Can anyone offer any advice?

iMac, Mac OS X (10.7.1), null

Posted on Mar 3, 2015 2:15 PM

Reply

There are no replies.

Issues writing Applescript loop...

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.