evaluate the "it" variable in an external

Alex Rice alex at mindlube.com
Sun Dec 21 05:11:07 EST 2003

On Dec 21, 2003, at 2:58 AM, jbv wrote:

> I'm not 100% sure this is the best answer to your question, but if I
> wanted to use an "ask" dialog, I would either :
> 1) use "ask" in Rev and then pass the content of it as an argument in
> the external call, even if it forces my script to make multiple calls 
> to
> the external
> 2) build my own custom "ask" dialog in the external (using some C
> librairy)

Thanks JB- actually I'm going the other direction. Pulling answers into 
the external on the external's request, instead of pushing answers in 
via messages from transcript. I don't know if that makes sense. Here is 
what I'm currently doing though- and it works well enough:

// the C
result = EvalExpr("revclipsAsk()", &retval);

// the transcript
function revclipsAsk
   ask info "Your input:" titled "CLIPS input"
   if it <> empty then
     return it
   end if
   return the result
end revclipsAsk

BTW if this looks like a strange use of EvalExpr it's because I'm 
writing a bunch of user functions for CLIPS, in C, that talk to the Rev 
engine and do things like evaluate expressios, get and set variables, 
send messages, etc.

Alex Rice <alex at mindlube.com> | Mindlube Software | 

what a waste of thumbs that are opposable
to make machines that are disposable  -Ani DiFranco

More information about the Use-livecode mailing list