Sign in to follow this  
Followers 0
vexitor

Help me get Started?

65 posts in this topic

Hello guys

As you can see im new to this and i need some help getting started.

i've read some posts before me about new ppl trying to get started and as far as i can see they didn't go to well...

I know I should go to help or something.. but I dont know where it is maybe someone can give me a link or tell me how to get to it?

Any help will be greatly appreciated :)

Just incase your wondering im trying to make a auto clicker script for a game.

any help with this would also be greatly appreciated

well tell me if im doint something wrong maybe posting in the wrong place or something..

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Welcome! :D

(auto bot for a game. now where have I seen that before?)

no, unlike many, many newbies before you, you did post in exactly the right place. You are already on the right track :):P

Go through the help file. In the Autoit section,. read the tutorial section and then the using autoit section.

Although, the Using AutoIt section is rather unclear anout what functions are.

MsgBox() is a function too. Normal Functions don't need to be defined at the end of the script. But UDFs (User Defined Functions) ARE defied, normally at the end of the script.

Go through the Language Reference section too.

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

Im not quite sure where i can get this but ill look around ty for the help :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Have you downloaded AutoIt and SciTe from the website? If not, those are both a MUST for this scripting language, and specially for people that are new. There is an awesome help file included with SciTe, but I highly recommend you try this before anything else: http://www.autoitscript.com/forum/index.ph...;hl=autoit-+123. This is possibly THE BEST program for helping new people like you get used to AutoIt. It is also written 100% in AutoIt, so it gives you an idea of what you can do. Hope you like this great scripting language, and WELCOME TO THE FORUMS!!!

EDIT: By the way if you are watching for new posts in a specific topic, I recommend you refresh your web-page periodically, so you can see what has been posted, otherwise, there may have been 3 or 4 posts since you last refreshed and you won't have even noticed a change :)

Edited by dandymcgee

- Dan [Website]

Share this post


Link to post
Share on other sites

Ohh Ok tyvm

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

ya do that tutorial then what i did was look at other people scripts and figure out how they did things and i started to make my own then once you get a bit more familur to you start trying to add things on onto your script like when i started i made a bot i just had a pixel search bot that once it found a color it click there then i added to it and made it check the hp bar to see if it was alive then i added auto buff and pickup and autologin and otehr things

heres my first bot script i commented most things so you can figure out what they do

; Script Start - Add your code below here
; the green writing doesnt effect the code its there just for description.
;---------------------SETUP--------------------------------------------------
Dim $Color_One = 0xD4D2CE   ;THE MONSTER PIXEL
Dim $Color1_tolerance = 1 ;SHADE VARIATION ON THE MONSTER PIXEL SO IT DOESNT HAVE TO BE EXACTLY THAT COLOR BUT JUST
;A SHADE OF IT SO IT COULD BE LIGHTER OR DARKER AND IT WILL STILL CLICK IT JUST DEPENDS ON WHAT NUMBER YOU PUT DECIDES
;HOW MANY SHADES IT WILL GO DOWN AND UP
;--------------Search Area Coords----------------------------------------------
Dim $Coord1_X = 288 ;TOP LEFT OF THE SCREEN TO SEARCH
Dim $Coord2_Y = 281 ;TOP LEFT OF THE SCREEN TO SEARCH
Dim $Coord3_X = 669 ;BOTTOM RIGHT OF THE SCREEN TO SEARCH
Dim $Coord4_Y = 553 ;BOTTOM RIGHT OF THE SCREEN TO SEARCH
;ALL OF THOSE EQUAL A RECTANGLE YOU ONLY NEED THE TOP LEFT AND BOTTOM RIGHT COORDINATES TO MAKE THE RECTANGLE TO SERACH FOR THE MONSTER
;-------------------------------------------------------------------------------
Opt("MouseCoordMode", 0); Read the help file for "Opt" to see if you need to keep the '2' a '2', '1', or '0'
Opt("PixelCoordMode", 0); Read the help file for "Opt" to see if you need to keep the '2' a '2', '1', or '0'
Hotkeyset("{HOME}","start"); WHEN YOU PRESS HOME IT GOES TO WHERE IT SAYS "SCRIPT STARTS"
Hotkeyset("{END}","stop"); WHEN YOU PRESS END IT GOES TO WHERE IT SAYS "EXIT SCRIPT" AT THE BOTTOM

Global $stop

Func start(); SCRIPT STARTS
WinActivate ( 'SRO_Client' ) ;WAITS FOR THE SILKROAD CLIENT WINDOW
Sleep ( 300 )
$stop = NOT $stop
While $stop
; Script Start - Add your code below here

$coord = PixelSearch($Coord1_X,$Coord2_Y,$Coord3_X,$Coord4_Y, $Color_One, $Color1_tolerance, 1); SEARCHES THE RECANGLE FOR THE COLOR OF THE MONSTER
If Not @error And IsArray($coord) Then     ; This means it will save the coords to where it found the color to $coord[0] and $coord[1]
Sleep(75);WAITS THIS IS IN MILISECONDS SO ITS A VERY SHORT WAIT ITS ABOUT 1000 EQUALS 1 SECOND SO ITS LIKE .0075 OF A SECOND
MouseClick("left", $coord[0],$coord[1],1, 0);IF IT FINDS THE PIXEL THEN IT WILL CLICK IT ONCE
Sleep(75);WAITS
#comments-end
PixelSearch(441,42,608,52,0xFF3131,2,1); IN THE RECTANGLE (FIRST 4 COMMAS)FOR THE COLOR(NEXT COMMA) WITH
;AND  A SHADE VARIATION OF 2 OF THE COLOR AND IT SKIPS A PIXEL EACH TIME, THIS IS TELL HELP REDUCE LAG

