in

Quark Forums

Old Faithful Script Crashes Quark!

Last post 07-16-2009 6:43 AM by Jean-Marie Schwartz. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 07-16-2009 2:55 AM

    • Emma
    • Top 25 Contributor
    • Joined on 07-07-2004
    • Leeds, UK
    • Posts 1,063

    Old Faithful Script Crashes Quark!

     All of a sudden, my picture labelling script is causing Quark 8 to crash. Still works fine in Quark 7, but even after a re-start, it crashes Quark 8 every time. I've used this 20/30 times a day for weeks.

    global box_width, box_height
    set box_width to 60
    set box_height to 7

    tell document 1 of application "QuarkXPress"
         set oldSpreadSettings to item spread coords
         set item spread coords to true
        
         set theImageName to my NameFromPath(get file path of image 1 of current box as string)
         set textBounds to my setBounds(bounds of current box as list)
         make text box at beginning with properties {bounds:textBounds, color:"White", shade:100}
         tell text box 1
              set vertical justification to centered
              set story 1 to theImageName
              set size of story 1 to "8 pt"
         end tell
         set item spread coords to oldSpreadSettings
        
    end tell

    on NameFromPath(theImagePath)
         set theOffset to the offset of ":" in (the reverse of every character of theImagePath) as string
         set theImageName to (characters -(theOffset - 1) thru -1 of theImagePath) as string
         return theImageName
    end NameFromPath

    on setBounds(theBounds)
         set tempy to (item 1 of theBounds) as string
         set the_offset to the offset of "m" in tempy
         set y_coord to characters 1 thru (the_offset - 2) of tempy as string
         set endy_coord to y_coord + box_height + 7 & " mm" as string
         set y_coord to y_coord + box_height & " mm" as string
        
         set tempx to (item 2 of theBounds) as string
         set the_offset to the offset of "m" in tempx
         set X_Coord to characters 1 thru (the_offset - 2) of tempx as string
         set endx_coord to X_Coord + box_width & " mm" as string
         set newBounds to {y_coord, item 2 of theBounds, endy_coord, endx_coord}
         return newBounds
    end setBounds



     
    It runs fine if I comment out the 'set story 1...' and 'set size of story 1... ' lines. Investigations continue, but any suggestions would be welcome.

  • 07-16-2009 3:04 AM In reply to

    • Emma
    • Top 25 Contributor
    • Joined on 07-07-2004
    • Leeds, UK
    • Posts 1,063

    Re: Old Faithful Script Crashes Quark!

     Even this causes a crash:

    tell document 1 of application "QuarkXPress"
        tell text box 1
            get story 1
        end tell
    end tell

    No problems with Quark 7, this is just 8 and it started today!

  • 07-16-2009 3:09 AM In reply to

    • Emma
    • Top 25 Contributor
    • Joined on 07-07-2004
    • Leeds, UK
    • Posts 1,063

    Re: Old Faithful Script Crashes Quark!

     ... and it happens with every XTension except Script switched off.

  • 07-16-2009 4:54 AM In reply to

    Re: Old Faithful Script Crashes Quark!

    Hi Emma!

    On my side, I still haven't found a solution to my problem either. I can't even set a story to "Hello", even on a fresh new document.

    Are you able to set text on your side?

    Jean-Marie Schwartz

    > G5, Mac OS X.4.11, Quark XPress Passport 7.5, Adobe CS <
  • 07-16-2009 4:55 AM In reply to

    Re: Old Faithful Script Crashes Quark!

    Emma:

     ... and it happens with every XTension except Script switched off.

    Give a shot at turning Script XT off.

    (I'm kidding!)

    Jean-Marie Schwartz

    > G5, Mac OS X.4.11, Quark XPress Passport 7.5, Adobe CS <
  • 07-16-2009 4:56 AM In reply to

    • Emma
    • Top 25 Contributor
    • Joined on 07-07-2004
    • Leeds, UK
    • Posts 1,063

    Re: Old Faithful Script Crashes Quark!

     I must have missed your earliest post/s on this subject! No, as soon as I address 'story 1' Quark quits. Yesterday it didn't. I use this script all the time, and losing it is a major inconvenience.

    I'll go and look for your posts....

  • 07-16-2009 6:43 AM In reply to

    Re: Old Faithful Script Crashes Quark!

    Emma:

    I'll go and look for your posts....

    It's not worthy. I'm stuck to v7 because of that. I must admit I've not fully troubleshot it so far but I don't really want to spend hours on it. What is abnormal is that apparently nobody else encountered this issue. I don't even know if yours is similar. Just sounds like it is.

    Jean-Marie Schwartz

    > G5, Mac OS X.4.11, Quark XPress Passport 7.5, Adobe CS <
Page 1 of 1 (7 items)
Powered by Community Server (Commercial Edition), by Telligent Systems