Sign in to follow this  
Followers 0
Kapli

ControlSend and ControlClick

9 posts in this topic

Send() and Mouseclick() works fine, but I want to be able to do other things while it runs in the background.

So I tried

$hWin = WinGetHandle("[CLASS:SFMainWindow; TITLE:Darkfall Online]")
    While 1
        ControlSend ($hWin, "", "", "{SPACE}")
        Sleep(2000)
        ControlSend ($hWin, "", "", "r")
        Sleep(2000)
        ControlSend ($hWin, "", "", "6")
        Sleep(2000)
        ControlClick ($hWin, "", "", "left")
        Sleep(5000)
        ControlSend ($hWin, "", "", "5")
        Sleep(2000)
        For $i = 13 To 1 Step -1
            ControlClick ($hWin, "", "", "left")
            Sleep(3000)
        Next
        Sleep(2000)
        ControlSend ($hWin, "", "", "6")
        Sleep(2000)
        ControlClick ($hWin, "", "", "left")
        Sleep(5000)
        ControlSend ($hWin, "", "", "5")
        Sleep(2000)
        ControlClick ($hWin, "", "", "left")
        Sleep(3000)
        ControlClick ($hWin, "", "", "left")
        Sleep(3000)
        ControlClick ($hWin, "", "", "left")
        Sleep(3000)
        ControlClick ($hWin, "", "", "left")
        Sleep(3000)
        ControlSend ($hWin, "", "", "r")
        Sleep(2000)
        ControlSend ($hWin, "", "", "7")
        Sleep(2000)
        ControlClick ($hWin, "", "", "left")
        Sleep(150000)
    WEnd

Could anyone tell me what I did wrong?

Thanks in advance.

Share this post


Link to post
Share on other sites



Any idea of what I should fill in thougH?

Share this post


Link to post
Share on other sites

Can you upload screeny of the control tab of "AutoIt Window Info" or post what you see there?

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Servers are down now so I can't get a screenshot but I remember doing it earlier and most of it was empty except the Handle and ExStyle that's what I remember.

Edit: Ok I just checked, the control tab is empty except Handle.

Edited by Kapli

Share this post


Link to post
Share on other sites

I was trying to do something similar... but i am a complete beginner when it comes to this....

The Control Tab is completely empty except for a value for Handle

I used your script as a starter for mine....this is what I was trying to do...

$bootleg=1337

Global $Paused

HotKeySet("{Pause}","TogglePause")

$hWin=WinGetHandle("[CLASS:SFMainWindow; TITLE:Darkfall Online]")

If @error Then

MsgBox(4096, "Error", "Could not find the Darkfall window")

Else

ControlClick($hWin,"","","right")

While $bootleg = 1337

For $i = 50 to 1 Step -1

ControlClick($hWin,"","","left")

Sleep(11500)

Next

ControlSend($hWin,"","","{R}")

Sleep(1000)

ControlSend($hWin,"","","{0}")

Sleep(1000)

ControlClick($hWin,"","","left")

Sleep(180000)

ControlSend($hWin,"","","{W}")

Sleep(3000)

ControlSend($hWin,"","","{R}")

Sleep(1000)

Opt("SendKeyDownDelay", 1500)

ControlSend($hWin,"","","{Down}")

Sleep(1000)

Opt("SendKeyDownDelay")

WEnd

endif

;;PauseButton

Func TogglePause()

$Paused = NOT $Paused

While $Paused

sleep(100)

WEnd

EndFunc

Share this post


Link to post
Share on other sites

Well, did it work? ;P

Share this post


Link to post
Share on other sites

Well, did it work? ;P

Nope... doesnt seem that darkfall is compatible... if you really need to run the macros in the background i suggest vmware as a possible solution for the time being.

Share this post


Link to post
Share on other sites

Nope... doesnt seem that darkfall is compatible... if you really need to run the macros in the background i suggest vmware as a possible solution for the time being.

Yeah I just thought of that, downloading as we speak :P

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
Sign in to follow this  
Followers 0