Jump to content

HotKey being Locked! Not The Send Keys But Actual Assigned Hotkeyset


Recommended Posts

 

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

  • Moderators

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?

"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

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

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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...