11-21-2007, 11:02 AM
Bypassing the original Open dialog is not possible, but you can hide it.
Function AnyName
Trigger: !cv"Open" "#32770" "File &name:" "Static" /NOTEPAD
This function will run automatically whenever QM sees that Open dialog in Notepad is opened.
Function AnyName
Trigger: !cv"Open" "#32770" "File &name:" "Static" /NOTEPAD
int hwnd=val(_command) ;;get handle of Open dialog
;mov 10000 0 hwnd ;;hide the Open dialog. enable this line if works well
;g1
if(!inp(_s)) ;;i use inp for simplicity. replace it with your dialog code (ShowDialog etc)
,;Cancel
,clo hwnd
,ret
_s.setwintext(id(1148 hwnd)) ;;set text of 'File name:' edit box
but 1 hwnd; err ret ;;press OK
;wait until closed, because sometimes OK does not close it
wait 2 -WC hwnd
err ;;stil exists after 2 s
,int w2=win("Open" "#32770" "" 64 hwnd 0) ;;error message box?
,if(w2)
,,act w2
,,wait 0 -WC w2 ;;wait until closed and retry
,,goto g1 ;;retry
,mes "something wrong"
,clo hwndThis function will run automatically whenever QM sees that Open dialog in Notepad is opened.
