Re: Keystroke command limit
Re: Keystroke command limit
- Subject: Re: Keystroke command limit
- From: Nigel Smith <email@hidden>
- Date: Tue, 26 Aug 2003 16:11:38 +0100
On 26/8/03 13:02, "Marcus Rodrigues" <email@hidden> wrote:
>
Well, since I got no answers about this question (or the answers did
>
not reach me), I am darn sure the keystroke command have a limit. It is
>
proven by the following super-simple script:
>
>
tell application "TextEdit"
>
activate
>
end tell
>
delay 5
>
tell application "System Events"
>
tell process "TextEdit"
>
set vaza to "1234567890 - 1234567890 - 1234567890 - 1234567890 -
>
1234567890 -1234567890 - 1234567890 - 1234567890 - 1234567890!!!" as
>
string
>
keystroke vaza
>
end tell
>
end tell
I *was* going to say "100 characters", because that's what I was getting,
then JD succeeded with the whole string.
So I ran your script a few times, and counted the characters put into
TextEdit each time, getting
{"100", "100", "106", "109", "100", "100", "100", "108", "109", "100",
"110", "100", "110"}
So the limit seems to be more a timing/processing issue than a distinct
number of characters, and will vary depending on machine, other activity,
and so on.
Work round? Don't rely on GUI scripting for anything but the simplest of key
presses...
Later,
Nigel
_______________________________________________
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.