Delay a function - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Thread: Delay a function (/showthread.php?tid=64714) Delay a function by Inuyasha on 08-09-2006 at 06:01 PM
Hello everybody RE: Delay a function by Spunky on 08-09-2006 at 08:49 PM
Try using the AddTimer function and OnTimer() event for the delay. code:To call the function: code: Hope this is what you wanted RE: Delay a function by Inuyasha on 08-10-2006 at 06:38 AM
Thx alot, i needed this RE: Delay a function by leachy08 on 08-10-2006 at 07:29 AM
To add a timer you can use this code to start the timer: code: And then this code to find when the timer's time interval is reached. code: If you want to make the timer run just once then you can use: MsgPlus.CancelTimer("atimerid") after you code in the OnEvent_Timer function above (Just after comment). Alternatively if you want to make your program goto sleep using a Sleep() Sleep Function But it will not let you use WLM whilst it is sleeping. RE: Delay a function by Inuyasha on 08-10-2006 at 09:19 AM
Thx, but now i have this script: code: But the timer won't work. I don't get it. (Srry for tree, but the code tags filters tabs ) RE: Delay a function by RaceProUK on 08-10-2006 at 09:23 AM Why have you put OnEvent_Timer() inside the other function? Put it outside. RE: RE: Delay a function by Inuyasha on 08-10-2006 at 09:29 AM
quote:You mean like this? : code: (Srry, but im yet a noob with this stuff ) This script won't work either. RE: Delay a function by RaceProUK on 08-10-2006 at 09:32 AM
code: RE: RE: Delay a function by Inuyasha on 08-10-2006 at 09:39 AM
quote:Im getting an error which says "ChatWnd.SendMessage" is not defined.... RE: Delay a function by RaceProUK on 08-10-2006 at 09:43 AM
That's because there's no way at the moment for OnEvent_Timer() to know which chat window it's using. RE: RE: Delay a function by Inuyasha on 08-10-2006 at 09:49 AM
quote:Oke, allright. I get it now. But no change to make it work properly? :x Anyway, many thx to all |