Jump to content

New to autoit and Im having problems getting _IsPressed function to work


Recommended Posts

Hello, can someone help me with _IsPressed function? I made simple script that tells me if steam is running, but I want that to happen only when I hold down shift, how can I do that?

#include <MsgBoxConstants.au3>

while 1
    sleep(100)
    If ProcessExists("Steam.exe") Then
        MsgBox($MB_SYSTEMMODAL, "", "Steam is currently running")
        sleep(1000)
    EndIf
WEnd

 

Link to comment
Share on other sites

#include <MsgBoxConstants.au3>
#include <misc.au3>

While Sleep(100)
    If ProcessExists("Steam.exe") Then
        If _IsPressed("10") Then
            MsgBox($MB_SYSTEMMODAL, "", "Steam is currently running", 1)
        EndIf
    EndIf
WEnd

 

App: Au3toCmd              UDF: _SingleScript()                             

Link to comment
Share on other sites

7 hours ago, Nine said:

@Qvartz Maybe you should read about forum rules above, especially game automation...

Also as I mentioned Im new to autoit and its just my script Im learning from, basically 2 example scripts from site put together.

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