Before I begin, I'm completely new to AppleScript but I am very familiar with the Mac Interface.
I'm using the application QuarkXPress to export files in a bunch of different formats. To increase my productivity, I made shortcuts for each of the menu commands. Now, to make myself even more productive, I'd like to make a script that will run each menu command for me, in order.
Anyway, here's the horribly offensive code I've have so far:
Assuming a lot of you don't use Quark regularly and cannot test this code out for yourself, I'll tell you what happens. I get the first window (Usage...) to open up, but when I'm done with that page, the next window (Collect for Output...) does not open, and the code stops running for all I know. Sometimes, when I run the code one of the other commands will run, but when I am done using that the code will stop. Is there something I can write that will not run the next command until I close the current window?
Since I'm assuming you guys can't use Quark, could you try and make an example using another application, like Safari?
Thank you, and sorry for my lack of knowledge!!
I'm using the application QuarkXPress to export files in a bunch of different formats. To increase my productivity, I made shortcuts for each of the menu commands. Now, to make myself even more productive, I'd like to make a script that will run each menu command for me, in order.
Anyway, here's the horribly offensive code I've have so far:
Code:
tell application "QuarkXPress" to activate
tell application "System Events"
click menu item "Usage..." of menu "Utilities" of menu bar item "Utilities" of menu bar 1 of application process "QuarkXPress"
tell application "System Events"
click menu item "Collect for Output..." of menu "File" of menu bar item "file" of menu bar 1 of application process "QuarkXPress"
tell application "System Events"
click menu item "Layout as PDF..." of menu "Export" of menu item "Export" of menu "File" of menu bar item "File" of menu bar 1 of application process "QuarkXPress"
tell application "System Events"
click menu item "Layouts as Project..." of menu "Export" of menu item "Export" of menu "File" of menu bar item "File" of menu bar 1 of application process "QuarkXPress"
end tell
end tell
end tell
end tell
Assuming a lot of you don't use Quark regularly and cannot test this code out for yourself, I'll tell you what happens. I get the first window (Usage...) to open up, but when I'm done with that page, the next window (Collect for Output...) does not open, and the code stops running for all I know. Sometimes, when I run the code one of the other commands will run, but when I am done using that the code will stop. Is there something I can write that will not run the next command until I close the current window?
Since I'm assuming you guys can't use Quark, could you try and make an example using another application, like Safari?
Thank you, and sorry for my lack of knowledge!!