Re: scripting Get Info
Re: scripting Get Info
- Subject: Re: scripting Get Info
- From: "Gary (Lists)" <email@hidden>
- Date: Sat, 13 Aug 2005 11:15:31 -0400
"Robert Poland" wrote:
> hi,
>
> OS 10.4.2. I'm trying to script the Get Info window. Script so far;
>
> set myFile to "iMac HD:Users:rpoland:Desktop:Picture 1.jpg" as alias
>
> tell application "Finder"
> open information window of myFile
> tell application "System Events"
> tell checkbox "Stationery Pad" of scroll area 1 of
> window "Picture 1 Info"
> click
> end tell
> end tell
> delay 2
> close information window 1
> end tell
> The tell checkbox line gives me the, highly informative error,
> "System Events got an error:
> NSReceiverEvaluationScriptError: 4".
>
> I'm sure I'm missing some very simple element, any clues?
Bob, it looks like you're trying to make a stationery tablet of out of a
file, right?
'stationery' is a property of the 'file' class in System Events.
So, this works just fine...
-- --------------------------------------------------
set x to alias "Macintosh HD:Users:user1:Desktop:2005/08/12 20.02.44.png"
--
tell application "System Events"
set targetX to file (x as string)
set the stationery of targetX to true
end tell
-- --------------------------------------------------
The file is now has its Stationery box checked.
Also, on the topic of the Info box. I read in Finder's dictionary (I think)
a couple of week ago something about 'active pane' of that window (if I am
remembering correctly.) That might be relevant if you really wanted (why?)
to do the GUI thing.
I may be mis-remembering something, but I saw that 'active pane' thing
somewhere...
HTH
--
Gary
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden