I’m hoping someone here can help. I’ve recently upgraded to Quark 8 from 7.5 and from Leopard to Snow Leopard. I’m running a new MacBook Pro.
The script was designed to do the following on an already-opened Quark file: make it large enough to fill the screen and start spell checking through the auxiliary dictionary. On the old machine, I could access it from the little script menu in Quark, but had created a keyboard shortcut for it.
In the new set up, the script is in the menu, but clicking on it only enlarges the screen; it then hangs, I get a spinning beach ball and then nothing. Interestingly, if I open the script and click on Run, it will work, although I have found that Quark does intermittently crash.
Here is the code; any help would be appreciated. I have not yet created a keyboard shortcut for the script menu, as I have not gotten it to work consistently. I hope I’ve posted this right, I wasn’t entirely sure about how to go about it according to the noobie directions.
tell application "QuarkXPress"
set bounds of every document to {23, 32, 1060, 1850}
set view scale of every document to 200
end tell
tell application "QuarkXPress"
activate
tell document 1
set auxiliary dictionary path to "Paula's Hard Drive:Applications:QuarkXPress 8:OON Dictionary.qud" as alias
end tell
end tell
tell application "QuarkXPress"
activate
tell document 1
my doMenu_SE("Utilities", "Check Spelling", "Layout...")
end tell
end tell
on doMenu_SE(This_Menu, First_Level, Second_Level)
tell application "QuarkXPress"
activate
tell application "System Events"
tell process "QuarkXPress"
tell menu bar 1
tell menu bar item This_Menu
tell menu 1
if Second_Level is "" then
click menu item First_Level
else
tell menu item First_Level
tell menu 1
click menu item Second_Level
end tell
end tell
end if
end tell
end tell
end tell
end tell
end tell
end tell
end doMenu_SE
your script works on my home pc: QXP 8.16 : OS x 10.4.11
May your auxiliary dictionary be corrupted¿
The reason could also be a different system events behavior in snow cat …
I couldn’t find any hints in the Quark scripting dictionary to start a spell checking without using system events …
but you may try this:
tell application "QuarkXPress"
activate
tell document 1
set bounds to {23, 32, 1060, 1850}
set view scale to 200
set auxiliary dictionary path to "Macintosh HD:Applications:QuarkXPress 8:Test.qud" as alias --your dictPath
my thekeystroke()
end tell
end tell
on thekeystroke()
tell application "System Events"
keystroke "L" using {command down, shift down, option down} --shortcut to start the spell checking
end tell
end thekeystroke
The last time this all worked well was in Leopard. It seems the upgrade to Snow may be the problem (although I went to Q8 at the same time, so I’m not sure)
There still seems to be a problem with the script running from the script menu in Quark. If I open the file and click “run” on the applescript window, things seems to work fine (although I’m still getting random crashes of Quark.) If I use the script menu in Quark, the page will expand, but then it hangs before it gets to the dictionary. I have rebuilt the dictionary, but that doesn’t seem to help.
Could it be a setting in Quark that is wrong?
Could I set up a keyboard shortcut that would set up the dictionary to run separately, like an application, so it wouldn’t go through the Quark menu?
tell application "QuarkXPress"
activate
tell document 1
set bounds to {23, 32, 1060, 1850}
set view scale to 200
try
set auxiliary dictionary path to "Macintosh HD:Applications:QuarkXPress 8:Test.qud" as alias --your dictPath
on error errText number errNo
display alert (errNo as text) message errText
end try
my thekeystroke()
end tell
end tell
on thekeystroke()
tell application "System Events"
tell process "QuarkXPress"
keystroke "L" using {command down, shift down, option down} --shortcut to start the spell checking
end tell
end tell
end thekeystroke