Quark - Scripting Preference

Hello,
I’m trying to write a script to set the ‘Auto Backup’ feature in Quark. I want to create an executable that can just be double-clicked to turn the feature on in quark. (If you aren’t familiar with where this is, it can be accessed via the menu Quark → Preferences → Save.)

Here’s what I have so far:

tell application “QuarkXPress”
activate
set autobackup to true
set total backups to 10
set backup destination to alias “Scratch:”
end tell

It runs without error, but it doesn’t actually change the settings. (I did get it to change the backup number to 10 on an earlier version of the script, but haven’t been able to do that since.

I’m kind of a scripting newb so any help you could offer would be appreciated.

I should also mention that the reason why i’m trying to script this is because we can’t get the setting in the preference to ‘stick’ in the images we created. (The path will look correct, but if you click ‘browse’, you will see that the path isn’t actually setup.)
Thanks,

George
10.3.9
Quark 6.5
I have write permission to the ‘Scratch’ volume on my machine.

Hi Jorge

I can’t see anyway of increasing the number of revisions in the auto backup feature, it looks to me like you can only switch it on or off!!
so from that i reckon you pretty much set it up how you like initially, then use something like this to toggle it on and off.

tell application "QuarkXPress"
	set t to button returned of (display alert "toggle auto backup:" buttons {"off", "on"})
	if t = "on" then
		set auto backup to true
		set total backups to 6
		set backup destination to (choose folder) -- choose your scratch folder
	else
		if t = "off" then
			set auto backup to false
		end if
	end if
end tell

ignore what i said above about revisions it was total backups (i’m an idiot)

this works fine for me!!

if you don’t want to choose folder then add your full alias path to the scratch disk in its place. whether that’s the reason it doesn’t
hold your path then i’m unsure but like i say it worked okay when i tested it!!

Good luck!

Hey Pidge,
Thanks for your help. It works correctly on the OS 10.4 machines but not on 10.3.9. Below is the error i get on 10.3.9 machines:

Syntax Error
Expected “,” but found identifier.

Then, in the script, it has the word “alert” highlighted.

Also, if i want to point the destination path to this path “Macintosh HD:Users:Shared:QuarkBackups”, i’m having problems. The script doens’t like the space in the hard drive name. Can i use a unix path here instead or is there another way?

Thanks again for all your help.

George

I fixed the problem with not being able to point to a location that had a space.
(I forgot about putting the path in quotes and I feel really dumb.)

I’m still having problems with it working in 10.3.9 though so i’d appreciate any tips.
Thanks again,

George

swap the word “alert” (tiger) for “dialog” (tiger & panther)