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: Bernardo Hoehl <email@hidden>
- Date: Fri, 17 Sep 2004 13:06:11 -0300
Hi Paul,
Thanks for posting.
Looking at the dictionary would be the Smart thing to do. Wouldn't it?
Your tip of detecting Os version and alerting the user is the best thing to do.
I think if I want to write scripts that will run in Jaguar, I first need to have a partition with it in my Mac, and build the scripts from it.
Question:
How do you guys work?
Do you guys have Macs with Panther, Jaguar, and older systems for building your scripts? or just prefer to detecting the Os version and displaying a message that the user need a newer system?
I would appreciate very much to read your approach on this subject.
Bernardo
++++++++++++++
On 17 Sep, 2004, at 12:05 PM, Paul Berkowitz wrote:
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
_______________________________________________
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