Tom,
I came across this discussion. It looks like VectorWorks can be scripted. I have never done an Automator or Apple Script file. Should be interesting.
Memento Mori,
Know need to apologize as you won't find that capability in Automator yet. You have already guessed the work around which is to use AppleScript.
I am not sure whether VectorWorks CAD has an AppleScript dictionary but even if it doesn't it should be possible. If you prefer an Automator workflow then a "Run AppleScript" action could be created such as below.
As I don't have access to VectorWorks CAD I am guessing on the name of the application and whether a delay of 2 seconds between each sending of return is enough on your machine. You need to copy this text to a "Run AppleScript" action in Automator. Note that you must replace all of the text and not just that labelled (* Your script goes here *).
click here to open this script in your editor
on run {input, parameters}
tell application "System Events"
tell process "VectorWorks CAD"
set frontmost to true
keystroke return
delay 2
keystroke return
delay 2
keystroke return
delay 2
return input
end run
PowerBook 12" Mac OS X (10.4.6)
Memento Mori
Posts: 2
From: Perth, Western Australia
Registered: May 23, 2006
Re: I feel stupid for asking this, but…
Posted: May 30, 2006 12:21 AM in response to: lc55
Reply Email
I'm sorry for taking so long to respond, lc55. Thank you for clarifying that an AppleScript is most likely the way to go, but when I tried to use the script you supplied (after changing "VectorWorks CAD" to the application's real name, which is just "VectorWorks"), running my workflow resulted in a "Syntax error":
"Expected 'tell', etc. but found command name."
It had highlighted the final word in your script, the "run" in "end run".
It's not particularly urgent anymore, as while I was waiting for a reply I figured I may as well go ahead and plod through it. So the task itself is done now; by all means feel free either to try again to solve the theory or to leave it and move on. And thanks again for responding.
PowerBook G4 (12-inch) Mac OS X (10.4.6) 256 MB RAM, 867 MHz
lc55
Posts: 114
From: Burnaby, BC Canada
Registered: Mar 12, 2006
Re: I feel stupid for asking this, but…
Posted: May 30, 2006 7:33 PM in response to: Memento Mori
Reply Email
I must have been tired and in a hurry to answer this one as that is a very basic syntax error.
Might as well try and finish the solution as you could need it at some point in the future.
What needs to be added is two "end tell" statements just before the "return input" statement.
Try it if you like with a small test case and, as I mentioned before, you might have to adjust the "delay 2" statement which just delays the execution of the following statement by 2 seconds. If the script runs too fast to get all three returns in then just increase the 2 to something higher until they all appear.