question on "widow.ew" of Thomas Parslow
- Posted by wooseob <wooseoblee at empal.com> Apr 27, 2005
- 487 views
The codes below is my test on the Thomas's window.e library. In the codes, firstly open 'notepad' prog with shellRun func. and then try to close it with window_PostCloseMessage procedure... but does'nt work.... Please let me know anyone what's wrong... ------------ code start here --------------------- constant shell32 = open_dll("shell32.dll") constant xShellExecute = define_c_func(shell32,"ShellExecuteA",{C_INT,C_INT,C_INT,C_INT,C_INT,C_INT},C_INT) function shellRun(sequence exe, sequence file, integer showMode) -- showMode: 0=hide, 1=normal, 3=maximize, 6=minimize atom exe_string, file_string, hwnd exe_string = allocate_string(exe) file_string = allocate_string(file) hwnd = c_func(xShellExecute,{0,0,exe_string,file_string,0,showMode}) free( exe_string ) free( file_string ) return hwnd end function include misc.e include window.ew -- include Thomas Parslow[PatRat]'s Library... atom hwnd hwnd=shellRun("notepad.exe","",6) sleep(5) window_PostCloseMessage(hwnd) -- attempt close notepad... but does'nt work ------------------ ends here -------------------------