GrungeRocker Posted March 1, 2006 Share Posted March 1, 2006 (edited) hi i have made a small script:;~ HIDE STARTBUTTON Func startbtnhide() ControlHide("", "Start", 304) EndFunc ;~ SHOW STARBUTTON Func startbtnshow() ControlShow("", "Start", 304) EndFunchiding works 100% but showing doesn't... why? Edited March 1, 2006 by Analritter [font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font] Link to comment Share on other sites More sharing options...
BigDod Posted March 1, 2006 Share Posted March 1, 2006 If this is in a GUI that you made you could use GUICtrlSetState #include <GUIConstants.au3> HotKeySet("{PAUSE}", "startbtnhide") HotKeySet("{ESC}", "startbtnshow") GUICreate("My GUI Button") ; will create a dialog box that when displayed is centered Opt("GUICoordMode",2) $btn1=GUICtrlCreateButton ("OK", 10, 30, 50) $btn2=GUICtrlCreateButton ( "Cancel", 0, -1) GUISetState () ; will display an dialog box with 2 button ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend ;~ HIDE STARTBUTTON Func startbtnhide() GUICtrlSetState($btn1,$GUI_HIDE) EndFunc ;~ SHOW STARBUTTON Func startbtnshow() GUICtrlSetState($btn1,$GUI_SHOW) EndFunc 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...
Developers Jos Posted March 1, 2006 Developers Share Posted March 1, 2006 Looks like you are hiding the word you use to match the window with ... maybe setting opt("WinDetectHiddenText",1) helps ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 1, 2006 Moderators Share Posted March 1, 2006 (edited) Err... no... it's the actual Start Button (Same Control ID) Edit: This works:Opt('wintitlematchmode', 4) Opt('windetecthiddentext', 1) ControlHide('classname=Shell_TrayWnd', 'start', 'Button1') Sleep(3000) ControlShow('classname=Shell_TrayWnd', 'start', 'Button1') Edit2: Ahh, didn't see Lar and Jdeb already responded!! Edited March 1, 2006 by SmOke_N 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. Link to comment Share on other sites More sharing options...
GrungeRocker Posted March 1, 2006 Author Share Posted March 1, 2006 thanks!don't worry SmOke_N i'm not making any damage stuff just wanna to kid a friend XD [font="Verdana"]In work:[list=1][*]InstallIt[*]New version of SpaceWar[/list] [/font] Link to comment Share on other sites More sharing options...
BigDod Posted March 1, 2006 Share Posted March 1, 2006 Err... no... it's the actual Start Button (Same Control ID) Edit: This works:Opt('wintitlematchmode', 4) Opt('windetecthiddentext', 1) ControlHide('classname=Shell_TrayWnd', 'start', 'Button1') Sleep(3000) ControlShow('classname=Shell_TrayWnd', 'start', 'Button1') 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...
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