Easy AppleScript/TextEdit scripting problem...
Hi All:
I'm new to AppleScript, and we recently upgraded to Lion. We had a simple AppleScript we were using to strip quotation marks out of a .csv file using TextEdit, but the keystroke commands in Lion are different.
Here is the original script, which worked under Leopard/SnowLeopard:
tell application "TextEdit" to activate
tell application "System Events" to tell process "TextEdit"
keystroke "f" using command down
keystroke "\"" & tab
keystroke delete key
click button "Replace All" of window "Find"
keystroke "s" using command down
end tell
This would tell TextEdit to take the current file, replace all the quotation marks with nothing, then save the file again. Now, TextEdit uses a floating menu bar to do Find/Replace. I can get the script to go as far as selecting all the quotation marks:
tell application "TextEdit" to activate
tell application "System Events" to tell process "TextEdit"
keystroke "f" usingcommand down & option down
keystroketabusingshift down
keystroke "\""
?????
end tell
...but I can't figure out how to tell it to click the "All" then "Done" buttons to strip the quotes. Any assistance would be appreciated. Thanks!
20" iMac-OTHER, Mac OS X (10.7.3)