in

Quark Forums

Error while displaying page width

Last post 10-04-2009 7:50 PM by arunkumar. 11 replies.
Page 1 of 1 (12 items)
Sort Posts: Previous Next
  • 09-26-2009 6:21 AM

    Error while displaying page width

    Hi all

    Any one can solve this problem.

    When i display the value of page width using "Display dialog" its  shows error as "

    Can't make «data FXHM0236EDDC» into type string.

    code: 

    tell document 1
           set pagewidth to page width
            set pageheight to page height
            display dialog "Page width is" & pagewidth & "."
        end tell

    How we can pass value in apple script? 

     

    cheers

    Arun Kumar 

     

     

  • 09-26-2009 1:40 PM In reply to

    • Emma
    • Top 10 Contributor
    • Joined on 07-07-2004
    • Leeds, UK
    • Posts 1,184

    Re: Error while displaying page width

    You need to coerce it to a string: tell application "QuarkXPress" tell document 1 set pagewidth to page width as string set pageheight to page height as string display dialog "Page width is " & pagewidth & "." end tell end tell
  • 09-28-2009 9:06 AM In reply to

    Re: Error while displaying page width

     Either Quark or you Script Editor/Script Application is running under Intel while the other isn't. You have to ensure that bot teh scipt and it target are on the same side of the Rosetta Emulator.

    HTH

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

  • 09-28-2009 9:11 AM In reply to

    • Emma
    • Top 10 Contributor
    • Joined on 07-07-2004
    • Leeds, UK
    • Posts 1,184

    Re: Error while displaying page width

     Sorry for garbage reply above, I was at home on Safari and forgot about line breaks, and now I can't remember how to add them in!

     However, on my old iMac I got the same error described, which went away when I coerced the data. So it might be that easy!

  • 09-28-2009 10:19 AM In reply to

    Re: Error while displaying page width

    Use Firefox to post your code formatted.
  • 09-30-2009 3:39 AM In reply to

    Re: Error while displaying page width

    Hi Scripting_Ace Thanks for ur reply. can you explain steps involve before running the Script? cheers Arun
  • 09-30-2009 3:42 AM In reply to

    Re: Error while displaying page width

    Hi Emma

    Can you expain how to solve this problem? Is it possiable display the page width in the "Display Dialog" 

  • 09-30-2009 5:11 AM In reply to

    • Emma
    • Top 10 Contributor
    • Joined on 07-07-2004
    • Leeds, UK
    • Posts 1,184

    Re: Error while displaying page width

     I'll repost my script in a better format! Try running it. If you still get a problem, then it is what Scripting Ace said.

    tell application "QuarkXPress"
         tell document 1
              set pagewidth to page width as string
              set pageheight to page height as string
              display dialog "Page width is " & pagewidth & "."
         end tell
    end tell


    -------------------------
    [This script was automatically tagged for color coded syntax by Convert Script to Markup Code]

  • 09-30-2009 5:44 AM In reply to

    Re: Error while displaying page width

    Hi Emma

    Same error encounter again. it is what Scripting Ace said.

    Can't make «data FXHM0236EDDC» into type string.

    can you tell the steps need to check before running the script, because i am in learning stage in apple script.

     

    Many Thanks

     Arun Kumar

     

     

  • 09-30-2009 5:46 AM In reply to

    • Emma
    • Top 10 Contributor
    • Joined on 07-07-2004
    • Leeds, UK
    • Posts 1,184

    Re: Error while displaying page width

    I'm afraid not, I don't know anything about intel and emulation. Try searching this forum though, I know it's come up before.

  • 10-01-2009 9:47 AM In reply to

    Re: Error while displaying page width

    arunkumar:
    Hi Scripting_Ace Thanks for ur reply. can you explain steps involve before running the Script? cheers Arun
     

    Hi Kumar and sorry for the delay,

    When runnig under Intel, your Finder gives you the option of running Universal apps either natively or within the Rosetta emulator. Concurently, it will run ALL non-Intel native programs in Rosetta.

    The problem here with scripting is that the back and forth "conversation" between App and Script does not like switching from INtel to Rosetta and vice-versa.

    How can you fix this you ask?

    If your target application only run under Rosetta (non Universall or Intel-only apps), you need to make sure that your Script Editor (if you are running your script form there) or Script saved as app runs under Rosetta as well. To do that:

    1. Select its icon in Finder
    2. Get Info
    3. Check the box that says "Open using Rosetta". 
    4. Next time that application is launched, it will run in emulation mode.

    Now if you do script a lot and don't want to have to do this everytime. Make a duplicate of your Script Editor application and append "(Intel)" and "(Rosetta)" at the end of each name. Get info on the "(Rosetta)" one and check the "Run under Rosetta". Then use the appropriate "flavor" wehn scripting different apps.

     HTH

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

  • 10-04-2009 7:50 PM In reply to

    Re: Error while displaying page width

     Hi Scripting_Ace

    Many Thanks, Now its display  the page width.

    cheers

    Arun Kumar 

     

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