Jump to content

help


seres
 Share

Recommended Posts

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 by seres
Link to comment
Share on other sites

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

If 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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...