Sign in to follow this  
Followers 0
OminousIdol

Question About Gui!

3 posts in this topic

Hello I just started to learn Autoit v3 and I downloaded the GUI becasue I want to learn that as well. My question is how do I keep the GUI open the at all times? After I click a button it closes! I did try to put it into a FUNC [GUIShow() // GUIWaitClose()]and then after I click the button have it call that FUNC to show the GUI again... But that didnt work out so well because if I clicked the button again it would close out! So I wondering how would I keep the GUI open at all times until the user clicks the X button or Alt F4!

Thank You

Share this post


Link to post
Share on other sites



So I wondering how would I keep the GUI open at all times until the user clicks the X button or Alt F4!

<{POST_SNAPBACK}>

Check out AutoItSetOption ( "option", param ) for default change..

Param:

0 = (default) button controls will close the dialog box , no notification for others.

1 = all controls will notify.

or GUISetControlNotify ( [controlref [,action]] ) to change it for one button...


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

Share this post


Link to post
Share on other sites

...My question is how do I keep the GUI open the at all times? After I click a button it closes!

<{POST_SNAPBACK}>

I was running into the EXACT same problem! I was REALLY confused about how to make it all work, so after perusing the forum and the help file, I put together a modification of one of the help scripts:

Opt("GuiNotifyMode",1)
GuiCreate ("Test-GUI", 200, 100)
$bAbout = GuiSetControl ("button", "About", 40, 40,50); About Button    
$bExit   = GuiSetControl ("button", "Exit", 110, 40,50); Exit Button
GuiShow() ; display the dialog box  
While GuiMsg () > 0
  if GuiRead () = $bAbout then MsgBox(0,"About","This is the About Box.")
  if GuiRead () = $bExit  then exit
Wend

It displays a small GUI window with an "About" button and an "Exit" button. Clicking the "Exit" button exits the program, and clicking "About" displays a Message Box...but the GUI windows stays displayed!

Kinda shows off AutoIT's power in simplicity.

Hopefully, you can use this as a model to better understand how it works...


Visit Jim's Tips for lots of cool tips on Gmail, SageTV, PDA's, and whatever else interests me!

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