[futurebasic] Re: [FB] Running AppleScript from with FB^3 -- How?

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : June 2000 : Group Archive : Group : All Groups

From: Alain Pastor <apastor@...>
Date: Wed, 07 Jun 2000 10:37:57 +0200

Frank Seipel wrote:

> I receive the following error when attempting to compile the program
> that runs Applescripts under FB II:
>
> Error: FutureBASIC 3 requires new syntax for the old FBII CALL "rsrc",id,var...
> See: UNIVERSALPROC and UNVERSALFN
> in file Temp Project at line 80 in RUNAPPLESCRIPT
> *CALL "DCOD",2020*,osErr%,(ScriptResID_asLong&,ChangeToResult&)
>
> Unfortunately, I know very little about Toolbox calls.  Can anyone
> explain how I make this run?
>
> Many thanks in advance.
> -

Hello Frank

According the manual, I did the following and it seems to be OK:

CALL "DCOD",2020
OSErr% =
UNIVERSALFN(gFBCode&,_rtnWord_p1Long_p2Long,ScriptResID_asLong&,ChangeToResult&)
rHndl& = FN GETRESOURCE(_"DCOD",2020)
CALL HPURGE(rHndl&)
CALL HUNLOCK(rHndl&)

Cheers

Alain