Is this my Mac 1ghx G4 with 512mB/80 gig hard drive or a problem.
I have a very simple applescript with.
tell application “Quark”
open file “location of file”
end tell
But the script hangs and times out. You can still interact with quark and if you quit quark the script returns that it had a problem communicating with Quark.
Could anybody give me some feedback on this. If so many thanks
I think the part that said I was using OSX 10.2.4 gave it away, and yes use indesign is my next option but my autoamtion code does loads so big lead time in rewriting all to Indesign.
Looks like Adbode will have the manopoly. Shame but at least it works in OSX
you have to be pretty specific with aliases in OS X. OS 9 was quite forgiving - if you gave it a string, it would try really hard to make it an alias. OS X, on the other hand, doesn’t do such a nice job.
Quark seems a bit more picky (like it wasn’t already) in OS X.
Here’s a few pointers (I’ve discovered the hard way) to working with files/Quark in OS X:
A) If you set a variable to an existing file path (ie: set temp to “My HD:Docs:Quark Doc”) make sure you add ‘as alias’ to the end or specify it as an alias to begin with (example: ‘set temp to alias “My HD:Docs:QuarkDoc”’ or ‘set temp to “My HD:Docs:Quark Doc” as alias’)
B) If you are telling Quark to open a document, there’s 2 ways to word it:
–the long typed out way
tell app “Quark”
open alias “My HD:Docs:Quark Doc”
end tell
–using a variable
set temp to “My HD:Docs:Quark Doc” as alias
tell app “Quark”
open temp
end tell
This WON’T work (don’t ask me why):
set temp to “My HD:Docs:Quark Doc”
tell app “Quark”
open alias temp
end tell
But this will:
set temp to “My HD:Docs:Quark Doc”
tell app “Quark”
open (temp as alias)
end tell
It’s seems to me that Apple has tightened up the flexibility of AppleScript with OS X. Maybe so it’ll work better, maybe so they didn’t have to work so hard, I don’t know. But I do know you’ll need to be a bit more specific with scripts in OS X. My 2¢ anyway…
If you write another appliscript application with all your quark routines that is forced to stay open and work as a classic application then you can call these from your osx script to manipulate quark.
One interesting error that I am experiencing goes like this:
I can run a script in OS X that changes a document in Quark 4.11. When it’s finished, I can close the document in Quark, open a new one, and run the exact same script again. The script editor just sits there and spins its little curson round and round and round. Then after spinning for precisely two minutes (you can almost set you watch by it) it will give me the ‘AppleScript timed out’ error. I can then click run again, and it runs fine.
Yep, I was getting it happen 100% of the time, but it did not happen under osx10.1.5. Tried going backwards in OS but new G4’s will not let you put older versions of the software on.
Write script that picks up any quark file or application and moves it straight into the trash.
Next empty trash and thrown original disks at os9 user.
Next buy indesign and replace in space where quark once existed.
Port code over to indesign from quark, struggle for a while then sit back and enjoy the fruits of your labour as everything works how it should.
Thought I would never say this over 11 years of quark but its time to move over and unless apple sort their stuff out why use a mac, as indesign is scriptable on PC to.