caineman Posted January 30, 2006 Share Posted January 30, 2006 Hi Iv'e just started to use autoit3 and ive created a some Gui to run different programs, i have created tabs across the top to separate the different apps. I have worked out how to group check/uncheck the checkboxes on one tab but im not able to get it to work on the other tabs using the same button. If any one can help me out i would be most greatful cheers Caineman Link to comment Share on other sites More sharing options...
BigDod Posted January 30, 2006 Share Posted January 30, 2006 Hi Iv'e just started to use autoit3 and ive created a some Gui to run different programs, i have created tabs across the top to separate the different apps.I have worked out how to group check/uncheck the checkboxes on one tab but im not able to get it to work on the other tabs using the same button.If any one can help me out i would be most greatfulcheersCainemanCould you please post some script so that we can see what you have tried. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
caineman Posted January 30, 2006 Author Share Posted January 30, 2006 Hi Iv'e just started to use autoit3 and ive created a some Gui to run different programs, i have created tabs across the top to separate the different apps.I have worked out how to group check/uncheck the checkboxes on one tab but im not able to get it to work on the other tabs using the same button.If any one can help me out i would be most greatfulcheersCainemanHere is my code#include <GUIConstants.au3>Global $History, $Cookies, $Tempfiles, $ClearUrls, $GoButton, $ExitButton GuiCreate("MY GUI", 260, 300,(@DesktopWidth-260)/2, (@DesktopHeight-300)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)$menu = GUICtrlCreateMenu ("&Menu")$GoButton = GUICtrlCreateMenuitem ("Execute Selections", $menu)$Select = GUICtrlCreateMenuitem ("Select all",$menu)$Deselect = GUICtrlCreateMenuitem ("Deselect",$menu)$ExitButton = GUICtrlCreateMenuitem ("Exit",$menu)$tab=GUICtrlCreateTab (0,0, 260,300)$tab0=GUICtrlCreateTabitem ("Tab1")GUICtrlSetState(-1,$GUI_SHOW) ; will be display first$History = GUICtrlCreateCheckbox("Clear internet history",20,70,190,20)$Cookies = GUICtrlCreateCheckbox("Clear internet cookies",20,90,190,20)$tab1=GUICtrlCreateTabitem ( "tab2")$TempFiles = GUICtrlCreateCheckbox("Clear internet temp files",20,70,190,20) $ClearUrls = GUICtrlCreateCheckbox("Clear typed urls from address bar",20,90,190,20) GuiSetState()While 1 $msg = GUIGetMsg() If $msg = $ExitButton Then ExitLoop Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GoButton if(GuiCtrlRead($History) = 1) then Run("history.exe" ) Sleep(8000) SplashTextOn("Report", "History have been removed", -1, 25, -1, 225, 4, "", 12) Sleep(3000) SplashOff() EndIf if(GuiCtrlRead($Cookies) = 1) then Run("cookies.exe" ) Sleep(8000) SplashTextOn("Report", "Cookies have been removed", -1, 25, -1, 225, 4, "", 12) Sleep(3000) SplashOff() EndIf if(GuiCtrlRead($TempFiles) = 1) then Run("files.exe" ) Sleep(8000) SplashTextOn("Report", "Temporary files have been removed", -1, 25, -1, 225, 4, "", 12) Sleep(3000) SplashOff() EndIf if(GuiCtrlRead($ClearUrls) = 1) then RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs") Sleep(1000) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs") SplashTextOn("Report", "Typed Urls in address bar have been removed", -1, 25, -1, 225, 4, "", 12) Sleep(3000) SplashOff() EndIf Case $msg = $Select GUICtrlSetState($History, $GUI_CHECKED) GUICtrlSetState($Cookies, $GUI_CHECKED) GUICtrlSetState($TempFiles, $GUI_CHECKED) GUICtrlSetState($ClearUrls, $GUI_CHECKED) Case $msg = $Deselect GUICtrlSetState($History, $GUI_UNCHECKED) GUICtrlSetState($Cookies, $GUI_UNCHECKED) GUICtrlSetState($TempFiles, $GUI_UNCHECKED) GUICtrlSetState($ClearUrls, $GUI_UNCHECKED) EndSelectWEndFrom the menu im trying to make it so the select all and deselect only works on the tab that is displayed Link to comment Share on other sites More sharing options...
BigDod Posted January 30, 2006 Share Posted January 30, 2006 You could use _GUICtrlTabGetCurSel to determine which tab is selected and change your select /deselect functions to suit. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
caineman Posted January 30, 2006 Author Share Posted January 30, 2006 You could use _GUICtrlTabGetCurSel to determine which tab is selected and change your select /deselect functions to suit.cheersDo you have any information on how to use this as i have search the help files and can not find anythingcaineman Link to comment Share on other sites More sharing options...
jaenster Posted January 30, 2006 Share Posted January 30, 2006 note : caineman , you write see a nice code . on forums we got [ code ] and [ /code ] .. -jaenster Link to comment Share on other sites More sharing options...
BigDod Posted January 30, 2006 Share Posted January 30, 2006 cheersDo you have any information on how to use this as i have search the help files and can not find anythingcainemanYou will need the Beta version, you can download it by following the link in my signature. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
GaryFrost Posted January 30, 2006 Share Posted January 30, 2006 (edited) No need for beta to accomplish this expandcollapse popup#include <GUIConstants.au3> Global $History, $Cookies, $Tempfiles, $ClearUrls, $GoButton, $ExitButton GUICreate("MY GUI", 260, 300, (@DesktopWidth - 260) / 2, (@DesktopHeight - 300) / 2, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $menu = GUICtrlCreateMenu("&Menu") $GoButton = GUICtrlCreateMenuItem("Execute Selections", $menu) $Select = GUICtrlCreateMenuItem("Select all", $menu) $Deselect = GUICtrlCreateMenuItem("Deselect", $menu) $ExitButton = GUICtrlCreateMenuItem("Exit", $menu) $tab = GUICtrlCreateTab(0, 0, 260, 300) $tab0 = GUICtrlCreateTabItem("Tab1") GUICtrlSetState(-1, $GUI_SHOW); will be display first $History = GUICtrlCreateCheckbox("Clear internet history", 20, 70, 190, 20) $Cookies = GUICtrlCreateCheckbox("Clear internet cookies", 20, 90, 190, 20) $tab1 = GUICtrlCreateTabItem("tab2") $Tempfiles = GUICtrlCreateCheckbox("Clear internet temp files", 20, 70, 190, 20) $ClearUrls = GUICtrlCreateCheckbox("Clear typed urls from address bar", 20, 90, 190, 20) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $ExitButton Then ExitLoop Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GoButton if (GUICtrlRead($History) = 1) Then Run("history.exe") Sleep(8000) SplashTextOn("Report", "History have been removed", -1, 25, -1, 225, 4, "", 12) Sleep(3000) SplashOff() EndIf if (GUICtrlRead($Cookies) = 1) Then Run("cookies.exe") Sleep(8000) SplashTextOn("Report", "Cookies have been removed", -1, 25, -1, 225, 4, "", 12) Sleep(3000) SplashOff() EndIf if (GUICtrlRead($Tempfiles) = 1) Then Run("files.exe") Sleep(8000) SplashTextOn("Report", "Temporary files have been removed", -1, 25, -1, 225, 4, "", 12) Sleep(3000) SplashOff() EndIf if (GUICtrlRead($ClearUrls) = 1) Then RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs") Sleep(1000) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs") SplashTextOn("Report", "Typed Urls in address bar have been removed", -1, 25, -1, 225, 4, "", 12) Sleep(3000) SplashOff() EndIf Case $msg = $Select If GUICtrlRead($tab) = 0 Then GUICtrlSetState($History, $GUI_CHECKED) GUICtrlSetState($Cookies, $GUI_CHECKED) Else GUICtrlSetState($Tempfiles, $GUI_CHECKED) GUICtrlSetState($ClearUrls, $GUI_CHECKED) EndIf Case $msg = $Deselect If GUICtrlRead($tab) = 0 Then GUICtrlSetState($History, $GUI_UNCHECKED) GUICtrlSetState($Cookies, $GUI_UNCHECKED) Else GUICtrlSetState($Tempfiles, $GUI_UNCHECKED) GUICtrlSetState($ClearUrls, $GUI_UNCHECKED) EndIf EndSelect WEnd Edited January 30, 2006 by gafrost 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...
BigDod Posted January 30, 2006 Share Posted January 30, 2006 No need for beta to accomplish thisAs ever I bow to your superior knowledge. You are the man. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
caineman Posted January 30, 2006 Author Share Posted January 30, 2006 No need for beta to accomplish this expandcollapse popup#include <GUIConstants.au3> Global $History, $Cookies, $Tempfiles, $ClearUrls, $GoButton, $ExitButton GUICreate("MY GUI", 260, 300, (@DesktopWidth - 260) / 2, (@DesktopHeight - 300) / 2, $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $menu = GUICtrlCreateMenu("&Menu") $GoButton = GUICtrlCreateMenuItem("Execute Selections", $menu) $Select = GUICtrlCreateMenuItem("Select all", $menu) $Deselect = GUICtrlCreateMenuItem("Deselect", $menu) $ExitButton = GUICtrlCreateMenuItem("Exit", $menu) $tab = GUICtrlCreateTab(0, 0, 260, 300) $tab0 = GUICtrlCreateTabItem("Tab1") GUICtrlSetState(-1, $GUI_SHOW); will be display first $History = GUICtrlCreateCheckbox("Clear internet history", 20, 70, 190, 20) $Cookies = GUICtrlCreateCheckbox("Clear internet cookies", 20, 90, 190, 20) $tab1 = GUICtrlCreateTabItem("tab2") $Tempfiles = GUICtrlCreateCheckbox("Clear internet temp files", 20, 70, 190, 20) $ClearUrls = GUICtrlCreateCheckbox("Clear typed urls from address bar", 20, 90, 190, 20) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $ExitButton Then ExitLoop Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GoButton if (GUICtrlRead($History) = 1) Then Run("history.exe") Sleep(8000) SplashTextOn("Report", "History have been removed", -1, 25, -1, 225, 4, "", 12) Sleep(3000) SplashOff() EndIf if (GUICtrlRead($Cookies) = 1) Then Run("cookies.exe") Sleep(8000) SplashTextOn("Report", "Cookies have been removed", -1, 25, -1, 225, 4, "", 12) Sleep(3000) SplashOff() EndIf if (GUICtrlRead($Tempfiles) = 1) Then Run("files.exe") Sleep(8000) SplashTextOn("Report", "Temporary files have been removed", -1, 25, -1, 225, 4, "", 12) Sleep(3000) SplashOff() EndIf if (GUICtrlRead($ClearUrls) = 1) Then RegDelete("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs") Sleep(1000) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\TypedURLs") SplashTextOn("Report", "Typed Urls in address bar have been removed", -1, 25, -1, 225, 4, "", 12) Sleep(3000) SplashOff() EndIf Case $msg = $Select If GUICtrlRead($tab) = 0 Then GUICtrlSetState($History, $GUI_CHECKED) GUICtrlSetState($Cookies, $GUI_CHECKED) Else GUICtrlSetState($Tempfiles, $GUI_CHECKED) GUICtrlSetState($ClearUrls, $GUI_CHECKED) EndIf Case $msg = $Deselect If GUICtrlRead($tab) = 0 Then GUICtrlSetState($History, $GUI_UNCHECKED) GUICtrlSetState($Cookies, $GUI_UNCHECKED) Else GUICtrlSetState($Tempfiles, $GUI_UNCHECKED) GUICtrlSetState($ClearUrls, $GUI_UNCHECKED) EndIf EndSelect WEnd cheers I now worship the ground you walk on 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