--- Duncan wrote:
> Yes please, do post an example.
Here's the script, which you may wish to save as
�TimedMsgBox.PowerPro� under your Scripts folder:
; --- script begins here
Local EventHandle
Static MsgBoxText = Arg(3)
If(Arg(1)) Do
; --- all one line below
EventHandle = Event.Create(Arg(1), 1, "." ++ ScriptName ++ "@Timeout")
; --- all one line above
EndIf
If(Arg(4) == "") Do
MessageBox(Arg(2), MsgBoxText)
Else
MessageBox(Arg(2), MsgBoxText, Arg(4))
EndIf
If(Event.Exists(EventHandle))
Event.Destroy(EventHandle)
Quit
@Timeout
Local HandleList = Win.HandleList("C=#32770", 0)
For(Local Iter = 1; Iter LE Word(HandleList, 0); Iter = Iter + 1)
Local Handle = Word(HandleList, Iter)
If(Win.ChildTextByIndex(Handle, 3) == MsgBoxText) Do
Win.Close(Handle)
Break
EndIf
EndFor
; --- script ends here
And now, for every situation where you would use:
MessageBox("Information", "Your text goes here.", "My Title")
You can use this (where the number is how long the box is shown):
.TimedMsgBox(5, "Information", "Your text goes here.", "My Title")
Cheers,
Alex
ICQ# 37414292
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/JV_rlB/TM
---------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/