Jump to content

Recommended Posts

Posted

hey folks,

I'm trying to write a little program that keeps looping and checks if the active window contains the string 'Confirm' and if so will give a right arrow and enter key input, however what I've got so far isn't working.

I'm probably completely overlooking something small here, but I have a bit of a blackout and was wondering if someone could tell me where I'm going wrong.

Thanks in advance!

HotKeySet("{ESC}", "Terminate")

Func Terminate()
    Exit 0
EndFunc

Sleep(2500)

While 1
    If WinActive (StringInStr(WinGetTitle("[Active]"), "Confirm" )) Then 
        Send ("{Right}")
        Sleep(200)
        Send ("{Enter}")
    Else

    EndIf

    Sleep(2500)
WEnd

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