Re: How to run Eu pgm FROM Eu pgm, with PARAMETERS (for 2nd Eu pgm)

new topic     » goto parent     » topic index » view thread      » older message » newer message
Dan_M said...

On this machine, I'm running Win32Lib 0.60.5, under Eu 2.5, and when I run my "wrap", I get a return code of 5, and NOTHING seems to happen.

When I put a wait_key() at the end of one of the file compares, in case it was displaying in cmd window too quickly to see, I see NOTHING. That's why I was thinking maybe spaces in path made the file compare not run when executed by shellExecuteEx.

And the "diffxx.ex" file compares are in same folder as the GUI "wrap".

Any suggestions on debug?

I've just done some testing here and its all working just fine.

I'm using Euphoria 4 and win32lib 0.70.16, so I can't directly comment on the results you are getting with old version of the programs.

Here is the programs I used ...

-- Main test program 
include win32lib.ew 
 
constant win = create(Window, "Shell", 0, 0, 0, 500, 500, 0) 
constant btn = create(Button, "Do It", win, 10, 10, 50, 50, 0) 
constant res = create(EditText, "", win, 10, 100, 250, 30, 0) 
 
integer cnt = 0 
procedure click_Btn(integer self, integer event, sequence parms) 
    cnt += 1 
	setText( res, sprintf("%02d RC=%d",  
                    {cnt,  
                     shellExecuteEx("open",  
                                    "c:\\program files\\utils\\eui.exe",  
                                    {"c:\\temp\\tests.ex","Q","W R"}, 0, 0, 0) 
                    } 
                    ) 
               ) 
end procedure 
setHandler( btn, w32HClick,routine_id("click_Btn")) 
 
WinMain(win, Normal) 
 
-- Program that is invoked (tests.ex). 
sequence c = command_line() 
integer fh 
fh = open("c:\\temp\\test.res", "w") 
for i = 1 to length(c) do 
	printf(fh, "%2d '%s'\n", {i, c[i]}) 
end for 
close(fh) 

Results...

 1 'c:\program files\utils\eui.exe' 
 2 'c:\temp\tests.ex' 
 3 'Q' 
 4 'W R' 

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu