Jump to content

HELP


rambo3889
 Share

Recommended Posts

Hi the thin i need help to is:

Is it possible to make a gui window with hotkeysets there only works when the gui is active ??

Please help

My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! you’re the best in town Fight!
Link to comment
Share on other sites

I hope this helps you.

#include <GUIConstants.au3>

$GUI_Hwnd = GUICreate('My GUI')

GUISetState()

While 1
   Sleep(500)
   SwitchHotKeys('Off')
   While WinActive($GUI_Hwnd)
      Sleep(25)
      $msg = GUIGetMsg()
      SwitchHotKeys('On')
      Select
         Case $msg = $GUI_EVENT_CLOSE
            CloseWin()
      EndSelect
   WEnd
WEnd

Func SwitchHotKeys($State)
   If $State = 'On' Then
      HotKeySet('^w', 'CloseWin')
   ElseIf $State = 'Off' Then
      HotKeySet('^w')
   EndIf
EndFunc

Func CloseWin()
   If MsgBox(32 + 4, @ScriptName, 'Would you like to close the GUI?') = 7 Then Return
   GUIDelete()
   Exit
EndFunc
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...