|
|||
|
Hi,
This time, I have launched an external EXE application called Client.exe. From there, it will invoke an application which is done using SWFKit and Flash. Is there any other commands to hide and ask my Client.exe to hide and wait until user has quit from the invoked application without touching on the Client.exe file. In this case, Shell.runAndWait cannot be applied here because i am not able to do any editing in the Client.exe. Tks. \(@@)/ : ![]() |
|
|||
|
Code:
var client_window = Window.find(classname, windowname);
if (client_window != null) client_window.hide();
var wnd = getMainWnd();
wnd.onClose = function ()
{
if (client_window != null) client_window.show();
}
|
|
|||
|
Hi Thanks.
I have tried the method which you have mention in the initial page of SWFKit. But I am not too sure regarding Window.find(classname, windowname); As i did not know what is classname about, i have written the code in this way. var client_window = Window.find("EdClient"); where EdClient is my external exe file. But i still can swap to my Edclient .exe from the taskbar. ![]() |
|
|||
|
Hi,
Tks for the advice but i am having problem with the error [object window] . I have used Winamp3 as my external client and after i notice it cannot work according as i want, i trace it and get the above message in SWFKit trace window. My code is like this, var CW = Window.find([,"Winamp3"]); // As i did not know the classname trace(CW); if (CW != null) CW.hide(); var wnd = getMainWnd(); // I am in the projector called "Interface" trace(wnd); wnd.onClose = function () { if (CW != null) CW .show(); } It seem that even if i manage to execute the above code, it will hide my Winamp3 the first time only when i enter the projector. Or maybe i am wrong. As Winamp3 is run before i call the projector, i cannot use Shell.runAndWait command and i cannot edit winamp3. It there anyway to constant hiding it till my projector finished running or quit. Then Winamp3 will show up again. I would only want to keep one window show up to user at one time. Is it i must do a constant checking in my flash projector? If that the case, system resources will be high too. Sorry for the long question but as i need to hand up the project soon, so no choice. Thanks. Have a nice day. :P |
|
|||
|
Please copy the code into the "initialize" script
Code:
var CW = Window.find("WasabiIPC_Winamp3", "Winamp3");
if (CW != NULL) CW.hide();
var wnd = getMainWnd();
wnd.onClose = function ()
{
if (CW != null) CW.show();
}
|
|
|||
|
Hi,
I have put the code in the "initialize" script but it still cannot work as in the trace window, it gives me the error "using undefined variable "NULL". The winamp3 player still remain there. Tks. |
|
|||
|
Sorry, I tested the code with an alpha version of Winamp3, the class name of the main window is "wasabiipc_winamp3".
I downloaded a Winamp 3.0 full version from winamp.com just now and found that the class name is "STUDIO", then the code should be Code:
var CW = Window.find("STUDIO");
if (CW != null) CW.hide();
var wnd = getMainWnd();
wnd.onClose = function ()
{
if (CW != null) CW.show();
}
|
|
|||
|
Hi Tks.
I have managed to run the code and it work. But how do you find a classname for any application because i am only using winamp3 as an example. For example, how do I go about hiding an application called Edclient.exe. I discovered that by having a classname can make that code work rather than having it's window name. ;D |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|