seres Posted August 21, 2007 Share Posted August 21, 2007 (edited) hello, im new in this of auto it, what i want to do is that i have some scrip and if i press control+shift+t makes winclose of some windows and if i press control+shift+y open those closed windows and to end the scrip untill i press control+break thanks Edited August 21, 2007 by seres Link to comment Share on other sites More sharing options...
Paulie Posted August 21, 2007 Share Posted August 21, 2007 hello, im new in this of auto it, what i want to do is that i have some scrip and if i press control+shift+t makes winclose of some windows and if i press control+shift+y open those closed windows and to end the scrip untill i press control+break thanksIf you want to re-open the windows once you close them, you would probably be better off just hiding them. Here is an example. HotKeySet("^+t", "HideWins") HotKeySet("^+y", "ShowWins") While 1 Sleep(100) WEnd ;Edit titles to the title of the windows you want to hide. Func HideWins() WinSetState("Title1","", @SW_HIDE) WinSetState("Title2","", @SW_HIDE) WinSetState("Title3","", @SW_HIDE) EndFunc Func ShowWins() WinSetState("Title1","", @SW_SHOW) WinSetState("Title2","", @SW_SHOW) WinSetState("Title3","", @SW_SHOW) EndFunc Link to comment Share on other sites More sharing options...
Zedna Posted August 21, 2007 Share Posted August 21, 2007 WelcomeOpen AutoIt helpfile and look atHotkeySetWinSetStateWinClose Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
seres Posted August 22, 2007 Author Share Posted August 22, 2007 hi, thanks answering my cuestions, it really help me a lot , why did u put a While 1 Sleep(100) WEnd i read the help file but im stills not sure of that so, can u please explain it to me Link to comment Share on other sites More sharing options...
qazwsx Posted August 22, 2007 Share Posted August 22, 2007 beccause hotkeys are not actually running until you press them they are assigned but they do not call any funcs. With out the while statement, autoit will close the script when it reaches the end. Link to comment Share on other sites More sharing options...
Paulie Posted August 22, 2007 Share Posted August 22, 2007 beccause hotkeys are not actually running until you press them they are assigned but they do not call any funcs. With out the while statement, autoit will close the script when it reaches the end.In other words, The While...WEnd loop gives the script something to do while it waits for you to press the hotkeys. Without it, The script would close almost immediately because it has nothing to do. Link to comment Share on other sites More sharing options...
qazwsx Posted August 22, 2007 Share Posted August 22, 2007 In other words, The While...WEnd loop gives the script something to do while it waits for you to press the hotkeys. Without it, The script would close almost immediately because it has nothing to do.well if you want to explain it so he can understand... Link to comment Share on other sites More sharing options...
seres Posted August 23, 2007 Author Share Posted August 23, 2007 tankyou verymuch 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