Jump to content
Sign in to follow this  
Komawoyo

Sending Other Commands while in while

Recommended Posts

Komawoyo

i want to know if i can send other commands while a function is going on

the close and minimize button wont work after i hit my "start" button.... i want to learn how to do this because it would also help me find the way to Pause and Unpause while a function is Going

ive tried the GUICtrlSetOnEvent but that would work..or i just dont know how to use it..<< haha

my code structure is something like this

#include <GUIConstants.au3>

HotKeySet ("{ESC}", "End")

$oIE = ObjCreate ("Shell.Explorer.2")
$Form = GUICreate ("Gui", 742, 386, 159, 245, -1)
$GuiActiveX = GUICtrlCreateObj ($oIE, 10, 10, 722, 320)
$GUI_Button_Start = GUICtrlCreateButton ("Start", 670, 344, 55, 30, 0)
GUISetState (@SW_SHOW)
$oIE.navigate ("http://www.google.com")

While 1
    $nMsg = GUIGetMsg ()
    Select
        Case $nMsg = $GUI_EVENT_CLOSE
            Exit
        Case $nMsg = $GUI_EVENT_MINIMIZE
            GUISetState (@SW_HIDE, $Form)
        Case $nMsg = $GUI_Button_Start
        For $X = 1 To 10
        MsgBox( 0, "", "")
        Sleep (2000)
    Next
    EndSelect
WEnd
Func End()
    Exit
EndFunc

Share this post


Link to post
Share on other sites
JustinReno

ive tried the GUICtrlSetOnEvent but that would work..or i just dont know how to use it..<< haha

Its in the Help File.

Share this post


Link to post
Share on other sites
Komawoyo

Its in the Help File.

lmao.. ok i know its in the help file...it set up my codes and every single button works fine ....but when i try to send another func while "start" button is still going..it wont work!!

Share this post


Link to post
Share on other sites
JSunn

lmao.. ok i know its in the help file...it set up my codes and every single button works fine ....but when i try to send another func while "start" button is still going..it wont work!!

Hi,

Can you give an explanation about what you are building here? What is the start button meant to do?

-John

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.