therion Posted May 23, 2005 Posted May 23, 2005 Can someone look at this code and explain whats wrong with it. It all runs fine but if you click one of the menu items then it executes the other bit of code and seems to get stuck in a loop. Sorry if i haven't explained the problem properly but im new to this. I'd be grateful if someone could help me out.Thanks. expandcollapse popup#include <GUIConstants.au3> GUICreate("", 550, 230) GUISetIcon("Folder Blue Windows.ico") AutoItSetOption("TrayIconHide", 1) ;create menus $filemenu = GUICtrlCreateMenu("&File") $toolsmenu = GUICtrlCreateMenu("T&ools") $helpmenu = GUICtrlCreateMenu("&Help") $aboutmenuitem = GUICtrlCreateMenuItem("&About", $helpmenu) $exititem = GUICtrlCreateMenuItem("E&xit", $filemenu) $serviceitem = GUICtrlCreateMenuItem("Run Services", $toolsmenu) $taskitem = GUICtrlCreateMenuItem("Run Task Manager", $toolsmenu) ;create radio buttons GUICtrlCreateGroup("XP Hidden Apps", 5, 5, 535, 200) $radio1 = GUICtrlCreateRadio(" Character Map ", 10, 20) $radio2 = GUICtrlCreateRadio(" Clipboard Viewer ", 10, 40) $radio3 = GUICtrlCreateRadio(" DirectX diagnosis ", 10, 60) $radio4 = GUICtrlCreateRadio(" Disk Cleanup ", 10, 80) $radio5 = GUICtrlCreateRadio(" Dr Watson ", 10, 100) $radio6 = GUICtrlCreateRadio(" Driver Verifier Manager ", 10, 120) $radio7 = GUICtrlCreateRadio(" File signature verification tool ", 10, 140) $radio8 = GUICtrlCreateRadio(" Group Policy Editor ", 10, 160) $radio9 = GUICtrlCreateRadio(" IExpress Wizard ", 180, 20) $radio10 = GUICtrlCreateRadio(" MS Synchronization Manager ", 180, 40) $radio11 = GUICtrlCreateRadio(" MS Telnet Client ", 180, 60) $radio12 = GUICtrlCreateRadio(" Network shared folder wizard ", 180, 80) $radio13 = GUICtrlCreateRadio(" Object Packager", 180, 100) $radio14 = GUICtrlCreateRadio(" ODBC Data Source Administrator ", 180, 120) $radio15 = GUICtrlCreateRadio(" Private character editor ", 180, 140) $radio16 = GUICtrlCreateRadio(" Program Manager ", 180, 160) $radio17 = GUICtrlCreateRadio("Registry Editor", 370, 20) $radio18 = GUICtrlCreateRadio("Remote Access phone book", 370, 40) $radio19 = GUICtrlCreateRadio("Syskey", 370, 60) $radio20 = GUICtrlCreateRadio("System configuration", 370, 80) $radio21 = GUICtrlCreateRadio("System Configuration Editor", 370, 100) $radio22 = GUICtrlCreateRadio("System Monitor", 370, 120) $radio23 = GUICtrlCreateRadio("Volume Control", 370, 140) $radio24 = GUICtrlCreateRadio("Windows for Workgroups Chat", 370, 160) $radio25 = GUICtrlCreateRadio("Windows Media Player 5.1", 370, 180) GUISetState() ;Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg(0) Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $exititem ExitLoop Case $msg = $radio1 Run("charmap.exe") Case $msg = $radio2 Run("clipbrd.exe") Case $msg = $radio3 Run("dxdiag.exe") Case $msg = $radio4 Run("cleanmgr.exe") Case $msg = $radio5 Run("drwtsn32.exe") Case $msg = $radio6 Run("verifier.exe") Case $msg = $radio7 Run("sigverif.exe") Case $msg = $radio8 Run("mmc.exe " & @WindowsDir & "\system32\gpedit.msc") Case $msg = $radio9 Run("iexpress.exe") Case $msg = $radio10 Run("mobsync.exe") Case $msg = $radio11 Run("telnet.exe") Case $msg = $radio12 Run("shrpubw.exe") Case $msg = $radio13 Run("packager.exe") Case $msg = $radio14 Run("odbcad32.exe") Case $msg = $radio15 Run("eudcedit.exe") Case $msg = $radio16 Run("progman.exe") Case $msg = $radio17 Run("regedt32.exe") Case $msg = $radio18 Run("rasphone.exe") Case $msg = $radio19 Run("syskey.exe") Case $msg = $radio20 Run(@WindowsDir & "\PCHealth\HelpCtr\Binaries\msconfig.exe") Case $msg = $radio21 Run("sysedit.exe") Case $msg = $radio22 Run("perfmon.exe") Case $msg = $radio23 Run("sndvol32.exe") Case $msg = $radio24 Run("winchat.exe") Case $msg = $radio25 Run("mplay32.exe") ;menu actions Case $msg = $aboutmenuitem MsgBox(0, "About", "XP Hidden Apps") Case $msg = $serviceitem Run("mmc.exe " & @WindowsDir & "\system32\services.msc") Case $msg = $taskitem Run("taskmgr") EndSelect WEnd
Wb-FreeKill Posted May 23, 2005 Posted May 23, 2005 Hmm nothing seems to be wrong here, all radio buttons works and executes what it should.. and the exit in your menu works to, so whats the problem?
therion Posted May 23, 2005 Author Posted May 23, 2005 (edited) well when i click any of the menus it executes the bit of code to open the character map.So it keeps popping up when i haven't even clicked the corresponding radio button.Did you get this? Oh i forgot to mention this only happens if you click on the menus first without clicking the radio buttons. If you click one of the radio buttons and then the menu it all works fine.But if you click the menu first up pops the character map. Edited May 23, 2005 by therion
Wb-FreeKill Posted May 23, 2005 Posted May 23, 2005 well when i click any of the menus it executes the bit of code to open thecharacter map.So it keeps popping up when i haven't even clickedthe corresponding radio button.Did you get this?Oh i forgot to mention this only happens if you clickon the menus first without clicking the radio buttons.If you click one of the radio buttons and then the menuit all works fine.But if you click the menu first up popsthe character map.<{POST_SNAPBACK}>Now i see your problem.. ill take a look at it..
Wb-FreeKill Posted May 23, 2005 Posted May 23, 2005 (edited) I dunno if this is the way to do it, but it surtently solved your problem expandcollapse popup#include <GUIConstants.au3> GUICreate("", 550, 230) GUISetIcon("Folder Blue Windows.ico") AutoItSetOption("TrayIconHide", 1) ;create menus $filemenu = GUICtrlCreateMenu("&File") $toolsmenu = GUICtrlCreateMenu("T&ools") $helpmenu = GUICtrlCreateMenu("&Help") $aboutmenuitem = GUICtrlCreateMenuItem("&About", $helpmenu) $exititem = GUICtrlCreateMenuItem("E&xit", $filemenu) $serviceitem = GUICtrlCreateMenuItem("Run Services", $toolsmenu) $taskitem = GUICtrlCreateMenuItem("Run Task Manager", $toolsmenu) ;create radio buttons GUICtrlCreateGroup("XP Hidden Apps", 5, 5, 535, 200) $radio1 = GUICtrlCreateRadio(" Character Map ", 10, 20) $radio2 = GUICtrlCreateRadio(" Clipboard Viewer ", 10, 40) $radio3 = GUICtrlCreateRadio(" DirectX diagnosis ", 10, 60) $radio4 = GUICtrlCreateRadio(" Disk Cleanup ", 10, 80) $radio5 = GUICtrlCreateRadio(" Dr Watson ", 10, 100) $radio6 = GUICtrlCreateRadio(" Driver Verifier Manager ", 10, 120) $radio7 = GUICtrlCreateRadio(" File signature verification tool ", 10, 140) $radio8 = GUICtrlCreateRadio(" Group Policy Editor ", 10, 160) $radio9 = GUICtrlCreateRadio(" IExpress Wizard ", 180, 20) $radio10 = GUICtrlCreateRadio(" MS Synchronization Manager ", 180, 40) $radio11 = GUICtrlCreateRadio(" MS Telnet Client ", 180, 60) $radio12 = GUICtrlCreateRadio(" Network shared folder wizard ", 180, 80) $radio13 = GUICtrlCreateRadio(" Object Packager", 180, 100) $radio14 = GUICtrlCreateRadio(" ODBC Data Source Administrator ", 180, 120) $radio15 = GUICtrlCreateRadio(" Private character editor ", 180, 140) $radio16 = GUICtrlCreateRadio(" Program Manager ", 180, 160) $radio17 = GUICtrlCreateRadio("Registry Editor", 370, 20) $radio18 = GUICtrlCreateRadio("Remote Access phone book", 370, 40) $radio19 = GUICtrlCreateRadio("Syskey", 370, 60) $radio20 = GUICtrlCreateRadio("System configuration", 370, 80) $radio21 = GUICtrlCreateRadio("System Configuration Editor", 370, 100) $radio22 = GUICtrlCreateRadio("System Monitor", 370, 120) $radio23 = GUICtrlCreateRadio("Volume Control", 370, 140) $radio24 = GUICtrlCreateRadio("Windows for Workgroups Chat", 370, 160) $radio25 = GUICtrlCreateRadio("Windows Media Player 5.1", 370, 180) GUISetState() ;Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg(0) Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $exititem ExitLoop Case $msg = $radio1 AND GUICtrlread($radio1) = $GUI_CHECKED Run("charmap.exe") Case $msg = $radio2 AND GUICtrlread($radio2) = $GUI_CHECKED Run("clipbrd.exe") Case $msg = $radio3 AND GUICtrlread($radio3) = $GUI_CHECKED Run("dxdiag.exe") Case $msg = $radio4 AND GUICtrlread($radio4) = $GUI_CHECKED Run("cleanmgr.exe") Case $msg = $radio5 AND GUICtrlread($radio5) = $GUI_CHECKED Run("drwtsn32.exe") Case $msg = $radio6 AND GUICtrlread($radio6) = $GUI_CHECKED Run("verifier.exe") Case $msg = $radio7 AND GUICtrlread($radio7) = $GUI_CHECKED Run("sigverif.exe") Case $msg = $radio8 AND GUICtrlread($radio8) = $GUI_CHECKED Run("mmc.exe " & @WindowsDir & "\system32\gpedit.msc") Case $msg = $radio9 AND GUICtrlread($radio9) = $GUI_CHECKED Run("iexpress.exe") Case $msg = $radio10 AND GUICtrlread($radio10) = $GUI_CHECKED Run("mobsync.exe") Case $msg = $radio11 AND GUICtrlread($radio11) = $GUI_CHECKED Run("telnet.exe") Case $msg = $radio12 AND GUICtrlread($radio12) = $GUI_CHECKED Run("shrpubw.exe") Case $msg = $radio13 AND GUICtrlread($radio13) = $GUI_CHECKED Run("packager.exe") Case $msg = $radio14 AND GUICtrlread($radio14) = $GUI_CHECKED Run("odbcad32.exe") Case $msg = $radio15 AND GUICtrlread($radio15) = $GUI_CHECKED Run("eudcedit.exe") Case $msg = $radio16 AND GUICtrlread($radio16) = $GUI_CHECKED Run("progman.exe") Case $msg = $radio17 AND GUICtrlread($radio17) = $GUI_CHECKED Run("regedt32.exe") Case $msg = $radio18 AND GUICtrlread($radio18) = $GUI_CHECKED Run("rasphone.exe") Case $msg = $radio19 AND GUICtrlread($radio19) = $GUI_CHECKED Run("syskey.exe") Case $msg = $radio20 AND GUICtrlread($radio20) = $GUI_CHECKED Run(@WindowsDir & "\PCHealth\HelpCtr\Binaries\msconfig.exe") Case $msg = $radio21 AND GUICtrlread($radio21) = $GUI_CHECKED Run("sysedit.exe") Case $msg = $radio22 AND GUICtrlread($radio22) = $GUI_CHECKED Run("perfmon.exe") Case $msg = $radio23 AND GUICtrlread($radio23) = $GUI_CHECKED Run("sndvol32.exe") Case $msg = $radio24 AND GUICtrlread($radio24) = $GUI_CHECKED Run("winchat.exe") Case $msg = $radio25 AND GUICtrlread($radio25) = $GUI_CHECKED Run("mplay32.exe") ;menu actions Case $msg = $aboutmenuitem MsgBox(0, "About", "XP Hidden Apps") Case $msg = $serviceitem Run("mmc.exe " & @WindowsDir & "\system32\services.msc") Case $msg = $taskitem Run("taskmgr") EndSelect WEnd Edited May 23, 2005 by Wb-FreeKill
therion Posted May 23, 2005 Author Posted May 23, 2005 thats great Wb-FreeKill.Thanks for taking to time to help out. Its very much appreciated.
Wb-FreeKill Posted May 23, 2005 Posted May 23, 2005 thats great Wb-FreeKill.Thanks for taking to time to help out.Its very much appreciated. <{POST_SNAPBACK}>np, theres not much else to do here were im sitting
therion Posted May 23, 2005 Author Posted May 23, 2005 (edited) just one more thing.Not much really but its bugging me all the same. if i have my windows themes disabled some of the radio button text is missing.Any idea why? edit:dont worry.I've fixed it now.Just a few misplaced " "'s. whatever they're called. Edited May 23, 2005 by therion
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