Re: AppleScript Suite
Re: AppleScript Suite
- Subject: Re: AppleScript Suite
- From: JJ <email@hidden>
- Date: Thu, 18 Oct 2001 19:47:32 +0200
>
> What the heck is "Call.subroutine" (<<event ascrpsbr>>) and how it works?
>
>
on foo(bar)
>
>
translates into a handler for the subroutine event. Thus, calling
>
>
foo(bar)
>
>
generates a subroutine event in AppleEvents. This is basically how
>
AppleScript calls subroutines in scripts, by sending them this event. It's
>
very useful when attempting to call handlers within scripts from C code.
>
>
For an example of its use, check out my MoreOSA sample code:
>
>
http://www.seanet.com/~jonpugh/MoreOSA.html
>
>
Jon
>
>
> Two questions for "C string"
>
>
>
> 1.
>
> set C_String_Example to "example string" as C string
>
> --> <<data cstr6578616D706C6520737472696E6700>>
>
>
>
> set Example_2 to C_String_Example as string
>
> --> returns the script object itself, as "me"
>
>
>
> WHY?
>
>
>
> 2.
>
> How can I "set Converted_To_String to C_String as string"
>
>
These are for use in C code, not in AppleScript itself. There is no sensible
>
way to use these in a script.
>
>
I'm sure some folks can come up with nonsensical uses, but I doubt they can
>
find a good one.
>
>
Basically, a C string is a null terminated string. A Pascal string is
>
preceded by a length byte. Neither of these is used in AppleScript.
>
>
Jon
Yes, I look at the "C String" definition and saw the explaining about "null
terminated string".
If I open the "scpt" rsrc of a run-only script, what kind of data or
programming language is it? I can see the "null" and the appleevents, such
as "miscactv" (without the <<event>>), "cwin" (without the <<class>>), path
to used apps and their creator code, literal strings and variable names...
Can't we de-compile or "translate" that data?
What's the real difference beetwen "compilable" and "uncompilable" data?
JJ