Jump to content

Need Help With Making Easy Script


Recommended Posts

Hi ^^,, Im new to this and,,, well,, I dont know ANYTHING I guess,, but I would want to learn,, as a start I would be really thankful if someone could make me a script I could use, I belive it has to be very easy to make, I just dont have the patience to search for every possible command to see if its the command I need.

And I also dont know what commands HAS to be in a AutoIt script, if any1 could make this for me, I could get a little insight into this program,

What I need is a script that does the following:

at beginning, nothing,

when I press PAUSE, script will start,

it will then press left mouse click (at the location I am holding my cursor),

then press numpad 1,

then press enter,

and then it will just keep doing this all the time until I press PAUSE again,

then it will stop.

also, between the keypresses, there should be a small pause, maybe 10 miliseconds between every keystroke and mouseclick.

Please, can someone make this script or tell me how to do it :) I would be really happy ^^,,, thankx

Edited by Cokeholic
Link to comment
Share on other sites

Hi,

try this.

HotKeySet("{pause}", "doit")
HotKeySet("{esc}", "end")

While 1
    sleep (50)
WEnd

Func doit()
    $pos = MouseGetPos()
    MouseClick("left", $pos[0], $pos[1], 1)
    Sleep(10)
    Send("{NUMPAD1}" )
    Sleep(10)
    Send("{Enter}")
EndFunc

Func end()
    Exit(0)
EndFunc

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

  • Moderators

Heyy,, that did work :mellow: but, what about the loop?

I would want it to be looped, so I dont have to press pause every time,

maybe doesnt work with autoit? :)

Try this:

HotKeySet("{PAUSE}", "Start")

While 1
    Sleep(100)
WEnd

Func Start()
    HotKeySet("{PAUSE}", "Stop")
    While 1
        $pos = MouseGetPos()
        MouseClick("Left", $pos[0], $pos[1])
        Sleep(10)
        Send("{NUMPAD1}")
        Sleep(10)
        Send("{Enter}")
        Sleep(10)
    WEnd
EndFunc  ;==>Start

Func Stop()
    Exit
EndFunc  ;==>Stop
Edited by big_daddy
Link to comment
Share on other sites

Edit: Okay, too late. Use the one above.

So long,

Mega

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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