in

Quark Forums

For same scripting different results - Solution Please..

Last post 06-25-2008 7:54 AM by Scripting_Ace. 10 replies.
Page 1 of 1 (11 items)
Sort Posts: Previous Next
  • 05-17-2008 9:50 AM

    • Sankar
    • Top 150 Contributor
    • Joined on 05-06-2008
    • India
    • Posts 86

    For same scripting different results - Solution Please..

    Hi all,

    when i run the below Script

    tell document 1 of application "QuarkXPress"
    set horizontal measure to inches
    set vertical measure to inches
    set rightmargin to right margin --as inch units --as real
    end tell


    I got the result as follows

    «data FXHM003E0000»

    I got the correct result (right margin value) in some system but in some of the system I won't able to get the values of right margin and the result shown as mentioned above.

    Shall I know the reason and how can I solve it?

    Thanks in Advance,
    San
  • 05-17-2008 3:08 PM In reply to

    For same scripting different results - Solution Please..

    You have some of your system running on Power PC and some running in emulation mode under Mac Intel.

    I would gather that you are using Q 6.5 which is not Intel native but your Script Editor is.

    My suggestion if you want things to work as they would on PowerPC mac, is to either:
    • make a ducplicate of your Script Editor and rename it "Script Editor (Rosetta)". Then do a "Get info" on that duplicate and check the box that says "Open using Rosetta". Use that duplicate to code and run your script targeted at non-native Intel application.
    • The same can be done to script applications that you create.

    The trick here is to keep everything on the same side of the Rosetta emulator (Script and Application).

    Hope this helps!

    Michel Lemieux
    Click here --> to visit my PUBLISHING & SCRIPTING FORUM

  • 05-19-2008 3:52 AM In reply to

    • Sankar
    • Top 150 Contributor
    • Joined on 05-06-2008
    • India
    • Posts 86

    For same scripting different results - Solution Please..

    Thank you Ace

    -San
  • 05-29-2008 5:39 PM In reply to

    For same scripting different results - Solution Please..

    I guess I'm having a similar issue but little different. The dept. was upgraded to new Intel Imacs running Leopard 10.5.2. We are still using Quark 6.52 in some projects in progress (reflows issues) and new documents are created in v7.3.1.

    I'm using the same script for both versions & it is located in the scripts folder in the app.
    They work OK but now I need to modified the script. I always launch first Quark 6.52. I opened the script made the change tested in both versions works ok but if I launch Quark 7 first and I want to make another change to the script all the code had changed. See example:
    Launching Quark 6.52 first & open the script (I'm just posting a section)

    tell application "QuarkXPress"
    tell document 1
    show layer named "Color"
    hide layer named "Spanish Text"
    show layer named "English Text"
    hide layer named "5 Star"
    hide layer named "Automation"
    hide layer named "Spanish 5 star disclaimer"
    hide layer named "English 5 star disclaimer"
    show layer named "Golf Only"


    Launching Quark 7.3 & open the section I noticed it changed

    tell application "QuarkXPress"
    tell document 1
    «event XPLYSHLY» "Color"
    «event XPLYHDLY» "Spanish Text"
    «event XPLYSHLY» "English Text"
    «event XPLYHDLY» "5 Star"
    «event XPLYHDLY» "Automation"
    «event XPLYHDLY» "Spanish 5 star disclaimer"
    «event XPLYHDLY» "English 5 star disclaimer"
    «event XPLYSHLY» "Golf Only"


    Based on your suggestion Ace I should duplicate Script Editor & rename it Script Editor Rosetta which I did. I'm no expert in this matter but it looks like I have to create two different scripts. One for 6.52 & the other for 7.31. Am I right? I'm using xpert layers extension for both versions. I tried to use Quark dictionary but it is really confusing. Any suggestions are super duper welcome.
  • 06-02-2008 8:14 AM In reply to

    Re: For same scripting different results - Solution Please..

    I tend to keep my scripts separated for each application/version. I have no suggestion w/r to your XTension problem, sorry. 

    Michel Lemieux
    Click here --> to visit my PUBLISHING & SCRIPTING FORUM

  • 06-02-2008 1:35 PM In reply to

    Re: For same scripting different results - Solution Please..

     This used to work all the way up to 7.31

     

    set filepath to "path:to:the:file:1-1.txt"
    tell application "QuarkXPress"
        tell document 1
            tell page "1"
                set story 1 of text box "1" to alias filepath
            end tell
        end tell
    end tell

     and I mean it worked in 7.3 until I did the 7.31 updater. Now it's screwed up.

  • 06-04-2008 10:49 PM In reply to

    Re: For same scripting different results - Solution Please..

     Hi Nellbern,

    I just remembered something that "may" affect your results:

    Even though you have separated your scripts by Quark versions, it is not "wise" to have both versions launched when running your scripts. The internal name of those versions is the same (unless you change then) so your scripts might have difficulties in targeting the right one.

    And to clarify my original statement:

    On a Mac Intel,

    You should use Script Editor (under Rosetta) for scripting Q6.5 (and under)

    and Script Editor (Normal) for scripting Q7.

    This will ensure tat your Script Editor and the Application* are on the same side of the Rosetta emulator so the former will not have to go through an emulator to communicate with the latter.

    * This goes for any PowerPC-only application that you run under Mac Intel.

     

    Hope this helps!

    P.S. Is this your picture that we can now see or did you use a pic from Parminder Nagra (E.R.'s Dr. Neela Rasgotra)

    Michel Lemieux
    Click here --> to visit my PUBLISHING & SCRIPTING FORUM

  • 06-06-2008 9:29 AM In reply to

    Re: For same scripting different results - Solution Please..

    THANK YOU!! Scripting-Ace. I was trying not to keep both versions of Quark launched at the same time anyway but the department is using the scripts & I don't know if they are launching both Quark versions. I thought the system was recognizing they were different versions. When I checked the applications folder they have the same name. No wonder I'm having these odd results. Dah! In the script I'm not targeting a specific version of Quark. I tried to rename them differently like Quark7.31 but I can't. (permission issue) at work. I talked to our IT guy to rename Quark applications & he didn't like the idea too much. Is there any risk involved renaming apps.? At home I renamed script editor as script editor rosetta and it is a beautiful thing; it worked. The code didn't change. P.S. Your question about my picture. That's me & you have just found almost a look like me. OMG
  • 06-24-2008 11:14 PM In reply to

    Re: For same scripting different results - Solution Please..

    Ace,

     I have a script that uses named boxes (e.g. tell generic box "mybox" ...) that has worked fine on all previous versions of Quark and works fine on Quark 7.3.1 on PowerPC.  It, however, cannot find any named boxes when run on 7.3.1 on Intel.  If you set the name of the box to a variable and then "display dialog" that variable, the box name is found just fine on PowerPC, but is blank on Intel.  The scripts were developed on a PowerPC platform using Script Editor.  I'm trying to understand the above posts, but it doesn't sound like the "Script Editor Rosetta" is necessarily my problem or solution, since 7.3.1 is a universal binary (I think).  Any suggestions for how to get 7.3.1 on Intel to get the name of a named box?

     

    Thanks,

    Steve 

  • 06-25-2008 5:54 AM In reply to

    Re: For same scripting different results - Solution Please..

    stevewit:
    Any suggestions for how to get 7.3.1 on Intel to get the name of a named box?

    Try this:

    tell application "QuarkXPress Passport"
    tell document 1
    set properties of generic box 1 to {name:"BOXNAME"}
    tell generic box "BOXNAME"
    set theProps to get properties
    set theName to  name
    end tell
    end tell
    end tell

    ------------------------------------------------------------------------------
    Intel Macbook • QXP 7.31

    Filed under:
  • 06-25-2008 7:54 AM In reply to

    Re: For same scripting different results - Solution Please..

    stevewit:
    I'm trying to understand the above posts, but it doesn't sound like the "Script Editor Rosetta" is necessarily my problem or solution, since 7.3.1 is a universal binary (I think).  Any suggestions for how to get 7.3.1 on Intel to get the name of a named box?
     

    Universal Binary only means that your application contains both PowerPC and Intel builds and therefore can run on both platforms.  This has nothing to do with Rosetta. If you run your app on an Intel Mac, it will use the Intel build, if you run your app on a PowerPc Mac it will use its PowerPC build.

    This means that Quark does not run in emulated mode under Intel (unless you force it to). The same gors with your script. Script Editor is also a INiversal Binary application BUT in your case, I believe you saved your script as an application un PowerPC. This had the effect of adding an application warapper to your script but that wrapper is NOT a universal binary.

    So when you launch your applciation under Intel, it open in Rosetta while your target application runs natively.

    To solve your problem, you need to recompile your script under Intel or force Quark to run in Rosetta.

    Hope this helps! 

    Michel Lemieux
    Click here --> to visit my PUBLISHING & SCRIPTING FORUM

Page 1 of 1 (11 items)
Powered by Community Server (Commercial Edition), by Telligent Systems