try
Also, maybe the macro does not run because some other macro runs at that time. In Properties convert it to function or select "Run simultaneously".
Also, if possible, instead of hid let the macro hide the window in the same way as you do it manually.
int debug=1
int w=wait(300 WV win("Rapoo Wireless Driver" "#32770" "RapooWirelessDriver"))
rep
,hid w
,err
,,if(debug) out "closed"
,,ret
,wait 1 -WV w
,err
,,if(debug) out "failed to hide"
,,continue
,break
if(debug) out "now should be hidden"
Also, maybe the macro does not run because some other macro runs at that time. In Properties convert it to function or select "Run simultaneously".
Also, if possible, instead of hid let the macro hide the window in the same way as you do it manually.