{Test Image Macro Language Extensions from UMacroDef.p, UMacroRun.p, etc.} var g: string; macro 'Dump One Symbol Table Entry'; var s: string; i: integer; begin RequiresUser('Utilities',1); s := 'which symbol table entry?' repeat i := GetNumber(s,0) if i < 1 then exit; s := DumpSymbolTable(i); until false; end; macro 'Dump Symbol Table to new text window'; var s: string; i: integer; begin RequiresUser('Utilities',1); RequiresUser('TextBuf',1); NewTextWindow('Image Macro Symbol Table'); i := 0; MakeNewTxB; repeat i := i + 1; s := DumpSymbolTable(i); AfterTxB(concat(s,chr(13))); {WriteLn(i, s);} until s = ''; copyFromTxB(1,LengthTxB); Paste; DisposeTxB; end; macro 'User Command'; var a,b: real; s: string; begin RequiresUser('Sample',1); a := GetNumber('a',1); b := 20; s := GetString('string',s); SampleCommand(a+1,s,b); ShowMessage('a = ',a,' b = ',b,' SampleStrFunc = ',SampleStrFun); end; macro 'Show initial value of global string'; begin g := GetString('global str',g); end; macro 'User Function'; var a: real; begin RequiresUser('Sample',1); a := GetNumber('a',1); ShowMessage('a = ',a,' SampleFunc(a) = ',SampleFunc(a)); end; macro 'Test RequiresUser'; var s: string; begin s := GetString('Extension package name','Sample'); RequiresUser(s,1); end;