If Not @error Then
Send("1") ; IF IT FINDS THE PIXEL IT SENDS THE NUMBER 1
Sleep(500) ; SLEEPS HALF A SECOND
EndIf
EndIf
WEnd
EndFunc 


Func stop(); EXIT SCRIPT
Exit
EndFunc

While 1
Sleep(50)
WEnd
Edited by salter

Share this post


Link to post
Share on other sites

Wow.. Looks really complicated xD

Cant wait to learn this stuff :P

Hey could anyone help me get started on this script i was thinking of, I want to make a program or something that cilcks really fast where i want it to click like maybe 5k clicks or better at a spot i would want it to cilck.. well thats my goal atleast ill continue to take your advice so any help will be appreciated :)

Share this post


Link to post
Share on other sites

look at mouseclick in the help file, and to figure out what the coords are use the autoit window info

Share this post


Link to post
Share on other sites

Wow.. Looks really complicated xD

Cant wait to learn this stuff :D

Hey could anyone help me get started on this script i was thinking of, I want to make a program or something that cilcks really fast where i want it to click like maybe 5k clicks or better at a spot i would want it to cilck.. well thats my goal atleast ill continue to take your advice so any help will be appreciated :)

Break it down into easy, bite size chunks. Look in the help file at For/Next and the TrayTip() function. Now write a short script that displays a TrayTip of the numbers 1 thru however many times you want to click on that spot. Get that working first, then change it from doing TrayTip() to doing MouseClick().

Don't be afraid to post broken code for help.

Cheers!

:P


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

There in lies the problem i have no clue where to start...

i've tried looking at the help files but it makes little to no sense thats why i asked if someone could maybe show me a baby script and tell me what the codes mean.. well back to looking at help file xD

Share this post


Link to post
Share on other sites

There in lies the problem i have no clue where to start...

i've tried looking at the help files but it makes little to no sense thats why i asked if someone could maybe show me a baby script and tell me what the codes mean.. well back to looking at help file xD

I have a script that I run when working on scripts. It opens an explorer window to where my scripts are kept, opens SciTE, and opens the help file. I keep the help file open and minimized the whole time I'm scripting and refer to it often. This is the help file that comes with AutoIT when you download and install it, and it is a great reference. (The old online version used to be just about as good, but the new online help file just... well... sucks. :D )

One of the most valuable things about the help file (even the new online one, once you find your function) is that every function has an example attached. I mentioned a For/Next loop - You mentioned a baby script to demo it. If you look at the help file page for For/Next - there it is! A working example in only four lines of code! :)

I also mentioned using TrayTip() as an easy way to visibly see what your script is doing. Looking at the help file for TrayTip() - there it is again! A working example in only five lines of code! :P

It's a universal rule on this forum: If you want help, show some code. Even (or especialy) broken code! It shows you are at least trying to figure it out and not just asking the forum to write code for you on demand.

Never, never, never give up! -- Winston Churchill (Who was rumored to have coded the Enigma machine himself in AutoIT 1.0 script.)

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

xD you just rejuvinitated my spirit ill do exactly as you asked :)

Share this post


Link to post
Share on other sites

Woot I went on that help link you suggested and i acutally made my first script here you go im so proud of it :)

Run ("notepad.exe")

WinActivate ("Untitled - Notepad")

Send ("YOU CAN SCRIPT ")

WinClose ("Untitled - Notepad")

WinWaitActive("Notepad", "The text in the Untitled file has changed")

Send("!n")

Share this post


Link to post
Share on other sites

Woot I went on that help link you suggested and i acutally made my first script here you go im so proud of it :D

Run ("notepad.exe")

WinActivate ("Untitled - Notepad")

Send ("YOU CAN SCRIPT ")

WinClose ("Untitled - Notepad")

WinWaitActive("Notepad", "The text in the Untitled file has changed")

Send("!n")

Cool! :P

Now a loop... put a For/Next loop around one of those commands to make it repeat, say, five times.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

O.o Your Magic amazes me o.O

Share this post


Link to post
Share on other sites

O.o Your Magic amazes me o.O

LOL, I'm glad your enjoying yourself... NOW IT"S PAST YOUR BEDTIME< GO TO BED!!!

- Dan [Website]

Share this post


Link to post
Share on other sites

i'm nice, so, here.

Run ("notepad.exe")
WinActivate ("Untitled - Notepad")
For $i=1 To 5
Send ("YOU CAN SCRIPT #"&$i&"{ENTER}")
Sleep(500)
Next
Sleep(2000)
WinClose ("Untitled - Notepad")
WinWaitActive("Notepad", "The text in the Untitled file has changed")
Sleep(1000)
Send("!n")

added a few sleeps so you can see whats going on.

Try to look at and under stand the For loop. it starts with For $i=1 To 5 saying that $i is the number of the loop that the script is currently on, it starts at one, and stops the loop when it gets to 5, so the loop is repeated 5 times. Next ends the loop.


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

i'm nice, so, here.

added a few sleeps so you can see whats going on.

Try to look at and under stand the For loop. it starts with For $i=1 To 5 saying that $i is the number of the loop that the script is currently on, it starts at one, and stops the loop when it gets to 5, so the loop is repeated 5 times. Next ends the loop.

:) You've been a very bad theguy0000! :P

For that, you will be decremented! From now on, you're "theguy(-1)". Don't make me knock you down to -2! :D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

xD I think im starting to get the hang of it :), well atleast these noobie scripts :P

Hey guys can you tell me what i have to learn to make an auto clicker :D

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