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

Help with apple script and automator

Im trying to use an automator action to name a file via telnet. As you can see I can't seem to use the variable "recordingname" in the telnet command, the files end up being called recording name, vs the correct name that corresponds to the variable. Im pretty sure the rest of the script works fine as I've used it before just not within the telnet command.


User uploaded file



# Date

on zeroPad(theNumber)

set theString to ""

if theNumber is less than 10 then set theString to "0"

set theString to theString & theNumber

return theString

end zeroPad


-- In the format YearMonthDayHourMinSec YYMMDDhhmm

set theDate to do shell script "date +%Y-%m%d"

-- the result

-- "121017232332"


set theNextOrCurrentEvent to (do shell script "/usr/local/bin/icalbuddy -ic \"h264RecordingNames\" -eep \"*\" -nc -b \"\" -n -li 1 eventsToday")


# Rename the file that contains the keyword

set myDesktop to ("Macintosh HD:Users:cfproduction:Desktop:")



set recordingname to theDate & "_" & theNextOrCurrentEvent


tell application "Terminal"


activate

set currentTab to do script ("telnet 10.10.50.140 9993;

remote: enable: true

record: name: {recordingname}

quit")


end tell

Posted on Apr 30, 2016 2:26 PM

Reply
1 reply

Help with apple script and automator

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