JuanLopez

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

5 posts in this topic

 

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

Share this post


Link to post
Share on other sites



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?

1 person likes this

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by JuanLopez

Share this post


Link to post
Share on other sites

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

1 person likes this

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
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

 

Share this post


Link to post
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