Jump to content
Sign in to follow this  

Exitloop only

Recommended Posts


my do i exit my loop only without closing the whole gui??

Share this post

Link to post
Share on other sites

my do i exit my loop only without closing the whole gui??

If you are talking about the GUI message loop then the answer is "You don't". When you exit that loop the GUI will close period. If you are talking about another loop then something is wrong in your code. Just looking at the code you posted I can't tell for sure what that "something" might be.


Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver: - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post

Link to post
Share on other sites

I wanna check if its a number there're typed in the bumps editbox then pressing on the write post button

#include <GUIConstants.au3>
#include <IE.au3> 
$BumpTimer = TimerInit()
$versionNumber = "1.0"
$version = "Beta " & $versionNumber
$4HourBump = 60*60*4*1000
$i = 0
GUICreate("BumpBot " & $version, @DesktopWidth/2, @DesktopHeight/2) ; will create a dialog box that when displayed is centered
$GuiIcon = GUISetIcon ("coins.ico")  
$TrayIcon = TraySetIcon("coins.ico")
$ExitItem = TrayCreateItem("Close")
GUICtrlCreateTab(0, 0, @DesktopWidth/2, @DesktopHeight/2)
$Button_1              = GUICtrlCreateButton ("Write Post",  20, 330, 100)
$topicmes              = GUICtrlCreateEdit("Write your topic message here...", 20, 30, 180, 30, $WS_DLGFRAME)
$postmes               = GUICtrlCreateEdit("Write your post message here...", 20, 70, 180, 180, $WS_DLGFRAME)
$TradeEuropeLadder     = GUICtrlCreateRadio("Trade Europe Ladder", 250, 30)
$TradeEuropeNoNLadder  = GUICtrlCreateRadio("Trade Europe NonLadder", 250, 50)
$TradeUswestNoNLadder  = GUICtrlCreateRadio("Trade Usweset NonLadder", 250, 70)
$TradeUswestNoNLadder  = GUICtrlCreateRadio("Trade Uswest Ladder", 250, 90)
$ManyBumps             = GUICtrlCreateEdit("Write how many bumps you" & @CRLF &  "wanna make in topic Must be numbers", 20, 260, 180, 50, $WS_DLGFRAME)
GUICtrlCreateTabItem("Send status")
GUICtrlSetState ($TradeEuropeLadder, $GUI_CHECKED)

GUISetState ()      ; will display an  dialog box with 2 button

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    $traymsg = TrayGetMsg()
        Case $msg = $GUI_EVENT_CLOSE
        Case $traymsg = $ExitItem
        Case $msg = $Button_1
            $postmes2 = GUICtrlRead($postmes)
            $topicmes2 = GUICtrlRead($topicmes)
            $ManyBumps2 = GUICtrlRead($ManyBumps)
            ;Look down Here
            while 1
            If StringRegExp($ManyBumps2, "^\d+$") = 0 Then         
            ;stop looking
            If BitAND(GUICtrlRead($TradeEuropeLadder), $GUI_CHECKED) Then
                $oIE = _IECreate("http://forums.d2jsp.org/index.php?showforum=170")
            ElseIf BitAND(GUICtrlRead($TradeEuropeNoNLadder), $GUI_CHECKED) Then
                $oIE = _IECreate("http://forums.d2jsp.org/index.php?showforum=54")
            ElseIf BitAND(GUICtrlRead($TradeUswestNoNLadder), $GUI_CHECKED) Then
                $oIE = _IECreate("http://forums.d2jsp.org/index.php?showforum=53")
            ElseIf BitAND(GUICtrlRead($TradeUswestNoNLadder), $GUI_CHECKED) Then
                $oIE = _IECreate("http://forums.d2jsp.org/index.php?showforum=168")
            _IELoadWait ($oIE)
            WinSetState($oIE, "", @SW_MINIMIZE)
            _IELinkClickByText ($oIE, "new topic")
            _IELoadWait ($oIE)
            $oform = _IEFormGetObjByName($oIE, "REPLIER")
            $IE_PostMes = _IEFormElementGetObjByName($oform, "post")
            $IE_TopicMes = _IEFormElementGetObjByName($oform, "ttitle")
            $IE_Submit = _IEFormElementGetObjByName ($oform, "preview")
            $IE_PostMes2 = _IEFormElementGetObjByName ($oform, "post")
            ; Set field values and submit the form
            _IEFormElementSetValue($IE_PostMes, $postmes2)
            _IEFormElementSetValue($IE_TopicMes, $topicmes2)
            _IEAction ($IE_Submit, "click")
                    If TimerDiff($BumpTimer) >= $4HourBump Then
                        _IELinkClickByText ($oIE, "Add Reply")
                        _IEFormElementSetValue($IE_PostMes2, "Bump")
                        _IEAction ($IE_Submit, "click")
                    $i = $i +1
                Until $i >= $ManyBumps

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