|
|||
|
According to the Documentation, The Shell.run method returns the window object.
My experience is that this varies greatly depending upon the applicaton that you're trying to launch. For example, if I write... window = Shell.run( "notepad.exe"); Dialogs.msgBox(window.handle); Then the dialog box correctly shows the handle value. If, however, I write... window = Shell.run( C:\\\\Program Files\\norton antivirus\\navw32.exe"); Dialogs.msgBox(window.handle); Then the dialog box shows "Undefined", even though the appplication DOES LAUNCH (the window successfully comes up). Do you have any insights? TIA Steve |
|
|||
|
Yes, it is possible that the "run" method returns undefined, because after launching the new program, it may not create and show its main window immediately. The "run" method has to wait for it to finish its initialization and display its main window. However, the "run" method does not wait long, but just returns undefined, because that would block the main movie. Although the run method may return undefined, you still can get the window handle of the newly created program later by using the Window.find method.
|
|
|||
|
thank you so quick response.
I use explore sample to test, my app is a dos console name as s.exe , in runCalc code:winCalc=Shell.run(getAdditionalFile("s.exe")) ; in closeCalc code: test=winCalc.find(null,"s"); Dialogs.msgBox(test.handle); but it's still undefinded. may be the name of window is wrong? |
|
|||
|
In the closeCalc script, please use
Code:
test=Window.find(null,"s"); |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|