Sign in to follow this  
Followers 0
Sunblood

MsgBoxes won't timeout with the Yes/No option?

6 posts in this topic

I don't know if this is a bug or a feature, but message boxes won't close automatically when timing out if you have Yes/No buttons. It works fine with just the OK button, but I want to use Yes/No buttons with my timeout.


Share this post


Link to post
Share on other sites



check your syntaxes....

MsgBox(4, "title", "text", 5)


mouse not found....scroll any mouse to continue.

Share this post


Link to post
Share on other sites

Does NOT work:

$m = MsgBox(36, "New torrent!", "Old torrent: " & $old & @CRLF & "New torrent: " & $new & @CRLF & "Download this torrent?", 15)

DOES work:

$m = MsgBox(0, "New torrent!", "Old torrent: " & $old & @CRLF & "New torrent: " & $new & @CRLF & "Download this torrent?", 15)

Also, I know a LITTLE bit more about AI3 than you might think I do... Screwing up a MsgBox syntax is not something I'm likely to do.

Here's the whole script. It's designed to get the latest torrent from SuperTorrents and start it up if I want it to.

#include <IE.au3>

$time = 5 * 60 * 1000
$old = ""
$new = ""
$downloaded = "No"

While 1
    Tip("Checking for new torrents...")
    $ie = _IECreate("http://www.supertorrents.org/browse.php", 0, 0, 1)
    $links = _IELinkGetCollection($ie, 69)
    If IsObj($links) Then
        If $links.outertext <> $old Then
            Tip("New torrent found!")
            $new = $links.outertext
            $m = MsgBox(36, "New torrent!", "Old torrent: " & $old & @CRLF & "New torrent: " & $new & @CRLF & "Download this torrent?", 2)
            If $m = 7 Then
                $downloaded = "Yes"
                $torrent = _IELinkGetCollection($ie, 70)
                $torrent = $torrent.href
                $a = StringSplit($torrent, "/")
                $filename = $a[$a[0]]
                InetGet($torrent, "C:\Jack\Torrents\Torrent Files\New\" & $filename)
                ShellExecute ("C:\Jack\Torrents\Torrent Files\New\" & $filename)
                WinSetState("µTorrent", "", @SW_MINIMIZE)
            ElseIf $m = 6 Then
                $downloaded = "No"
            ElseIf $m = -1 Then
                FileWrite("missed.txt", $new & " - " & @HOUR & ":" & @MIN & " " & @MON & "/" & @MDAY & "/" & @YEAR & @CRLF)
            EndIf
            $old = $links.outertext
            $new = ""
        EndIf
        _IEQuit($ie)
    EndIf
    TipOff()
    Sleep($time)
WEnd

Func Tip($text)
;ToolTip($text&@CRLF&"Last torrent: "&$old&@CRLF&"Downloaded: "&$downloaded,0,0)
EndFunc  ;==>Tip
Func TipOff()
    ToolTip("")
EndFunc  ;==>TipOff

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Does NOT work:

$m = MsgBox(36, "New torrent!", "Old torrent: " & $old & @CRLF & "New torrent: " & $new & @CRLF & "Download this torrent?", 15)
I confirm. Seems like you found a bug with timeout with yes/no abort/retry/ignoreoption of Msgbox.

MsgBox(4, "title", @AutoItVersion, 1)

v3.2.1.11 does not timeout.

v3.2.1.1 does timeout. v3.2.0.1 does timeout.

Edit:

Incorrect version correction

Edited by MHz

Share this post


Link to post
Share on other sites

sorry abt tat Sunblood.

cos the eg worked for me...so i tot it was syntax errors.

was wrong abt it...apologies.


mouse not found....scroll any mouse to continue.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0