strate Posted April 5, 2005 Share Posted April 5, 2005 Is it possible for a GUI to wait for user input instead of running a infinite loop? INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
zcoacoaz Posted April 6, 2005 Share Posted April 6, 2005 in a way autoit does that for you automaticly [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
strate Posted April 9, 2005 Author Share Posted April 9, 2005 How's this?? INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
zcoacoaz Posted April 10, 2005 Share Posted April 10, 2005 I'm not exactly sure but i do know that autoit does something to save CPU when it goes into a message loop [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
layer Posted April 10, 2005 Share Posted April 10, 2005 srate, could you please verify? Do you mean wait until a keystroke is sent? Or do you mean wait until a GUI button is pressed? Or like the C/C++ thingy for console apps, "getch()" where it just waits for any key to be pressed? Please verify... Thanks! FootbaG Link to comment Share on other sites More sharing options...
GaryFrost Posted April 10, 2005 Share Posted April 10, 2005 not sure how they keep the cpu usage down, but this shows it's not waiting #region --- GuiBuilder code Start --- ; Script generated by AutoBuilder 0.5 Prototype #include <GuiConstants.au3> GuiCreate("MyGUI", 392, 322,(@DesktopWidth-392)/2, (@DesktopHeight-322)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Button_1 = GuiCtrlCreateButton("Exit", 140, 170, 80, 40) GuiSetState() While 1 $msg = GuiGetMsg() ConsoleWrite("After GuiGetMsg" & @CR) Select Case $msg = $Button_1 ExitLoop Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit #endregion --- GuiBuilder generated code End --- SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now