Jump to content

AutoIt HotKeySet StickyKeys - (Moved)


Recommended Posts

Hi,

We have a AutoIt shortcut script with the CTRL+ALT+SHIFT Key as the hotkey with multiple shortcuts e.g. CTRL+ALT+SHIFT+r launches on of our programs. 

We have an issue where even though Sticky Keys is disabled in windows the CTRL+ALT+SHIFT are still being "stuck" or acting as if Sticky Key is enabled, I need to know if someone is facing similar problem and ways to avoid it because right now our users are facing problems typing anything after using a shortcut as the CTRL+ALT+SHIFT key is locked.

Oh another note, we are using ConnectWise ScreenConnect for remoting in to the Windows 10 machine, Sticky Keys are disabled on both my local machine and the remote one where the shortcuts run. I can see the keys are being held down using on-screen Keyboard and to unstick them we have to press the same combination for a second time.

 

Also this only happens when the AutoIt script is running, if its not running no matter how many times I press CTRL+ALT+SHIFT+r the keyboard doesn't get stuck/ held down.

Remote Keyboard

image.thumb.png.a12969cff3d883ece8ee2bb0b553860f.png

 

Local and Remote Keyboard

image.thumb.png.f9c06fd52be89db20eacdff2eeb329b0.png

Sticky Keys disabled

image.thumb.png.b35b51f91f00821bfee10c7e37e0e79a.png

Edited by AasimPathan
Link to post
Share on other sites
  • Moderators

Moved to the appropriate forum.

Moderation Team

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 post
Share on other sites
  • Moderators

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

Hi that kind of helps but I need to send things in RAW format cause one of of my shortcuts has a text to send which includes # so if use _SendEx("#[This is a test message]",1) it doesn't send the #, which is kind of important to us.

 

Also, the below didn't help with getting the keys unstuck unless I am using it wrong

ControlSend("", "", "", "text", 0)
Edited by AasimPathan
Link to post
Share on other sites

Here how I solved the same issue as you are facing :

HotKeySet("!^+{F1}", "Help")
Func Help()
  CheckSpecialKey ()
  ; rest of the code here
 EndFunc
Func CheckSpecialKey ()
  ShowText ("KEY must be released")
  While _IsPressed ("10") Or _IsPressed ("11") Or _IsPressed ("12")
    Sleep (50)
  WEnd
EndFunc

 

Link to post
Share on other sites
2 hours ago, AasimPathan said:

I need to send things in RAW format

Hi AasimPathan,
A little modification in the _SendEx() function should do it. Here is an example :

#include <AutoItConstants.au3>
#include <Misc.au3>
#include <MsgBoxConstants.au3>

_SendExFlag("#[This is a test message]", "", $SEND_RAW)

Func _SendExFlag($ss, $warn = "", $iFlag = 0) ; <==========
    Local $iT = TimerInit()

    While _IsPressed("10") Or _IsPressed("11") Or _IsPressed("12")
        If $warn <> "" And TimerDiff($iT) > 1000 Then
            MsgBox($MB_TOPMOST, "Warning", $warn)
        EndIf
        Sleep(50)
    WEnd
    Send($ss, $iFlag) ; <==========
EndFunc;==>_SendExFlag

 

Link to post
Share on other sites

Thank you this did the trick, works flawlessly.

On 11/27/2020 at 6:43 PM, pixelsearch said:

Hi AasimPathan,
A little modification in the _SendEx() function should do it. Here is an example :

#include <AutoItConstants.au3>
#include <Misc.au3>
#include <MsgBoxConstants.au3>

_SendExFlag("#[This is a test message]", "", $SEND_RAW)

Func _SendExFlag($ss, $warn = "", $iFlag = 0) ; <==========
    Local $iT = TimerInit()

    While _IsPressed("10") Or _IsPressed("11") Or _IsPressed("12")
        If $warn <> "" And TimerDiff($iT) > 1000 Then
            MsgBox($MB_TOPMOST, "Warning", $warn)
        EndIf
        Sleep(50)
    WEnd
    Send($ss, $iFlag) ; <==========
EndFunc;==>_SendExFlag

 

 

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...