nathan546 Posted December 3, 2003 Posted December 3, 2003 Im trying to make a random command send differnt numbers every time its used this works but its in a Msgbox but I want it to be send and when I change it says the variables not right so is there a variable or a differnt way to do this. $var = random(1,9) Msgbox(4096, "Clipboard contains:", $var) needs to be $var = random(1,9) Send(DIFFERNT VARIABLE, "Clipboard contains:", $var)
CyberSlug Posted December 3, 2003 Posted December 3, 2003 Check the syntax of the SEND command. $var = random(1,9) Send($var, 1);the second parameter is optional ;or you could even combine in one line Send( random(1,9) ) Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
nathan546 Posted December 4, 2003 Author Posted December 4, 2003 it doesnt work, when it opens notepad it doesnt type a number into it. run("notepad.exe") $var = random(1,9) Send($var, 1)
CyberSlug Posted December 4, 2003 Posted December 4, 2003 Try adding a delay between RUN and SEND:AutoItSetOption("WinTitleMatchMode",2) ; match any substring run("notepad.exe") WinWaitActive("- Notepad") $var = random(1,9) Send($var, 1) Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
nathan546 Posted December 4, 2003 Author Posted December 4, 2003 is there a way to change the random so it would go 1 then 2 then 3 then 4 then 5 each time it was used?
nathan546 Posted December 4, 2003 Author Posted December 4, 2003 like im gonna make a program to make it log into a account like account-1 then log out then log back into a differnt account like account-2 and so(account-3,4,5,6,ect)
Dan Posted December 4, 2003 Posted December 4, 2003 I'm not sure if I understand what you are looking for, but here's my best guess. AutoItSetOption("WinTitleMatchMode",2) ; match any substring run("notepad.exe") WinWaitActive("- Notepad") For $Var = 1 to 9 Send("account-" & $var & @CR) Next
nathan546 Posted December 4, 2003 Author Posted December 4, 2003 thats close but I want it to type in account, run script on account go back to login screen type in the other account ect.
nathan546 Posted December 4, 2003 Author Posted December 4, 2003 a game, but heres basically what i want it to do AutoItSetOption("WinTitleMatchMode",2) ; match any substring run("notepad.exe") WinWaitActive("- Notepad") For $var = 1 to 9 Send("account- & $var1" & @CR) Next only each time Send("account- & $var1" & @CR) is type it only does 1 account so the first Send("account- & $var1" & @CR) would be account-1 then the second time its in script its Send("account- & $var1" & @CR) and it comes out as account-2 and so on.
nathan546 Posted December 4, 2003 Author Posted December 4, 2003 does the same thing as the other 1 is just goes, opens notepad.exe then types account-1 account-2 account-3 account-4 account-5 account-6 account-7 account-8 account-9
nathan546 Posted December 4, 2003 Author Posted December 4, 2003 lol, ok heres a detailed explanation, im going to have repeat on a script for a game and I have like 10 accounts with account-1-10 and I want it to login do its thing log out go back to login screen(which ive made this script part alrdy)then type account-2 do its thing log out then do account-3 ect.
nathan546 Posted December 4, 2003 Author Posted December 4, 2003 i may have figured it out but whats the repeat command in 3.0 i no its Repeat, 0 or w/e in 2.0 but i dunno in 3.0. nvm i found it.
nathan546 Posted December 4, 2003 Author Posted December 4, 2003 Well i think i got it working for the most part if i can make the loop work any help heres the whole script. Some stuff is in red like the loop.Run("C:\Program Files\Diablo II\Diablo II.exe")WinWaitActive("Diablo II", "", 15)MouseClick("left", 1, 1, 2)Sleep(100)MouseClick("left", 1, 1, 2)Sleep(100)MouseClick("left", 1, 1, 2)Sleep(100)While 1MouseClick("left", 396, 355, 2)Sleep(4000)Send("{TAB}")Sleep(1000)AutoItSetOption("WinTitleMatchMode",2); match any substringFor $var = 1 to 5 Send("MY ACCOUNT!!!!!!!!!" & $var) YourFunc()NextExitFunc YourFunc()Send("{TAB}")Send("MY PASSWORD")Send("{ENTER}")Sleep(4000);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Sleep(2000)Mouseclick("left", 185, 126, 2)Sleep(4000)Send("{ESC}")Sleep(4000);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Sleep(2000)Mouseclick("left", 390, 118, 2)Sleep(4000)Send("{ESC}")Sleep(4000);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Sleep(2000)Mouseclick("left", 200, 230, 2)Sleep(4000)Send("{ESC}")Sleep(4000);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Sleep(10000)Mouseclick("left", 427, 222, 2)Sleep(4000)Send("{ESC}")Sleep(4000);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Sleep(2000)Mouseclick("left", 190, 315, 2)Sleep(4000)Send("{ESC}")Sleep(4000);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Sleep(2000)Mouseclick("left", 395, 310, 2)Sleep(4000)Send("{ESC}")Sleep(4000);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Sleep(10000)Mouseclick("left", 204, 396, 2)Sleep(4000)Send("{ESC}")Sleep(4000);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Sleep(2000)Mouseclick("left", 475, 396, 2)Sleep(4000)Send("{ESC}")Sleep(4000)Send("{ESC}")Sleep(4000)Sleep(2000)EndFuncWEND
nathan546 Posted December 4, 2003 Author Posted December 4, 2003 also is there a way to make the var skip a number something like, For $var = 1 to 1, 3 to 9
CyberSlug Posted December 4, 2003 Posted December 4, 2003 Maybe you want an array to store information unique to each account:Dim $info[11] ; elements numbered 0 to 10, but you can ignore 0 $info[1] = "Alpha" $info[2] = "Bravo" $info[3] = "Charlie" ; ... remaining statements go here $info[10] = "etc" For $i = 1 to 10 ; stuff goes here Send( $info[$i] ) ; other stuff Next Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
nathan546 Posted December 4, 2003 Author Posted December 4, 2003 ok screw it, ill just stick with my old script that has like 6 copys of the same script in it the thanks for the help though everyone.
CyberSlug Posted December 4, 2003 Posted December 4, 2003 Guess I'm too slow to post! As for you new question "For $var = 1 to 1, 3 to 9" ... Not easily. It would be best to break it up:$var = 1 ; Call routine For $var = 3 to 9 ; Call routine Next ;This should also workFor $var = 1 to 9 If $var = 2 then $var = 3 EndIf ; Body of loop goes here Next Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Guy Posted December 4, 2003 Posted December 4, 2003 Hi i used to play d2, ket getting my accounts banned though This works Dim $account[8]; you could put these in a ini file so you can change them easy $account[0] = 1 $account[1] = 3 $account[2] = 4 $account[3] = 5 $account[4] = 6 $account[5] = 7 $account[6] = 8 $account[7] = 9 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; $i = 0 Do; start loop MouseClick("left", 396, 355, 2) Sleep(4000) Send("{TAB}") Sleep(1000) AutoItSetOption("WinTitleMatchMode",2); match any substring If $i = 8 Then $i = 0 Else $i = $i EndIf Send("my account") sleep(400); must add this sleep bit or it will fuck up Send($account[$i]) $i =$i +1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;whatever else you want to add here, password ect ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Until 1 = 2; end loop Guy
nathan546 Posted December 5, 2003 Author Posted December 5, 2003 Hi i used to play d2, ket getting my accounts banned though Ive gotten banned 2 times im actually thinking about trying to make a bot with autoit. something is wrong with the accounts when i try to run this heres what i got so far. Dim $mulerz-clpl[5] $mulerz-clpl[1] = 3 $mulerz-clpl[3] = 5 $mulerz-clpl[4] = 6 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Run("C:\Program Files\Diablo II\Diablo II.exe") WinWaitActive("Diablo II", "", 15) MouseClick("left", 1, 1, 2) Sleep(100) MouseClick("left", 1, 1, 2) Sleep(100) MouseClick("left", 1, 1, 2) Sleep(100) $i = 0 start loop MouseClick("left", 396, 355, 2) Sleep(4000) Send("{TAB}") Sleep(1000) AutoItSetOption("WinTitleMatchMode",2); match any substring If $i = 5 Then $i = 0 Else $i = $i EndIf Send("mulerz-clpl") sleep(400) Send($mulerz-clpl[$i]) $i =$i +1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Send("{TAB}") Send("PASSWORD") Send("{ENTER}") Sleep(4000) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Sleep(2000) Mouseclick("left", 185, 126, 2) Sleep(4000) Send("{ESC}") Sleep(4000) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Sleep(2000) Mouseclick("left", 390, 118, 2) Sleep(4000) Send("{ESC}") Sleep(4000) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Sleep(2000) Mouseclick("left", 200, 230, 2) Sleep(4000) Send("{ESC}") Sleep(4000) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Sleep(10000) Mouseclick("left", 427, 222, 2) Sleep(4000) Send("{ESC}") Sleep(4000) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Sleep(2000) Mouseclick("left", 190, 315, 2) Sleep(4000) Send("{ESC}") Sleep(4000) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Sleep(2000) Mouseclick("left", 395, 310, 2) Sleep(4000) Send("{ESC}") Sleep(4000) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Sleep(10000) Mouseclick("left", 204, 396, 2) Sleep(4000) Send("{ESC}") Sleep(4000) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Sleep(2000) Mouseclick("left", 475, 396, 2) Sleep(4000) Send("{ESC}") Sleep(4000) Send("{ESC}") Sleep(4000) Sleep(2000) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Until 1 = 2; end loop
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now