Jump to content

When I press 2 keys send 2 keys


Recommended Posts

When I press <crtl> and <`> Back Quote

I would like to send <shift> F4

What is happening with this code is it's closing the open window.

 

#include <Misc.au3>

While 1
    ; If <crtl> and <`> Back Quote
    If _IsPressed("11") And _IsPressed("C0") Then
        Send ( "!{F4}")
        ElseIf _IsPressed("1B") Then
                ;MsgBox($MB_SYSTEMMODAL, "_IsPressed", "The Esc Key was pressed, therefore we will close the application.")
                ExitLoop
    EndIf
    Sleep(250)
WEnd

 

The open window I have is:

Opt("WinWaitDelay",100)
Opt("WinTitleMatchMode",4)
Opt("WinDetectHiddenText",1)
Opt("MouseCoordMode",0)
WinWait("A - 5250 Display","")
If Not WinActive("A - 5250 Display","") Then WinActivate("A - 5250 Display","")
WinWaitActive("A - 5250 Display","")

Does anyone know why it's closing the window?

Thanks,

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