You could try to apply a modification to macros this way:
include 'win32ax.inc'
macro pushd value {
pushd value
offset@stack = offset@stack + 4
}
macro invoke statement& {
define esp (esp+offset@stack)
offset@stack = 0
invoke statement
restore esp
}
.code
start:
push string1
invoke MessageBox,HWND_DESKTOP,dword [esp],invoke GetCommandLine,MB_OK
invoke ExitProcess,0
string1:
db 'Hello!',0
.end start
But this only adds a layer of processing to the outermost "invoke" - if you wanted to make it work correctly inside a nested statements too, you'd have to modify the allow_nesting macro in win32ax.inc and store/restore the stack offsets at every level of nesting.