• 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
how can I reliably query the correct terminal window?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how can I reliably query the correct terminal window?


  • Subject: how can I reliably query the correct terminal window?
  • From: Skeeve <email@hidden>
  • Date: Wed, 03 Dec 2008 19:37:47 +0100

I'm still working on Tiger (10.4.11) and I'm having a hard time finding out how to query the correct Terminal window for it's content. Currently I'm using "window 1" which is fine as long as I don't switch to another terminal window while the script is running. Is there a way to get a reference to that window so that I can always access it by this reference?

I tried:

tell application "Terminal"
set my_win to window 1
set x to contents of my_win
x as text
end tell

This produces a runtime error

"window id 13253 of application \"Terminal\" kann nicht in Typ string umgewandelt werden." (can't be converted to String)

This one


tell application "Terminal" set my_win to window 1 set x to contents of (window id my_win) x as text end tell

"„Terminal“ hat einen Fehler erhalten: window id 13253 kann nicht in Typ integer umgewandelt werden." (can't be converted to Integer

Anyone any idea?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • Re: how can I reliably query the correct terminal window?
      • From: "Mark J. Reed" <email@hidden>
  • Prev by Date: Re: Tell Blocks Considered Harmful (was Re: open for access)
  • Next by Date: Re: how can I reliably query the correct terminal window?
  • Previous by thread: Run QuartzComposer composition from AppleScript?
  • Next by thread: Re: how can I reliably query the correct terminal window?
  • Index(es):
    • Date
    • Thread