I have an Applescript pgm that let’s the user select a file. I place the filename in a string variable named “Ifile”. I have a Bash shell program the will strip out all the bad characters in a name. How can I pass the Applescript variable sting contents in “Ifile” to bash a variable “wifile” in my shell script.
set wfile to choose file
set Ifile to POSIX path of wfile
set inforec to info for wfile
set cfile to “load script doit”
set Ifile to do shell script (“echo” > “& wifile &”)
display dialog Ifile
tell application “Terminal”
activate
do script “doit”
end tell
Model: Dual 2.5 GHz G5 - 4.5 GB DDR SDRAM
AppleScript: 1.10 Script Editor 2.1 (80)
Browser: Safari 412
Operating System: Mac OS X (10.4)