Wednesday, January 05, 2005

Execscript kicks the Lama's ass

Andrew Ross-MacNeil turned me on to some interesting ideas with EXECSCRIPT at Devcon this year. I've always had a little program to set hot keys to clear my environment , build a project, ala Tom Rettig's CA.prg.

Writing conditional code from execution in a hotkey was always a bit limiting, but with EXECSCRIPT this is no longer true!



ON KEY LABEL f5 EXECSCRIPT ;
( ;
[ CLOSE ALL ] + CHR(10) + ;
[ CLEAR ALL ] + CHR(10) + ;
[ CLEAR ] + CHR(10) + ;
[ SET SYSMENU TO DEFAULT ] + CHR(10) + ;
[ BUILD APP myapp FROM myapp RECOMPILE ] + CHR(10) + ;
[ IF FILE("myapp.err") ] + CHR(10) + ;
[ MODIFY FILE myapp.err NOWAIT ] + CHR(10) + ;
[ ELSE ] + CHR(10) + ;
[ DO myapp ] + CHR(10) + ;
[ ENDIF ] ;
)

No comments: