Jump to content
Sign in to follow this  
ShadowIRON

Autoit inside another program

Recommended Posts

ShadowIRON

Hello!

I've made a pretty simple script:
 

#include <Constants.au3>
#include <Misc.au3>


Local $hDLL = DllOpen("user32.dll")

While 1
    If _IsPressed("46", $hDLL) Then

        ; Wait until key is released.
        While _IsPressed("46", $hDLL)
           Send("{S 2}")
            Sleep(250)
        WEnd
    ElseIf _IsPressed("1B", $hDLL) Then
        ExitLoop
    EndIf
    Sleep(250)
WEnd

DllClose($hDLL)

All its supposed to do press S 2 times every 250ms while i'm holding down the 'F' key.
It is working properly,however it doesn't run under another program.
I wanna start a project where i can clear certain levels in games. I'm trying with Dark souls 3 atm, and the script seems like "not running" while im inside the game, however if i press alt+tab and go into a notepad or something and i press 'F' it still works. Is there any solution for that? Or should i just try with other games?
 

Share this post


Link to post
Share on other sites
JLogan3o13

@ShadowIRON welcome to the forum. Unfortunately you have missed the forum rules on your way in. Please review them now, particularly the section regarding game automation, and you will see why this thread is locked. Hope to see you soon with a legitimate question.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.