• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Get back color propertie
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get back color propertie


  • Subject: Re: Get back color propertie
  • From: Peter Waibel <email@hidden>
  • Date: Tue, 19 Dec 2006 14:28:13 +0100

First one works 2nd one doesn’t work:
I don’t know how to talk to picture box 1 to get the color back.
Ideally would be to put it later into a variable.

--- works ---
tell application "QuarkXPress Passport"
    tell document 1
        activate
       if color of picture box 1 is color spec "Cyan" then beep 3
    end tell
end tell

--- don't work

tell application "QuarkXPress Passport"
    tell document 1
        activate
       tell picture box 1
            if color is color spec "Cyan" then
               beep 3
            end if
       end tell
   end tell
end tell


Jan,

take care about what you try to compare in the if statement!
See the comments in the script.

Peter



tell application "QuarkXPress"
tell document 1

--return properties of every color spec
--> list of records

activate
tell picture box 1

--return color
-->color spec "Magenta" of document "Projekt3" of application "QuarkXPress"

--return color spec "Magenta"
--> QuarkXPress got an error: Can't get color spec "Magenta" of picture box 1 of document 1
-- This means, the picture box does not know something about color spec whose name is "Magenta"
-- color spec "Magenta" is an object of the document!

--if color is color spec "Cyan" then
-- beep 3
--end if


--return name of color
--> "Magenta"

if (name of color) is "Magenta" then
beep
end if

end tell
end tell
end tell



tell application "QuarkXPress"
tell document 1
activate

--return color of picture box 1
--> color spec "Magenta" of document "Projekt3" of application "QuarkXPress"

--return color spec "Magenta"
-- This means, you ask the document for a color spec whose name is "Magenta"
--color spec "Magenta" of document "Projekt3" of application "QuarkXPress"

if color of picture box 1 is color spec "Cyan" then beep 3
end tell
end tell



_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/mailman//archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: Get back color propertie
      • From: Jan Bultereys <email@hidden>
References: 
 >Get back color propertie (From: Jan Bultereys <email@hidden>)

  • Prev by Date: Get back color propertie
  • Next by Date: What does this mean? NSReceiverEvaluationScriptError: 4?
  • Previous by thread: Get back color propertie
  • Next by thread: Re: Get back color propertie
  • Index(es):
    • Date
    • Thread