JuanLopez Posted January 20, 2017 Share Posted January 20, 2017 I have this script where I use a hotkeyset to run if a window is active the only problem is when that window is not active the key I assigned for that hotkeyset is not released and is no longer useable. I only want that key (e) to be set as a hotkey when that program is active when it minimize I want to have the key (e) back to normal. what I have #include <AutoItConstants.au3> HotKeySet("e", "AltF5") While 1 Sleep(100) WEnd Func AltF5() If WinActive('Program X') Then Send('^!+e') MouseClick($MOUSE_CLICK_LEFT, 181, 305, 1) Send('2') Send('{ENTER}') EndIf EndFunc Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 20, 2017 Moderators Share Posted January 20, 2017 Why not take the common sense approach and set your hotkey to something other than one of the most used letters in the English alphabet? Something you won't be using all the time? Skysnake 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
JuanLopez Posted January 20, 2017 Author Share Posted January 20, 2017 (edited) 1 hour ago, JLogan3o13 said: Why not take the common sense approach and set your hotkey to something other than one of the most used letters in the English alphabet? Something you won't be using all the time? Because the letter correlates to exactly what it does, and for me it be the easiest to just keep it moving. What i am doing is a constant workflow where I minimize said program and get to working some till i reach the part in my work where I need to bring the program up and use it again, now this switching between windows happens like once every 2 minutes or so, thats my workflow. In my work flow I use all my keys pretty much so having a key DISABLED is not really an option. I guess I can use the f keys if I figure out how to disable them from being rooted to the program I use. If theirs no way to accomplish this and it just one of those setbacks a program has so be it, I can make do. Ill assign my hot keys to, 0,9,8,7,6,5,4,3 instead. I stil need em but I got the numpad. Thanks for the reply. Edited January 20, 2017 by JuanLopez Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 20, 2017 Moderators Share Posted January 20, 2017 JuanLopez, If thehHot key is only to be active when the GUI is active then you can use an Accelerator key - look at GUISetAccelerators in the Help file to see how to use them. M23 meoit 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
JuanLopez Posted January 21, 2017 Author Share Posted January 21, 2017 16 hours ago, Melba23 said: JuanLopez, If thehHot key is only to be active when the GUI is active then you can use an Accelerator key - look at GUISetAccelerators in the Help file to see how to use them. M23 thanks will take a look at this 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