Jump to content

A few Questions , please help


Recommended Posts

Ok i read through the FAQ's and they didn't seem to be very helpfull as far as a listing of basic commands i could use

I also looked through the examples and i cant find anything that relates to what i need

Basically i want to hook a running process so that auto it will preform a keysend like this

(open window)

press up arrow , down arrow, left arrow , right arrow keys

and i need it to randomly select one of them and at random miliseconds

How could i write a program that randomly pushes a key basicly is what im asking and is there a way to get it to only perform the action for a certain process?

Link to comment
Share on other sites

Basically i want to hook a running process so that auto it will preform a keysend like this

(open window)

WinGetHandle() will hook window

WinGetTitle()

(open window) WinSetState($handle or $title, "", @SW_MAXIMIZE)

look at the Example in help file for all commands

press up arrow , down arrow, left arrow , right arrow keys

Send()

{UP} Up arrow

{DOWN} Down arrow

{LEFT} Left arrow

{RIGHT} Right arrow

and i need it to randomly select one of them and at random miliseconds

How could i write a program that randomly pushes a key basicly is what im asking and is there a way to get it to only perform the action for a certain process?

Random()

and with random you better look at

If...ElseIf...Else...EndIf

While...WEnd

and

Sleep()

command

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

Ok so here is what i've got so far , please help clean this up lol

Sleep(1970.46384386842)

Random( [Min 10.1 [Max2000.0000000000)

Send("{UP DOWN}")

Sleep(331.394632558049)

Send("{UP UP}")

Sleep(159.9250742762)

Send("{DOWN DOWN}")

Sleep(143.899294463402)

Send("{DOWN UP}")

Sleep(1543.57327537438)

Send("{RIGHT DOWN}")

Sleep(144.387065953913)

Send("{RIGHT UP}")

Sleep(1553.97683225103)

Send("{LEFT DOWN}")

Sleep(216.984002156699)

The random thing i still dont understand how to apply this

I basicly am needing everything under the random line to be random lol

Edited by onehandsolo
Link to comment
Share on other sites

Ok so here is what i've got so far , please help clean this up lol

The random thing i still dont understand how to apply this

I basicly am needing everything under the random line to be random lol

You need to create a variable

Global $myrandomnumber

Func _randomnumber()

$myrandomnumber = random(1,9000, 1)

msgbox(0,"",$myrandomnumber)

EndFunc

;Example generates a whole number 1 to 9,000 inclusive. The Func routine will generate a new random number and assign it to the $myrandomnumber each time it is called. $myrandomnumber is used in your code where you need a random number. Hope that makes sense.... Ant

Then your code

Do something

_randomnumber()

Do Something

_randomnumber()

Do Something

_randomnumber()

Exit

Cheers Ant..

Link to comment
Share on other sites

Ok so here is what i've got so far , please help clean this up lol

this shud get you started

Global $random_1
Global $random_2
Run("Notepad.exe", "", @SW_MAXIMIZE)
;~ WinActivate("[CLASS:Notepad]"); Or
;~ WinActivate("Untitled - Notepad")
WinWaitActive("Untitled - Notepad")

Send("jhjhjhjfghsdfsfd")
Send("{ENTER}")
Send("sdsdfsd")
Send("{ENTER}")
Send("sadfdsfff")
Send("{ENTER}")

While 1
    _random_1();<== goto _random_1() func
    Sleep($random_1)
    _random_2();<== goto _random_2() func
    Select
        Case $random_2 = 1
            Send("{UP}")
            Send("{DOWN}")
        Case $random_2 = 2
            Send("{UP}")
            Send("{LEFT}")
        Case $random_2 = 3
            Send("{UP}")
            Send("{RIGHT}")
        Case $random_2 = 4
            Send("{UP}")
            Send("{DOWN}")
        Case $random_2 = 5
            Send("{DOWN}")
            Send("{UP}")
        Case $random_2 = 6
            Send("{DOWN}")
            Send("{LEFT}")
        Case $random_2 = 7
            Send("{DOWN}")
            Send("{RIGHT}")
        Case $random_2 = 8
            Send("{DOWN}")
            Send("{DOWN}")
        Case $random_2 = 9
            Send("{LEFT}")
            Send("{UP}")
        Case $random_2 = 10
            Send("{LEFT}")
            Send("{DOWN}")
        Case $random_2 = 11
            Send("{LEFT}")
            Send("{RIGHT}")
        Case $random_2 = 12
            Send("{LEFT}")
            Send("{LEFT}")
        Case $random_2 = 13
            Send("{RIGHT}")
            Send("{UP}")
        Case $random_2 = 14
            Send("{RIGHT}")
            Send("{DOWN}")
        Case $random_2 = 15
            Send("{RIGHT}")
            Send("{LEFT}")
        Case $random_2 = 16
            Send("{RIGHT}")
            Send("{RIGHT}")
    EndSelect
WEnd

Func _random_1()
    $random_1 = Random(1000, 2000,1);<== from 1 to 2 seconds
EndFunc

Func _random_2()
    $random_2 = Random(1,16,1);<== from 1 to 16 numbers
EndFunc

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

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