Printing with XTensions in Quark 6

I�ve been trying to figure this out or find references but I haven�t had any luck. Does any know how to script XTensions in Quark 6 on 10.3? A small example script would be enough to get me started.
:?

If you don’t find an additional section of classes and commands in the Quark AS dictionary, chances are the extension is not scriptable.

What are you trying to do? Maybe there’s a way to script it without using an Xtension.

The XTension is a batch printer with lots of options built in to automate the job. So far, I can get the window to open up for this XTension, I just need to script from that point on. I’m using the UI Element Inspector to determine object and attributes.

try
tell application “QuarkXPress”
activate
end tell
tell application “System Events”
tell process “QuarkXpress”
tell menu bar 1
click menu item “Batch Print” of menu “File”
– Here’s where I need to work with UI elements for the window that opens
end tell
end tell
end tell
end try

If you can’t script the extension, you can just write an AS that will batch print files. You can build in dialogs to let users specify options or you can hard-code those options into the AS. The script below will batch print using the print setup properties listed. Anything not listed will default to the default setting.

It’s set up as a drag n’ drap and doesn’t have much in the way of error trapping or user interface to allow uses to set properties but could be easily adapted to do that.

Let me know if this helps.

-- This droplet processes both files or folders of files dropped onto the applet
on open these_items
    
    repeat with i from 1 to the count of these_items
        set this_item to (item i of these_items)
        set the item_info to info for this_item
        if folder of the item_info is true then
            process_folder(this_item)
        else if (alias of the item_info is false) then
            my process_item(this_item)
        end if
    end repeat
end open

-- this sub-routine processes folders
on process_folder(this_folder)
    set these_items to list folder this_folder without invisibles
    repeat with i from 1 to the count of these_items
        set this_item to alias ((this_folder as text) & (item i of these_items))
        set the item_info to info for this_item
        if folder of the item_info is true then
            process_folder(this_item)
        else if (alias of the item_info is false) then
            my process_item(this_item)
        end if
    end repeat
end process_folder

-- this sub-routine prints the files
on process_item(this_item)
    tell application "Finder"
        open item this_item
    end tell
    tell application "QuarkXPress Passport"
        activate
        tell print setup of document 1
            set orientation to landscape
            set page position to center position
            set print colors to black and white
            set print spreads to true
            set printer type to "GCC Elite XL 20/600"
            set reduce or enlarge to "100%"
            set registration marks to centered
        end tell
        print document 1
        close document 1 saving no
    end tell
end process_item