OSX GUI Manipulation?

Richard Gaskin ambassador at fourthworld.com
Wed Sep 1 06:19:58 EDT 2004


bfr at nwlink.com wrote:

>>The post I replied to mentioned only BASIC and FaceSpan, both of which
>>use AppleScript for controlling other apps, as does Rev.
> 
> You are mistaken.
> 
> Facespan, in versions prior to 4.0, had "click as user" and "type as user"
> and "do menu" commands. I used those commands, in applications I built and
> sold, to control the behavior of unscriptable applications by controlling
> them through manipulaton of their GUI.
> 
> The programming language of FaceSpan is applescript, and so for those
> applications (or those actions) that WERE scriptable, Facespan could in
> fact send applescript commands to the applications.

Right, the programming language of FaceSpan is AppleScript. On which 
part of that was I mistaken?

> Well I thought I made it quite clear that automating other applications is
> the whole point of my question.

That was clear.  What do you want to do that AppleScript doesn't support?

> I am not quite sure what you are trying to say here. Yes, iKey can do
> exactly what I want. I can create and edit automation task sequences in
> iKey's macro language. Then I can use applescript to trigger those stored
> macro commands.

Sounds like you have a good solution.

>>In an earlier post you made reference to the System Events application.
>> If you open that app's dictionary with AppleScript Editor you'll find
>>an extensive variety of AppleScriptable goodies.
>
> And if you *actually try* using those commands, you will find out that
> they do not work on some applications. If they did, there would be no need
> for iKey or Quickeys. 

I'm straying off topic here, but I think QuickKeys offers a strong value 
even if scriptable solutions become available.

QuickKeys is to inter-process communication what Rev is to GUI 
development:  a high-level (and kinda fun) way to solve a low-level problem.

Even if Apple fixes their System Events, not everyone wants to script 
when there are robust point-and-click alternatives like QuickKeys.  It's 
a useful product.

> But System Events commands do not work on some applications.
 > This is a known problem and is discussed on related lists.

Has it been addressed on lists where Apple may be able to fix it?

I've had no need to script with System Events myself (my job requires me 
to avoid platform-specific technologies where possible).  What's Apple's 
timeline for fixing their System Events?

>>AppleScript is the Apple-sanctioned method for implementing
>>inter-process communication.  Rev can run AppleScript.
>
> You are missing the whole point here.
> 
> I know very well what applescript can do when communicating with
> scriptable applications. It can do what those scriptable apps allow it to
> do. But frequently there are actions that are not available in the
> dictionary of the target app. In such cases you need to manipulate the app
> through its GUI.
> 
> So you look for tools that make scripted GUI manipulation possible. Those
> tools include iKey and Quickeys; and in pre-X Mac, Facespan. I am trying
> to find out if Rev has these features. Apparently it does not.

I know of only two ways to control other apps:  AppleScript, as we've 
been discussing, and system-level APIs which will let you hook into the 
  event mechanism.

Rev supports AppleScript, and Rev supports an interface to allow you to 
write externals to communicate between Transcript and OS APIs.

What do you want to do that is not covered by these?  What third 
mechanism is iKey using?

-- 
  Richard Gaskin
  Fourth World Media Corporation
  ___________________________________________________________
  Ambassador at FourthWorld.com       http://www.FourthWorld.com


More information about the use-livecode mailing list