What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Progresbar

Progresbar
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: Progresbar
quote:
Originally posted by Drakal
thx.. now i se that my old timer didnt loop :P but what should "oPlusWnd" be? window worked befor and window was  msgplus.createwnd(....) but now in timer it just opens alot of windows until it reaches 100%
You'll need to create a global variable and set that to the created window, and when it's destroyed you clear the variable again. When you declare it as global, you can use it wherever you like. I think you'll understand it better with the following style example:
code:
var MainWnd = false;

function OpenThingy() {
   MainWnd = MsgPlus.CreateWnd("XML", "WINDOWID");
   //Other stuff, like the timer
   Progress_SetStep(MainWnd.Handle, "PROGRESS", 10);
   MsgPlus.AddTimer("MyTimer", 500);
}

function OnEvent_Timer(sTimerId) {
   if(sTimerId == "MyTimer" && MainWnd != false) {
      //Do timer stuff
      Progress_StepIt(MainWnd.Handle, "PROGRESS");
      //Re-create timer
      MsgPlus.AddTimer("MyTimer", 500);
   }
}

function OnWINDOWIDEvent_Destroyed(PlusWnd) {
   MsgPlus.CancelTimer("MyTimer"); //Cancel timer
   MainWnd = false; //Clear global variable
}
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
09-16-2007 05:25 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Progresbar - by Drakal on 09-15-2007 at 05:10 PM
RE: Progresbar - by Matti on 09-15-2007 at 05:41 PM
RE: Progresbar - by Drakal on 09-15-2007 at 06:00 PM
RE: Progresbar - by Flash on 09-15-2007 at 11:28 PM
RE: Progresbar - by Matti on 09-16-2007 at 06:37 AM
RE: Progresbar - by Drakal on 09-16-2007 at 08:39 AM
RE: Progresbar - by Matti on 09-16-2007 at 10:01 AM
RE: Progresbar - by Drakal on 09-16-2007 at 12:02 PM
RE: Progresbar - by Matti on 09-16-2007 at 05:25 PM
RE: Progresbar - by Drakal on 09-17-2007 at 01:43 PM
RE: Progresbar - by Matti on 09-17-2007 at 05:05 PM
RE: Progresbar - by Drakal on 09-17-2007 at 08:31 PM
RE: Progresbar - by Matti on 09-18-2007 at 04:54 PM
RE: Progresbar - by Drakal on 09-18-2007 at 07:28 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On