DexterMorgan Posted June 25, 2008 Posted June 25, 2008 (edited) Okay I have this #include <GUIConstantsEx.au3> Opt("GUIOnEventMode", '1') GUICreate("GUI",400,500) GUISetState($GUI_EVENT_Close,"QUIT") GUIsetstate(@SW_SHOW) While 1 sleep(20000) WEnd Func QUIT() Exit EndFunc This has always worked before maybe I just did something wrong.. I have tried changing things, but no luck... What can i do... If this is a very stupid question Im VERY sorry.... Please help... Thank You for your help Edited June 26, 2008 by Konstig code
PsaltyDS Posted June 25, 2008 Posted June 25, 2008 #include <GUIConstantsEx.au3>Opt("GUIOnEventMode", '1')GUICreate("GUI",400,500)GUISetState($GUI_EVENT_Close,"QUIT")GUIsetstate(@SW_SHOW)While 1 sleep(20000)WEndFunc QUIT() ExitEndFuncNuff said... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
DexterMorgan Posted June 25, 2008 Author Posted June 25, 2008 Nuff said... Wow.. Thank you so much... I am losing it :/ code
aslani Posted June 25, 2008 Posted June 25, 2008 Nuff said... No, not enough. What do you mean? For the sake of dumbos like me. Please.This is interesting and I'd like to know what's the fix. [font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version
LongBowNZ Posted June 25, 2008 Posted June 25, 2008 No, not enough. What do you mean? For the sake of dumbos like me. Please.It should be GUISetOnEvent() instead of GUISetState()
DexterMorgan Posted June 26, 2008 Author Posted June 26, 2008 (edited) Okay..Diff problem...Same topic... I have this... Why doesnt it work... $LEVEL = 1 soundplay("") GUICreate("", 678, 586, 218, 117) GUISetOnEvent($GUI_EVENT_CLOSE, "quit") GUICtrlCreateProgress(144, 552, 513, 25) GUICtrlSetData(-1, 100) GUICtrlCreateLabel("", 0, 552, 142, 28) GUICtrlSetFont(-1, 16, 400, 0, "MS Sans Serif") GUICtrlCreateLabel("", 8, 520, 53, 28) GUICtrlSetFont(-1, 16, 400, 0, "MS Sans Serif") GUICtrlCreateLabel("", 72, 520, 34, 28) GUICtrlSetColor(-1, 16711680) GUICtrlSetFont(-1, 16, 400, 0, "MS Sans Serif") GUICtrlCreateLabel("", 120, 520, 79, 28) GUICtrlSetFont(-1, 16, 400, 0, "MS Sans Serif") $1 = GUICtrlCreatePic($PICTURE, 162, 135, 67, 77) GUICtrlSetOnEvent($1, "_Event") GUICtrlSetCursor(-1, 3) $2 = GUICtrlCreatePic($pic2, 162, 135, 67, 77) GUICtrlSetOnEvent($1, "Event2") GUICtrlSetCursor(-1, 3) GUISetState(@SW_SHOW) $TIMEY = 100 AdlibEnable("_Move",$TIMEY) While 1 sleep(1) WEnd Func Quit() Exit Endfunc EDIT: how can i forget Almost 300 Posts Edited June 26, 2008 by Konstig code
aslani Posted June 26, 2008 Posted June 26, 2008 It should be GUISetOnEvent() instead of GUISetState()Thanks. I'm liking that function now. [font="Georgia"]Chances are, I'm wrong.[/font]HotKey trouble?Stringregexp GuideAutoIT Current Version
PsaltyDS Posted June 26, 2008 Posted June 26, 2008 Okay..Diff problem...Same topic... I have this... Why doesnt it work... $LEVEL = 1 soundplay("") GUICreate("", 678, 586, 218, 117) GUISetOnEvent($GUI_EVENT_CLOSE, "quit") GUICtrlCreateProgress(144, 552, 513, 25) GUICtrlSetData(-1, 100) GUICtrlCreateLabel("", 0, 552, 142, 28) GUICtrlSetFont(-1, 16, 400, 0, "MS Sans Serif") GUICtrlCreateLabel("", 8, 520, 53, 28) GUICtrlSetFont(-1, 16, 400, 0, "MS Sans Serif") GUICtrlCreateLabel("", 72, 520, 34, 28) GUICtrlSetColor(-1, 16711680) GUICtrlSetFont(-1, 16, 400, 0, "MS Sans Serif") GUICtrlCreateLabel("", 120, 520, 79, 28) GUICtrlSetFont(-1, 16, 400, 0, "MS Sans Serif") $1 = GUICtrlCreatePic($PICTURE, 162, 135, 67, 77) GUICtrlSetOnEvent($1, "_Event") GUICtrlSetCursor(-1, 3) $2 = GUICtrlCreatePic($pic2, 162, 135, 67, 77) GUICtrlSetOnEvent($1, "Event2") GUICtrlSetCursor(-1, 3) GUISetState(@SW_SHOW) $TIMEY = 100 AdlibEnable("_Move",$TIMEY) While 1 sleep(1) WEnd Func Quit() Exit Endfunc EDIT: how can i forget Almost 300 Posts 1. You don't have #include <GuiConstants.au3>, so $GUI_EVENT_CLOSE is undefined. 2. You don't have GuiOnEventMode set. 3. You don't have the function _Move() defined, so the AdLibEnable() won't work. 4. All the controls are a useless distraction from the real problem at hand. 5. This works: #include <GuiConstants.au3> Opt("GuiOnEventMode", 1) GUICreate("", 678, 586, 218, 117) GUISetOnEvent($GUI_EVENT_CLOSE, "quit") GUISetState(@SW_SHOW) While 1 Sleep(1) WEnd Func Quit() Exit EndFunc ;==>Quit Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Moderators SmOke_N Posted June 26, 2008 Moderators Posted June 26, 2008 1. You don't have #include <GuiConstants.au3>, so $GUI_EVENT_CLOSE is undefined. 2. You don't have GuiOnEventMode set. 3. You don't have the function _Move() defined, so the AdLibEnable() won't work. 4. All the controls are a useless distraction from the real problem at hand. 5. This works: #include <GuiConstants.au3> Opt("GuiOnEventMode", 1) GUICreate("", 678, 586, 218, 117) GUISetOnEvent($GUI_EVENT_CLOSE, "quit") GUISetState(@SW_SHOW) While 1 Sleep(1) WEnd Func Quit() Exit EndFunc ;==>Quit Is that a nice way of saying: "Next time you need some help with something, get off your ass and write a real replication script rather than chopping your code up that wouldn't work for anyone anyway"? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
LongBowNZ Posted June 26, 2008 Posted June 26, 2008 Is that a nice way of saying: "Next time you need some help with something, get off your ass and write a real replication script rather than chopping your code up that wouldn't work for anyone anyway"?
PsaltyDS Posted June 26, 2008 Posted June 26, 2008 Is that a nice way of saying: "Next time you need some help with something, get off your ass and write a real replication script rather than chopping your code up that wouldn't work for anyone anyway"?Well, penguins are just not that rude... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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