BatMan22

Windows XP Help

5 posts in this topic

#1 ·  Posted (edited)

I am using autoit, and the generated EXE's on an older machine with Windows XP, and am having a problem with Keyboard keys getting 'stuck' when the program uses them. 

 

IE. If I tell the computer to 

Send("!ED" & "{Down}{Right}")
            Send($sText & $sAppend)
            Sleep(100)

Then ~50% of the time, when I come to use the computer, the computer acts like the Alt Key is being held down. Even after the program is finished running, and the way to 'unstuck' it is by actually physically hitting the button on the keyboard. I have a feeling that autoit 'trigger' the alt key so fast that it doesn't register when it 'un-triggers' it. Is there anything I can end the program with that would clear that stuckness? Is there a way to tell autoit to "slowly press the alt key for .5 seconds" and then let go? Also sometimes the shift button gets stuck the same way. Or is there a way to specially compile the programs for older XP builds that sends the special keys that are held down a little slower?

Edited by BatMan22

Share this post


Link to post
Share on other sites



1 person likes this

SciTE = 3.6.2.0/full   AutoIt = 3.3.14.2   AutoItX64 = 0   OS = Win7Pro SP1   OSArch = X64   Language = 0407/german
H:\...\AutoIt3\SciTE   H:\...\AutoIt3   H:\...\AutoIt3\Include   H: = Network Drive

   88x31.png  Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind.

Share this post


Link to post
Share on other sites

Hey guys.. Turns out my issues AREN'T fixed, I still get stuck keys everytime I run my programs.. Example Below, I don't understand why the 'General Fix Method' isnt working for me. And the "Keys virtually stuck" fix, I don't understand how to impliment.. Help? :( I've even tried having every other damn line be the 'fix' listed, and yet it still seems to get stuck and makes my program fail in navigating the menus as well.

 

;Combine Different functions Cut Left, Cut Right and Select Peak, Report Repeat Up, And Report Single and run in background. 

HotKeySet ( "^!a" , "CutLeft" )
;HotKeySet ( "^!s" , "CutRight")
;HotKeySet ( "^!z" , "ReportSingle")
;HotKeySet ( "^!u" , "ReportRepeatUp")
;HotKeySet ( "^!z" , "ReportSingle")

Func CutLeft()
   ControlSend("", "", "", "text", 0)
   Sleep(50)
   Send("!ep"); send to batch
   ControlSend("", "", "", "text", 0)
   Sleep(250)
   Send("!e"); send to batch
   ControlSend("", "", "", "text", 0)
    Sleep(500)
    Send("{DOWN}")
    ControlSend("", "", "", "text", 0)
    Sleep(40)
    Send("{DOWN}")
    ControlSend("", "", "", "text", 0)
    Sleep(40)
    Send("{DOWN}")
    ControlSend("", "", "", "text", 0)
    Sleep(40)
    Send("{DOWN}")
    ControlSend("", "", "", "text", 0)
    Sleep(40)
    Send("{DOWN}")
    ControlSend("", "", "", "text", 0)
    Sleep(40)
    Send("{DOWN}")
    ControlSend("", "", "", "text", 0)
    Sleep(2000)
    ;if 148,157 is 0x000080 then continue otherwise exit
    ;MouseClick("primary", 147, 157)
    Local $aCoord = PixelSearch(147, 157, 148, 158, 0x000080) ; search for blue in menu
    If @error Then
        MsgBox(0, "Error", "Program moved too fast or not fullscreen or FML.")
     EndIf
     ControlSend("", "", "", "text", 0)
    Send("{enter}")
    ControlSend("", "", "", "text", 0)
   Sleep(50)
   Send("!e")
   ControlSend("", "", "", "text", 0)
   Sleep(40)
   Send("l")
   ControlSend("", "", "", "text", 0)
   Sleep(40)
   ControlSend("", "", "", "text", 0)
EndFunc


While True
    Sleep(1000)
WEnd

 

Share this post


Link to post
Share on other sites

Ignore my question, I didn't understand that the _SendEx would fix the problem.. I thought it would just give a warning. I *think* it's fixed, but that  ControlSend("", "", "", "text", 0) thing is useless.

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