Re: Keyboard Question?
Re: Keyboard Question?
- Subject: Re: Keyboard Question?
- From: Shane Stanley <email@hidden>
- Date: Fri, 19 Jan 2001 16:44:02 +1100
On 19/1/01 2:13 AM +1000, Arthur J Knapp, email@hidden, wrote:
>
> Date: Wed, 17 Jan 2001 17:35:18 -0600
>
> Subject: Re: Keyboard Question?
>
> From: Jolly Roger <email@hidden>
>
>
> on 1/17/2001 12:34 PM, Samuel Hargis wrote:
>
>
>
>> tell application "finder"
>
>> TypeText (ascii character 3) -- types the enter key
>
>> end tell
>
>
>
> Out of curiosity, why are you telling the Finder to do this? None of these
>
> commands belong to the Finder. I suspect this is the result of a bad habit.
>
> If so, stop that. ;)
>
>
But...
>
>
I am not familiar with the TypeText osaxen, but as a "user-emulating"
>
type of thing, I would assume that you *would* want to call it inside a
>
tell statement of the application that is meant to receive the keystroke.
>
Am I wrong? (At the very least, I would think you would want to tell the
>
application to "active" first).
I'm pretty sure you could just activate the app first, something like this:
tell application "Finder"
activate
end tell
TypeText (ascii character 3)
Except that, according to the AppleScript Scripting Additions Guide,
although the activate command is built into the AppleScript extension, it's
still classed as a scripting addition.
Good luck moving that one outside the tell...
--
Shane Stanley, email@hidden