• 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: Position of window in Terminal...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Position of window in Terminal...


  • Subject: Re: Position of window in Terminal...
  • From: Bill Briggs <email@hidden>
  • Date: Mon, 27 Sep 2004 16:25:15 -0300

My Mac won't move the window with your script below, but we've already established off-line that there's something wonky with something in my system that's giving rise to these little issues, like the fact that assigned Terminal window names aren't "sticking".

I'm unable to verify this because of the gremlins infesting this PowerBook, but I wonder if the error you get has anything to do with the fact that the Terminal window likes to be a set number of columns wide, as opposed to an arbitrary number of pixels (and same with rows deep)? Rather than sizing it using the bounds syntax, what happens if you do this?

tell application "Terminal"
	-- activate
	set position of window 1 to {0, 0}
	set number of rows of window 1 to 25
	set number of columns of window 1 to 82
end tell

When I run that it puts the window in the corner and sizes it appropriately. It doesn't give an error, even on this misbehaving machine.

- web

At 11:07 AM -0600 9/27/04, David Crowe wrote:
This works for me to position a Terminal window in the top left:

tell application "Terminal"
activate
do script "ls"
set bounds of window 1 to {0, 0, (item 3 of bounds of window 1) - (item 1 of bounds of window 1), ¬
(item 4 of bounds of window 1) - (item 2 of bounds of window 1)}
end tell



Well, it works, but then it generates an error, but the window is positioned correctly.


- David Crowe

 _______________________________________________
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

_______________________________________________ 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
References: 
 >Position of window in Terminal... (From: David Crowe <email@hidden>)

  • Prev by Date: GUI screen capture?
  • Next by Date: Re: [OT] I don't want to whine, but...
  • Previous by thread: Position of window in Terminal...
  • Next by thread: Re: Position of window in Terminal...
  • Index(es):
    • Date
    • Thread