PDA

View Full Version : Simple Automator/AppleScript Help




bu88
Apr 6, 2009, 03:52 PM
So what i'm trying to accomplish is ask the user for the location of some files.
Then take the paths of those, and store the "path" as a variable
Then start up terminal and put have it enter some text, varible, more text, variable. Then click enter.

I have MOST of this done. I'm doing the terminal work with AppleScript:

tell application "Terminal"
activate
end tell
tell application "System Events"
keystroke "some stuff" var 1 "more stuff" var 2 "even more stuff"
keystroke return
end tell

I really just need help with the whole, asking the user to browse for a file, then take the path that they specify, put it as a variable, then do the thing that i have in the terminal.

I think the easiest way would be to put it as an automator program. But if that is incorrect then i would need further assistance with doing it in applescript.

I've tried doing it in Automator with "Ask for finder items" and "get finder items" but i just am not getting how to call variables in applescripts that i defined automator, especially having the variable be a file path...