On Feb 05, 2013, at 12:05, Patrick Woolsey <pwool...@barebones.com> wrote:
> At 08:20 -0600 02/05/2013, Rod Buchanan wrote:
>> Has stationery support been removed in 10.5.x?
> 
> BBEdit 10.5.x does support stationery (as I'll vouch since I use it often :-).
> 
> You will, however, now need to apply the "Stationery" option directly to the 
> desired file(s) via the Finder's "Info" window rather than in the Save 
> dialog*.

______________________________________________________________________

Hey Folks,

This is easy enough to do by hand, but it's also really quite easy to automate.

Changing 'T' to 't' in the _cmd string of the first script will unset the 
Stationary bit.

--
Best Regards,
Chris

---------------------------------------------------------------------
# Completely automate setting Stationary bit.
# Requires Xcode for 'SetFile'.
---------------------------------------------------------------------

tell application "BBEdit"
  tell front text document
    set _file to its file
    if _file ≠ missing value then
      set _posix to quoted form of (POSIX path of _file)
      set _cmd to "SetFile -a T " & _posix
      do shell script _cmd
    else
      error "BBEdit's front document is not saved."
    end if
  end tell
end tell

---------------------------------------------------------------------
# Open Finder Get-Info Window associated with front BBEdit document.
---------------------------------------------------------------------

tell application "BBEdit"
  tell front text document
    set _file to its file
  end tell
end tell

if _file ≠ missing value then
  tell application "Finder"
    activate
    open information window of (_file as alias)
  end tell
else
  error "BBEdit's front document is not saved."
end if

---------------------------------------------------------------------
# Open Finder Get-Info Window associated with front BBEdit document.
# Click Stationary Pad checkbox with System Events.
---------------------------------------------------------------------

tell application "BBEdit"
  tell front text document
    set _file to its file
  end tell
end tell

if _file ≠ missing value then
  tell application "Finder"
    activate
    set infoWin to open information window of (_file as alias)
    set winName to name of infoWin
  end tell
  
  tell application "System Events"
    tell window winName of process "Finder"
      click checkbox "Stationery pad" of scroll area 1
    end tell
  end tell
  
else
  error "BBEdit's front document is not saved."
end if

---------------------------------------------------------------------


-- 
-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bbedit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to