Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-12-2005, 04:33 PM
Junior Member
 
Join Date: Dec 2005
Posts: 14
Default Prevent another instance.

My application is not responding for the code pasted bellow.
Followings are the application definitions that I have set.
1. Window shape –Rectangle
2. Boarder – none
3. Boader icon- N/A
4. Scale – 100%
5. Caption/taskbar text – ulc (same, placed in the coding as wnd name)
6.also SysTray.useDefaultHandler = false;

Code:
var wnd = Window.getWindowsByName(ulc);
var w = getMainWnd();
var has = false;

for (i = 0; i < wnd.length(); i++)
{

if (wnd[i].handle != w.handle)
{
has = true;
break;
}

}

if (has)
{

wnd[i].bringToTop();
return false;

}

//function1 ()
//function2 ()

return true;
Reply With Quote
  #2 (permalink)  
Old 12-14-2005, 12:15 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Prevent another instance.

Please try var wnd = Window.getWindowsByName("ulc"); ?
Reply With Quote
  #3 (permalink)  
Old 12-15-2005, 05:14 AM
Junior Member
 
Join Date: Dec 2005
Posts: 14
Default Re:Prevent another instance.

I tried same, but It wont work, Then what I did was just prompted the values to check,
var wnd = Window.getWindowsByName("ulc");
var w = getMainWnd();
prompted values were wnd ="" (no value) and
w = [object window] ( these text including sq brackets)
What am I supposed to do now?
Do I need to trace these values?

-Thanks.
Reply With Quote
  #4 (permalink)  
Old 12-17-2005, 11:02 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:Prevent another instance.

Code:
for (i = 0; i < wnd.length(); i++)
                                      ^
should be

Code:
for (i = 0; i < wnd.length; i++)
Reply With Quote
  #5 (permalink)  
Old 12-18-2005, 06:14 AM
Junior Member
 
Join Date: Dec 2005
Posts: 14
Default Re:Prevent another instance.

it's working fine now, Thank a lot.
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 02:07 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.