The clipboard contains a the name of a file that I want to open in BBedit, convert, save and then open in MS Word. I can record the actions in BBedit but I have to assign the contents of the clipboard to a variable(FILENAME) and use the variable in the open command as below. I don’t know how to assign the FILENAME variable nor how to use the variable in the open command with proper syntax.
tell application “BBEdit”
activate
make new text window
set FILENAME to “Clipboard” ???
open {file “G5 Office Server Drive:Upload to AMC:FILENAME”} with LF translation ???
zap gremlins text 1 of text window 1 zap action delete_gremlin with filter linefeeds, non ASCII characters and controls
save text window 1
close text window 1
close text window 1
end tell
Can I open MS Word with Applescript? If so I would like to be able to execute a macro I wrote in VisualBasic … can this be done in Applescript?
Thank you for any help.
Douglas McKibbin
Model: G5 Tower
AppleScript: 1.10
Browser: Safari 412
Operating System: Mac OS X (10.4)