Tips & Tricks Part 4: Select Default Layer

Discuss AppleScripting for QuarkXPress 2015, 2016 & 2017.

Tips & Tricks Part 4: Select Default Layer

Postby pjanssen » 30 Nov 2016, 08:47

I created some Applescripts, which might be useful for others too. So I wanted to share them here.

The fourth one is for selecting the Default Layer. This one can be changed very easily for selecting another layer. Just exchange "Default" with the name of the layer that needs to be selected.

Code: Select all
set var_LayerNumber to ""
tell application "QuarkXPress"
   set var_LayerNames to name of every layer of document 1
   repeat with i from 1 to count of var_LayerNames
      set var_LayerName to item i of var_LayerNames
      if var_LayerName = "Default" then
         set var_LayerNumber to i
      end if
   end repeat
   tell document 1
      set active layer to layer var_LayerNumber
   end tell
end tell



This script is especially useful if a keyboard shortcut is attached to it.

If you own Keyboard Maestro: more useful macros can be found here: http://forums.quark.com/viewtopic.php?f=17&t=28981
pjanssen
 
Posts: 125
Joined: 31 Dec 1969, 19:00

Return to QuarkXPress 20xx: Scripting

Who is online

Users browsing this forum: No registered users and 1 guest