(Good Scripters) What's wrong with this line???!!!???

Could some one please tell me what the He-double tooth picks is wrong with this line… It should work?

tell application “SuperCard 4.1.1” of machine “eppc://Jimmy Shoe:password@192.168.3.55” to «event do script» “TEXT”

NOTE: do script is part of the Supercard dictionary

It gives me a “syntax or execution error”

SIONCERE THANKS!!!

Do you get the error if you run this script?

tell application "SuperCard 4.1.1" of machine "eppc://Jimmy Shoe:password@192.168.3.55"  to activate

" «event do script» " is not a valid AppleScript event object code

AppleScript events are specified using a 4-character application string and a 4 character event id. “do script” is not, therefore, valid.

I don’t have SuperCard, so I don’t know what its event codes are, but I’m guessing something more like:

«SUPR dosc»

would be more appropriate, assuming “SUPR” is the application code for SuperCard - adjust as appropriate.

This event, typically, is part of the “miscellaneous suite”. In raw mode, «event miscdosc».
I understand this is really a “fake”-name event, since “do script” was thougth to execute applescript code, and the SuperCard one is concibed to execute its own internal language code (is it?).
Other examples of “fake”-name event with “do script” are the FileMaker’s one (which will execute scriptmaker scripts) or IE’s one (which will execute JavaScript).

If you wish averiguate which raw event is a command (eg, “do script”), you can use Smile. Go to menu “Script” > “tell…” and choose the related app (eg, “SuperCard”). Now, you can write any command owned by such app without a tell block:

do script "whatever"

Unfortunatelly, “do script” is one of the Smile’s commands. But if you save the script and open it in the Apple’s Script Editor, you’ll see this command in raw mode:

«event miscdosc» "whatever"

You can also browse the app’s dictionary from within Script Debugger and switch to “AppleEvents” instead “AppleScript”. And there are still some more ways to do it…