Re: Sending Control-T to Terminal
Re: Sending Control-T to Terminal
- Subject: Re: Sending Control-T to Terminal
- From: Jeffrey Berman <email@hidden>
- Date: Fri, 27 Sep 2002 19:37:18 -0500
On Fri, 27 Sep 2002, Chris Janton <email@hidden> wrote:
>
> However, your comment led me to think of an alternative: Before sending a
>
> Control-T key sequence I could send a Control-U, which erases text on the
>
> current command line. Thus, the command could be:
>
>
>
> tell application "Terminal"
>
> do script ((ASCII character 21) & (ASCII character 20)) in window 1
>
> end tell
>
>
>
> This sequence still generates the unwanted line feed but it avoids the
>
> problems of inadvertently sending text left on the command line.
>
>
If you're "talking" to a VMS box you should consider using Control-X
>
(24) which will clear the entire type-ahead buffer...that way there
>
are *no* characters at all to worry about...
Chris:
Yup, I'm connecting to a machine running VMS. I knew about Control-X, but I
chose Control-U because the only text I want to remove is that on the
current command line.
>
This bit will turn the current line into a comment which will allow
>
you to recall the command line...
>
>
tell application "Terminal"
>
do script ((ASCII character (8)) & "!" & (ASCII character
>
20)) in window 1
>
end tell
When I tried this sequence, it recalled text on the command line but the
first character of the text was replaced with the "!" character. If you can
think of a way to have the text recalled without the replacement of the
first character, it would certainly be better than my solution of simply
erasing text on the command line. In any case, thanks for your suggestion.
-Jeffrey Berman
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.