Jump to content

Recommended Posts

Posted (edited)

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
  • Moderators
Posted

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:

  Reveal hidden contents

 

  • Moderators
Posted

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:

  Reveal hidden contents

 

Posted (edited)

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
Posted

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

 

Posted
  On 11/27/2020 at 10:39 AM, AasimPathan said:

I need to send things in RAW format

Expand  

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

 

"I think you are searching a bug where there is no bug... don't listen to bad advice."

Posted

Thank you this did the trick, works flawlessly.

  On 11/27/2020 at 1:13 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

 

Expand  

 

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