GodForsakenSoul Posted April 1, 2008 Share Posted April 1, 2008 i'm poking the gui part of the help file. behold, a piece of code: $msg=GuiGetMsg() select case $msg=$GUI_EVENT_CLOSE exitloop case $msg=$button_1 run("notepad.exe" send("you want to kill me, you bastard?! D:") exitloop endselect this is part of the help file (a bit tweaked though). IN THEORY, this should work flawlessly. and yet, autoit whines that $GUI_EVENT_CLOSE was either not declared or declared earlier. this, of course, makes me quite upset because the help file is officially not helpful on the topic. how do i fix this issue? also, copying the help file gives the same result. "$GUI_EVENT_CLOSE was declared earlier, blah blah blah blah." Link to comment Share on other sites More sharing options...
spudw2k Posted April 1, 2008 Share Posted April 1, 2008 (edited) Add this to the top #include <GUIConstants.au3> Declares $GUI_EVENT_CLOSE Edited April 1, 2008 by spudw2k Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
GEOSoft Posted April 1, 2008 Share Posted April 1, 2008 i'm poking the gui part of the help file. behold, a piece of code: $msg=GuiGetMsg() select case $msg=$GUI_EVENT_CLOSE exitloop case $msg=$button_1 run("notepad.exe" send("you want to kill me, you bastard?! D:") exitloop endselect this is part of the help file (a bit tweaked though). IN THEORY, this should work flawlessly. and yet, autoit whines that $GUI_EVENT_CLOSE was either not declared or declared earlier. this, of course, makes me quite upset because the help file is officially not helpful on the topic. how do i fix this issue? also, copying the help file gives the same result. "$GUI_EVENT_CLOSE was declared earlier, blah blah blah blah."Looking at the examples in the help file you will find that the files that have to be #included are always there. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
GodForsakenSoul Posted April 2, 2008 Author Share Posted April 2, 2008 amazingly.... none of your suggestions helped. instead, i needed to make it while 1 $msg=$GUI_EVENT_CLOSE and it worked o.o; i think i broke autoit. yay. Link to comment Share on other sites More sharing options...
GEOSoft Posted April 2, 2008 Share Posted April 2, 2008 amazingly.... none of your suggestions helped. instead, i needed to make it while 1 $msg=$GUI_EVENT_CLOSE and it worked o.o; i think i broke autoit. yay.Are you trying to say that you didn't have any of that code in a While loop? If thats the case then it would never work. While 1 $Msg = GuiGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE exitloop Case $button_1 run("notepad.exe") send("you want to kill me, you bastard?! D:") exitloop EndSwitch WEnd BTW, your Send() probably won't work either since you have to wait for the window before you can send anything to it. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" 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