Author Topic: works when run in SE but not from menu items?  (Read 1055 times)

0 Members and 1 Guest are viewing this topic.

Offline larsen67

  • Sr. Member
  • ****
  • Posts: 459
  • Karma: 10
  • Gender: Male
works when run in SE but not from menu items?
« on: April 03, 2008, 07:50:49 AM »
This is just a very simple playing about thing but I have a few scripts that I've assigned keyboard short cuts to only I can't make some function from the menu bar. What is the obvious mistake Im making here that is eluding me?

-- this works
tell application "QuarkXPress"
   activate
   if not (exists document 1) then error "No document is open."
   tell document 1
      set tool mode to pic mode
   end tell
end tell

-- this works when run from SE but not menu bar Quark or Fast Scripts
tell application "QuarkXPress"
   activate
   if not (exists document 1) then error "No document is open."
   tell document 1
      tell application "System Events" to tell process "QuarkXPress" to key down option
      set tool mode to pic mode
      tell application "System Events" to tell process "QuarkXPress" to key up option
   end tell
end tell

it does not stay sticky?