• 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
scripting Get Info
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scripting Get Info


  • Subject: scripting Get Info
  • From: Robert Poland <email@hidden>
  • Date: Sun, 14 Aug 2005 13:58:33 -0600

hi,

OS 10.4.2. I'm trying to script the Get Info window to un-check the "Stationery Pad" checkbox. Script so far;

(*
ClickStationeryPad - 8/13/05 - By R.L.Poland - with help from Philip Regan and Gary Wood -
from script "ChangeFileNames"
*)


on open (droppedItems)
repeat with i from 1 to the count of droppedItems
set this_item to (item i of droppedItems)
set the item_info to info for this_item
if folder of the item_info is true then -- deal with folders
process_folder(this_item)
end if
end repeat
beep
display dialog "All done." buttons "OK" default button "OK" giving up after 2
return
end open


on process_folder(this_folder) -- this sub-routine processes folders
set droppedItems to list folder this_folder without invisibles
repeat with i from 1 to the count of droppedItems
set this_item to alias ((this_folder as text) & (item i of droppedItems))
set the item_info to info for this_item
if folder of the item_info is true then
-- another folder inside the current folder
process_folder(this_item)
else -- not a folder
my setStationery(this_item)
end if
end repeat
end process_folder


on setStationery(myFile) -- un-check stationery pad
	tell application "System Events"
		set targetX to file (myFile as string)
		set the stationery of targetX to false
	end tell
end setStationery

When folders of "Stationery" are dropped on this script it works, but when single files are dropped a copy of the original file is made and the checkbox is not cleared on the original. The problem starts with the first line "on open (droppedItems)".

Looks like a "Feature" of OS 10.3.9 and OS 10.4.2.

Comments will be appreciated.

Tia,

--
Bob Poland - Fort Collins, CO
http://www.ibrb.org/
_______________________________________________
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


  • Follow-Ups:
    • Re: scripting Get Info
      • From: Martin Orpen <email@hidden>
  • Prev by Date: Re: bug? selection of document 2 of Illustrator CS2
  • Next by Date: Re: scripting Get Info
  • Previous by thread: Re: scripting Get Info
  • Next by thread: Re: scripting Get Info
  • Index(es):
    • Date
    • Thread