Run a program with applescript.
Automate tasks with applescript.
Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Wednesday November 11th, 2009 03:29 PM
tell application "Squeeze"
activate
end tell
tell application "System Events"
tell process "squeeze"
keystroke "o" using command down
tell sheet "Choose a project file"
end tell
end tell
end tell
set xml_folder to "Dlynch:Users:dlynch:Desktop:squeeze:xml"
set xml_file to "text.sqz"
set temp_folder to "Dlynch:Users:dlynch:Desktop:squeeze:fin"
try
tell application "Finder"
activate
open document file xml_file of folder xml_folder
end tell
delay 5
tell application "System Events"
tell process "Squeeze"
set frontmost to true
end tell
keystroke "e" using {command down}
end tell
delay 15
tell application "Finder"
set numfiles to 2
repeat until numfiles < 2
delay 2
set filelist to every file of folder temp_folder
set numfiles to count of filelist
end repeat
end tell
tell application "System Events"
tell process "Squeeze"
set frontmost to true
end tell
keystroke "q" using {command down}
end tell
on error
(*
display dialog "Something Go BOOM!"
*)
end try
Downloads:
Download: finder.scpt 274 B
Download: squeeze.scpt 1 KB
Please login or Click Here to register for downloads
run program by Dan Lynch
is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
Based on a work at www.3daet.com
Permissions beyond the scope of this license may be available at http://www.3daet.com
