Re: System Event & TextEdit & Mac Os 10.2
Re: System Event & TextEdit & Mac Os 10.2
- Subject: Re: System Event & TextEdit & Mac Os 10.2
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 17 Sep 2004 08:05:43 -0700
Title: Re: System Event & TextEdit & Mac Os 10.2
On 9/17/04 7:37 AM, "Bernardo Hoehl" <email@hidden> wrote:
I have this script that I am using do build a Demo of my Applications, it simulates typing.
It works fine on Os 10.3.5, but in OS 10.2, I get an error that the pressKey event is not understood.
Could you help me?
Yes. Publish "Works only in Panther (OS 10.3) and later" with your app.
Look at System Events dictionary in Jaguar: There is no Processes Suite and no 'keystroke' command.
(There was for a time a beta version of System Events available for Jaguar, but that ceased to be available when Panther was released. You certainly cannot depend on your users finding or installing a rogue copy of it around.)
Or you could require that your Jaguar users get "Extra Suites" (a faceless background app something like an osax) and use its 'ES type key' command here. You'd need to check whether users are in Panther or earlier:
set osVers to system attribute "sysv"
if osVers ≥ 4144 then -- OS 10.3
tell application "System Events" to keystroke theChar
else
try
tell application "Extra Suites" to ES type key theChar
on error
beep
display dialog "You need to get and install \"Extra Suites\" in Jaguar - see the ReadMe."
return
end try
end if
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden