• 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: Jan Bultereys <email@hidden>
  • Date: Tue, 19 Dec 2006 16:39:04 +0100
  • Thread-topic: Get back color propertie

Thanks again peter, you are right.

Your input gave me the solution.

Many thanks and have a nice day at the office.
jan


> From: Peter Waibel <email@hidden>
> Date: Tue, 19 Dec 2006 14:28:13 +0100
> To: applescript-users users <email@hidden>
> Subject: Re: Get back color propertie
>
>> 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:
> edepot.com
> Archives: http://lists.apple.com/mailman//archives/applescript-users
>
> This email sent to email@hidden

 _______________________________________________
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

References: 
 >Re: Get back color propertie (From: Peter Waibel <email@hidden>)

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