Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-06-2003, 04:23 AM
Junior Member
 
Join Date: May 2003
Posts: 9
Default Ask an external EXE file to hide and wait.

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.

\(@@)/ :
Reply With Quote
  #2 (permalink)  
Old 06-06-2003, 09:16 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: Ask an external EXE file to hide and wait.

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();
}
Reply With Quote
  #3 (permalink)  
Old 06-09-2003, 10:17 PM
Junior Member
 
Join Date: May 2003
Posts: 9
Default Re: Ask an external EXE file to hide and wait.

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.

Reply With Quote
  #4 (permalink)  
Old 06-11-2003, 10:51 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: Ask an external EXE file to hide and wait.

The window name is the text on the title bar.
Eg. window name of this topic is "SWFKit - forums - Microsoft Internet Explorer"
Reply With Quote
  #5 (permalink)  
Old 06-11-2003, 09:26 PM
Junior Member
 
Join Date: May 2003
Posts: 9
Default Re: Ask an external EXE file to hide and wait.

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
Reply With Quote
  #6 (permalink)  
Old 06-11-2003, 10:19 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: Ask an external EXE file to hide and wait.

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();
}
Reply With Quote
  #7 (permalink)  
Old 06-11-2003, 10:59 PM
Junior Member
 
Join Date: May 2003
Posts: 9
Default Re: Ask an external EXE file to hide and wait.

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.
Reply With Quote
  #8 (permalink)  
Old 06-12-2003, 12:07 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: Ask an external EXE file to hide and wait.

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(); 
}
It works fine on my computer.
Reply With Quote
  #9 (permalink)  
Old 06-12-2003, 01:41 AM
Junior Member
 
Join Date: May 2003
Posts: 9
Default Re: Ask an external EXE file to hide and wait.

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
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:55 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.