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

Re: how can I reliably query the correct terminal window?


  • Subject: Re: how can I reliably query the correct terminal window?
  • From: "Mark J. Reed" <email@hidden>
  • Date: Wed, 3 Dec 2008 13:49:37 -0500

how about this?

tell application "Terminal"
    set my_win_id to id of window 1
    set x to contents of window id my_win_id
end tell

On Wed, Dec 3, 2008 at 1:37 PM, Skeeve <email@hidden> wrote:
> 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
>



--
Mark J. Reed <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:
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: Doug McNutt <email@hidden>
    • Re: how can I reliably query the correct terminal window?
      • From: Skeeve <email@hidden>
References: 
 >how can I reliably query the correct terminal window? (From: Skeeve <email@hidden>)

  • Prev by Date: how can I reliably query the correct terminal window?
  • Next by Date: Re: how can I reliably query the correct terminal window?
  • Previous by thread: how can I reliably query the correct terminal window?
  • Next by thread: Re: how can I reliably query the correct terminal window?
  • Index(es):
    • Date
    • Thread