On Aug 26, 2015, at 19:00, Bruce Linde <[email protected]> wrote:
> tell application "System Events"
>       tell process "BBEdit"
>               repeat with x from 1 to (count windows)
>                       set this_name to (name of window x) as text

______________________________________________________________________

Hey Bruce,

There's no need to have System Events talk to the BBEdit process, when you can 
talk to BBEdit directly.

---------------------------------------------
tell application "BBEdit"
  
  tell (project windows whose ¬
    name is not "clipping" and ¬
    name is not "Clippings" and ¬
    name is not "CSS" and ¬
    name is not "Entities" and ¬
    name is not "untitled" and ¬
    name is not "Utilities")
    
    set bounds to {340, 45, 1380, 1196}
    
  end tell
  
  tell palette "HTML Tools"
    if its visible is true then
      set its position to {1781, 39}
    end if
  end tell
  
end tell
---------------------------------------------

This way you can automatically filter out non-project windows and such.

And by changing the formatting a bit you can make it more readable and 
maintainable.

--
Best Regards,
Chris

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" 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 [email protected].
To post to this group, send email to [email protected].

Reply via email to