Sending Raw AppleEvents from AS

I wish to send a raw AppleEvent from an Applescript to an app that has handler set up, but no dictionary.
I can do this easily when the AppleEvent has only one param, but can’t get anything to work when it has multiple params! Apple’s documentation,
"[url=http://developer.apple.com/techpubs/macos8/InterproCom/AppleScriptScripters/AppleScriptLangGuide/AppleScript.63.html&quot]http://developer.apple.com/techpubs/macos8/InterproCom/AppleScriptScripters/AppleScriptLangGuide/AppleScript.63.html&quot[/url];
states that this is possible, but conveniently claims that it is simply not documented (in that guide).
Anyone know how to do this or know of any documentation I could look at?
-Allan
allan_hundhausen@keymail.com

Thought it was not possible send raw apple events to apps without “scripting terminology” (except for “open, print, run, quit”)…

Anyway, if you can send an apple event, which is this? What’s the app you’re trying to script? There are many ways to send parameters with events, such as “given blah, blah, blah”… But you need to know the kind of these parameters… If you could provide some extra info, such as these needed labeled parameters… :?: :slight_smile:

… Perhaps you can call C/C++ procedures embedded within certain apps… I can´t remember just now, but in AppleScript does exists an event called “·call subroutine·”… I don’t know if this concerns only to AS’s own subroutines, or you can extend this to other apps, such as the call procedure in ASStudio apps to other frameworks! :?:

JJ

Can you elaborate on this? Which app are you trying to send the Apple event to? What do you mean the app has handler set up?

Use labelled parameters (see p290+ of ASLG):

tell app "someApp"
   «event aaaabbbb» foo given «class yyyy»:bar, «class zzzz»:baz -- command foo label bar label baz
end

Ugly, but ought to do the trick.

(Tip: you can get a better feel for how raw events look and work by playing around with Smile editor’s Copy Translate feature.)