1. Eu For Win & console app launching
- Posted by Grape Vine <g__vine at hotmail.com> Jun 02, 2001
- 505 views
I have a email app called Blat, I want to make a gui for it. Tho i cant seam to launch a console app in anyway with out a console coming up(yea, i know how that sounds). Is there a way to make a Eu GUI for a console app and not have a console pop up? Grape Vine 13728824
2. Re: Eu For Win & console app launching
- Posted by pampeano at ROCKETMAIL.COM Jun 02, 2001
- 472 views
Have you tried using ShellExecuteEx from the windows API ? It's wrapped in win32lib, and it's very easy to wrap if you're not using that lib. Best regards, Guillermo BonvehĂ --- Grape Vine <g__vine at hotmail.com> wrote: > > > > I have a email app called Blat, I want to make a gui for it. Tho i > cant > seam to launch a console app in anyway with out a console coming > up(yea, > i know how that sounds). Is there a way to make a Eu GUI for a > console > app and not have a console pop up? > > > Grape Vine > 13728824 > > > >
3. Re: Eu For Win & console app launching
- Posted by jjnick at cvn.com Jun 02, 2001
- 443 views
I just finished my project today (at least it's in Beta now) using my version of win32lib's shellExecuteEx . . . I have delved in all the API calls to call ShellExecute, ShellExecuteEx, and CreateProcess, and even Euphoria's shell() & shell_exec(). Had all kinds of console and Windows 2000 issues to work out. Let me know if you need help . . .
5. Re: Eu For Win & console app launching
- Posted by jjnick at cvn.com Jun 03, 2001
- 459 views
This is a multi-part message in MIME format. ------=_NextPart_000_001D_01C0EC7C.072F15C0 charset="iso-8859-1"
6. Re: Eu For Win & console app launching
- Posted by jjnick at cvn.com Jun 03, 2001
- 454 views
Your email client must not accept attachments so hear it is, juse cut & paste : -- This routine will call a DOS console, suspend euphoria window (code), -- then revert back to the window once the DOS console is done. -- -- Of course, euphoria's system() does the same thing, but does not -- work in Windows 2000: the euphoria program continues running even -- if the DOS console is still running. Calling system_exec() works -- under 2000 but the console is not released when finished. -- -- Please Note: the "/c" switch in the call to "command.com" will exit -- the DOS console when finished. -- -- Have to use the API CreateProcess() because it is the only function -- that works with WaitForSingleObject(), given the context of the -- requirement outlined above. -- -- Jason Nickerson include win32lib.ew without warning global constant TRUE = 1, FALSE = 0, NORMAL_PRIORITY_CLASS = 32, INFINITE = -1 global constant cb = allot( DWord ), lpReserved = allot( Ptr ), lpDesktop = allot( Ptr ), lpTitle = allot( Ptr ), dwX = allot( DWord ), dwY = allot( DWord ), dwXSize = allot( DWord ), dwYSize = allot( DWord ), dwXCountChars = allot( DWord ), dwYCountChars = allot( DWord ), dwFillAttribute = allot( DWord ), dwFlags = allot( DWord ), wShowWindow = allot( Word ), cbReserved2 = allot( Word ), lpReserved2 = allot( Ptr ), hStdInput = allot( Hndl ), hStdOutput = allot( Hndl ), hStdError = allot( Hndl ), SIZEOF_STARTUPINFO = allotted_size() global constant hProcess = allot( Hndl ), hThread = allot( Hndl ), dwProcessId = allot( DWord ), dwThreadId = allot( DWord ), SIZEOF_PROCESSINFO = allotted_size() object rv global integer createProcess global integer closeHandle global integer waitProcess constant Win = create ( Window, "CreateProcess() Example", 0, Default, Default, 255, 100, 0 ), btRun = create ( PushButton, "Run Example", Win, 10, 10, 225, 50, 0 ) ---------------------- -- onLoad_Win ---------------------- procedure onLoad_Win() atom k32 k32 = open_dll("kernel32.dll") if k32 = 0 then rv = message_box(sprintf( "%s", { "FATAL ERROR opening \"kernel32.dll\" - Aborting . . ." } ), "CreateProcess", MB_ICONERROR+MB_TASKMODAL ) abort(-1) end if createProcess = define_c_func(k32, "CreateProcessA", {C_POINTER, C_POINTER, C_POINTER, C_POINTER, C_INT, C_LONG, C_POINTER, C_POINTER, C_POINTER, C_POINTER}, C_INT) closeHandle = define_c_func(k32, "CloseHandle", {C_LONG}, C_INT) waitProcess = define_c_func(k32, "WaitForSingleObject", {C_LONG, C_LONG}, C_LONG) end procedure ---------------------- -- onClick_btRun ---------------------- procedure onClick_btRun() atom memset1 atom memset2 atom memset3 atom ptProcess atom ptStartup atom pCommand atom pCurrentDir memset1 = new_memset() ptProcess = acquire_mem(memset1, SIZEOF_PROCESSINFO ) memset2 = new_memset() ptStartup = acquire_mem(memset2, SIZEOF_STARTUPINFO ) memset3 = new_memset() pCommand = acquire_mem(memset3, "command.com /c dir" ) pCurrentDir = acquire_mem(memset3, "C:\\" ) if not c_func(createProcess, { NULL, pCommand, NULL, NULL, TRUE, NORMAL_PRIORITY_CLASS, NULL, NULL, ptStartup, ptProcess } ) then rv = message_box(sprintf( "%s", { "Error starting CRC engine . . ." } ), "CreateProcess", MB_ICONERROR+MB_TASKMODAL ) release_mem(memset1) release_mem(memset2) release_mem(memset3) return end if setVisible(Win, False) -- Don't necessarily need this but if not used, the window goes funny -- Now, wait for the DOS console to end before continuing on with the code rv = c_func(waitProcess, { fetch(ptProcess, hProcess), INFINITE}) rv = c_func(closeHandle, { fetch(ptProcess, hProcess) }) setVisible(Win, True) -- Don't necessarily need this but if not used, the window goes funny release_mem(memset1) release_mem(memset2) release_mem(memset3) end procedure ------------------ -- E V E N T S ------------------ onClick [ btRun ] = routine_id( "onClick_btRun" ) onOpen [ Win ] = routine_id( "onLoad_Win" ) ------------------------- -- START WINDOW ------------------------- WinMain( Win, Normal ) ----- Original Message ----- From: "Grape Vine" <g__vine at hotmail.com> To: "EUforum" <EUforum at topica.com> Sent: Sunday, June 03, 2001 11:44 PM Subject: RE: Eu For Win & console app launching > > jjnick at cvn.com wrote: > > Here it is, but remember, the Euphoria and win32lib libraries of shell > > functions work just fine except for the Windows 2000, e.g., calling > > Euphoria's system() under Windows 2000 doesn't wait for the process to > > finish, system_exec() works but doesn't close the console window, same > > thing > > with win32lib's shellExecuteEx(). Here is the code to take care of this > > . . > > . > Eh, Where? > > Grape Vine > 13728824 >