Fix a bit to work with ObjAsm32 ;)



.................
Set MACRO p@r@meter:vararg
LOCAL $txt,t@,$command,$var,t1@
$txt EQU <p@r@meter>

t@ INSTR $txt,<=>
if t@
$var SUBSTR $txt,1,t@-1
$var CATSTR <mov >,$var,<,eax>
$command SUBSTR $txt,t@+1
endif
t@ INSTR $command,<invoke >
IF t@
$command
ELSE
t1@ INSTR $command,<New >
IF t1@
$command
ELSE
$command CATSTR <mov eax,>,$command
$command
ENDIF
ENDIF
$var
endm



Testing :

ClsOnLButtonDown proc hwnd:HWND,myDblClk:BYTE,x:DWORD,y:DWORD,keyFlags:DWORD
LOCAL result :DWORD
LOCAL test1:DWORD
Set result = invoke MessageBox,NULL,CTXT("Hello World"),CTXT("Hello"),MB_OKCANCEL
.if result==IDOK
Set test1= CTXT("Hello from Set")
invoke MessageBox,NULL,test1,CTXT("Hello"),MB_OK
.endif
ret
ClsOnLButtonDown endp


Modified to accept New ( which use in ObjAsm32 ).

.data
pVar Pointer NULL
.code
Set pVar=New Obj
Posted on 2004-03-24 06:59:08 by dreamweaver