Re: How to run Eu pgm FROM Eu pgm, with PARAMETERS (for 2nd Eu pgm)
- Posted by Dan_M Jul 11, 2009
- 1204 views
ok, I'll try what I was doing on another machine with later version of Win32Lib, 70 something, & see what happens.
Here's what I was doing:
-- code generated by Win32Lib IDE v0.20.1 include Win32Lib.ew without warning -------------------------------------------------------------------------------- -- Window Window1 constant Window1 = createEx( Window, "File Compare Wrap", 0, Default, Default, 587, 356, 0, 0 ) constant StatusBar11 = createEx( StatusBar, "StatusBar11", Window1, 0, 0, 0, 0, 0, 0 ) constant PushButton4 = createEx( PushButton, "Pick First File", Window1, 228, 20, 88, 28, 0, 0 ) constant PushButton5 = createEx( PushButton, "Pick Second File", Window1, 360, 20, 88, 28, 0, 0 ) constant PushButton6 = createEx( PushButton, "Compare", Window1, 480, 20, 88, 28, 0, 0 ) constant LText3 = createEx( CText, "Select a Compare Utility To Use", Window1, 24, 24, 168, 20, 0, 0 ) constant List2 = createEx( List, "List2", Window1, 32, 52, 148, 120, 0, 0 ) constant LText7 = createEx( LText, "Compare:", Window1, 32, 196, 64, 20, 0, 0 ) constant EditText8 = createEx( EditText, "EditText8", Window1, 112, 196, 652, 20, w32or_all({ES_READONLY}), 0 ) constant EditText10 = createEx( EditText, "EditText10", Window1, 112, 228, 656, 20, w32or_all({ES_READONLY}), 0 ) constant LText9 = createEx( LText, "With:", Window1, 32, 232, 64, 20, 0, 0 ) --------------------------------------------------------- -------------------------------------------------------------------------------- sequence FirstFile, SecondFile integer Index -------------------------------------------------------------------------------- procedure Window1_onActivate (integer self, integer event, sequence params)--params is () addItem(List2, "diff11.ex") addItem(List2, "diff21.ex") addItem(List2, "diff30.ex") addItem(List2, "diff40.ex") addItem(List2, "diff50.ex") end procedure setHandler( Window1, w32HActivate, routine_id("Window1_onActivate")) -------------------------------------------------------------------------------- procedure PushButton4_onClick (integer self, integer event, sequence params)--params is () FirstFile = getOpenFileName(Window1,"",{"Euphoria Windows Programs","*.exw", "Euphoria dos","*.ex"}) setText(EditText8, FirstFile) end procedure setHandler( PushButton4, w32HClick, routine_id("PushButton4_onClick")) -------------------------------------------------------------------------------- procedure PushButton5_onClick (integer self, integer event, sequence params)--params is () SecondFile = getOpenFileName(Window1,"",{"Euphoria Windows Programs","*.exw", "Euphoria dos","*.ex"}) setText(EditText10, SecondFile) end procedure setHandler( PushButton5, w32HClick, routine_id("PushButton5_onClick")) -------------------------------------------------------------------------------- procedure PushButton6_onClick (integer self, integer event, sequence params)--params is () integer scode sequence aCompare --For versions 1.1 and 5.0, the syntax is as follows: --ex diffnn <file1> <file2> [<option>] [<time_limit>] --For versions 2.1, 3.0 and 4.0, the syntax is as follows: --ex diffnn <file1> <file2> [<option>] if Index = 1 or Index = 5 then aCompare = "diff11.ex" elsif Index = 2 then aCompare = "diff21.ex" elsif Index = 3 then aCompare = "diff30.ex" elsif Index = 4 then aCompare = "diff40.ex" elsif Index = 5 then aCompare = "diff50.ex" end if scode = shellExecuteEx ( "open", "ex.exe", sprintf("%s %s %s", {aCompare, FirstFile, SecondFile}), 0,SW_NORMAL , 0) setText(StatusBar11, sprint(scode)) end procedure setHandler( PushButton6, w32HClick, routine_id("PushButton6_onClick")) -------------------------------------------------------------------------------- procedure List2_onChange (integer self, integer event, sequence params)--params is () Index = getIndex(List2) end procedure setHandler( List2, w32HChange, routine_id("List2_onChange")) WinMain( Window1,Maximize )
Dan