Sign in to follow this  
Followers 0
ChiefORZ66

Help, Help!

7 posts in this topic

#include <GUIConstants.au3>
$gui = GUICreate("GUI",230,170)
$filemenu = GUICtrlCreateMenu("File")
$optitem = GUICtrlCreateMenuitem("Options",$filemenu)
$separator = GUICtrlCreateMenuitem ("",$filemenu,7)
$exititem = GUICtrlCreateMenuitem ("Exit",$filemenu)
GUISetState()

While 1
    $msg = GUIGetMsg(1)
    Select
    case $msg[0] = $exititem OR $msg[0] = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg[0] = $optitem
        GUISwitch($gui)
        $optgui = GUIOpt()
        GUIDelete()
    EndSelect
WEnd
Func GUIOpt()
    $gui2 = GUICreate("Options", 195, 89, -1, -1,$WS_POPUP)
    GUICtrlCreateTab(5, 5, 189, 83)
    GUICtrlCreateTabItem("Generally")
    $optab = GUICtrlCreateButton("Abort", 130, 54,40, 20)
    GUISetState(@SW_SHOW)
    
    While 1
        $optmsg = GUIGetMsg()
        Select
        Case $optmsg = $optab
            GUIDelete($gui2)
            GUISwitch($gui)
        EndSelect
    WEnd
EndFunc

Help, when i click on "Abort" in the GUI "Options" It needs more than 10 seconds that it again reacted!!!Help


[font="Times New Roman"]Jeder Narr kann Code schreiben, den ein Computer versteht.Gute Programmierer schreiben Code, den Menschen verstehen.[/font]visit http://kanreff.tk

Share this post


Link to post
Share on other sites



You need an ExitLoop somewhere, you're getting stuck in an infinit loop.

Kurt


Awaiting Diablo III..

Share this post


Link to post
Share on other sites

Wha?Wha?What?


[font="Times New Roman"]Jeder Narr kann Code schreiben, den ein Computer versteht.Gute Programmierer schreiben Code, den Menschen verstehen.[/font]visit http://kanreff.tk

Share this post


Link to post
Share on other sites

Maybe... Maybe... Maybe...

#include <GUIConstants.au3>
$gui = GUICreate("GUI",230,170)
$filemenu = GUICtrlCreateMenu("File")
$optitem = GUICtrlCreateMenuitem("Options",$filemenu)
$separator = GUICtrlCreateMenuitem ("",$filemenu,7)
$exititem = GUICtrlCreateMenuitem ("Exit",$filemenu)
GUISetState()

While 1
    $msg = GUIGetMsg(1)
    Select
    case $msg[0] = $exititem OR $msg[0] = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg[0] = $optitem
        ;GUISwitch($gui)
        $optgui = GUIOpt()
        ;GUIDelete()
    EndSelect
WEnd
Func GUIOpt()
    $gui2 = GUICreate("Options", 195, 89, -1, -1,$WS_POPUP)
    GUICtrlCreateTab(5, 5, 189, 83)
    GUICtrlCreateTabItem("Generally")
    $optab = GUICtrlCreateButton("Abort", 130, 54,40, 20)
    GUISetState(@SW_SHOW)
    
    While 1
        $optmsg = GUIGetMsg()
        Select
        Case $optmsg = $optab
            GUIDelete($gui2)
            ExitLoop
        EndSelect
    WEnd
EndFunc

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Help, when i click on "Abort" in the GUI "Options" It needs more than 10 seconds that it again reacted!!!Help

Please state your query in a form readable to the rest of the human language.

Edit:, wow, 3 posts while I was typing this...

Edited by fear1313

[center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Missing a return in the loop:

#include <GUIConstants.au3>
Opt("TrayIconDebug", 1) 
$gui = GUICreate("GUI", 230, 170)
$filemenu = GUICtrlCreateMenu("File")
$optitem = GUICtrlCreateMenuitem("Options", $filemenu)
$separator = GUICtrlCreateMenuitem("", $filemenu, 7)
$exititem = GUICtrlCreateMenuitem("Exit", $filemenu)
GUISetState()

While 1
    $msg = GUIGetMsg(1)
    Select
        Case $msg[0] = $exititem Or $msg[0] = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg[0] = $optitem
            GUISwitch($gui)
            $optgui = GUIOpt()
    EndSelect
WEnd
Func GUIOpt()
    $gui2 = GUICreate("Options", 195, 89, -1, -1, $WS_POPUP)
    GUICtrlCreateTab(5, 5, 189, 83)
    GUICtrlCreateTabItem("Generally")
    $optab = GUICtrlCreateButton("Abort", 130, 54, 40, 20)
    GUISetState(@SW_SHOW)

    While 1
        $optmsg = GUIGetMsg()
        Select
            Case $optmsg = $optab
                GUISwitch($gui)
                GUIDelete($gui2)
                Return
        EndSelect
    WEnd
EndFunc   ;==>GUIOp
Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

THX a lot!


[font="Times New Roman"]Jeder Narr kann Code schreiben, den ein Computer versteht.Gute Programmierer schreiben Code, den Menschen verstehen.[/font]visit http://kanreff.tk

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