
n4n0
Members-
Posts
19 -
Joined
-
Last visited
Everything posted by n4n0
-
I did something similar first, and it worked, but then I ran into problems exiting the loop, ie. if $vLoop1 value changes because of given arguments. How would I rewrite this to use While loop instead?
-
I have been trying to move around the values etc, but nothing seems to be working. In this case $i goes up to 18, but I want it to go up to $vLoop1 * $vLoop2 which is 10. Thank you. Global $vLoop1, $vLoop2, $i While $vLoop2 <= 2 $vLoop1 = 0 $vLoop2 += 1 While $vLoop1 <= 5 $i += 1 MsgBox(0, "", $i) $vLoop1 += 1 WEnd WEnd
-
Alright, I figured out the second question myself, here's the code: Local $i = 0 While 1 If WinExists("Proc.exe") Then $i = 0 Else $i += 1 Sleep(5000) EndIf If $i = 24 Then If ProcessExists("Proc2.exe") Then ProcessClose("Proc2.exe") Sleep(5000) EndIf Run($Proc2) EndIf WEndI believe that it can be improved though, any tips?
-
bump
-
How exactly am I supposed to do that? The application is existing for different amount of times (5-30 seconds), but how can I make it to do statements if it hasn't existed in the last 60 seconds? A sample script would be nice.
-
Hello, currently I have a short code without any pause in-between the loops, but even now the script performs too slow, roughly one second. Is there any way to make it more instantaneous? I tried using If WinExists but I think that is even slower. While 1 WinSetState("[CLASS:SplashScreenClassName]", "", @SW_HIDE) WinSetState("[CLASS:RiotWindowClass]", "", @SW_HIDE) WEnd Second question, if I have a code with If WinExists(...) Then statements EndIfHow can I make statements if the window hasn't existed for a given time, e.g. 60 seconds.
-
While 3 and no sleep :/
-
I am sort of new, how was it before? Curious.
-
I don't want to be advertising, but it's for a CS:GO gamble site and I want to check its legitness, here's the final, working script with expected 50% winrate, thank you for your help. I sumbit the code if someone might find it useful to mess around with. #cs "Sim.ini"- file Local $coins = 1000 Local $min = 20 Local $ratio = 1.95 #ce #include "Sim.ini" #include <File.au3> HotKeySet("{END}", ExitIt) Coins() Func Coins() Local $r Local $roll Local $win = 0 Local $lose = 0 Do Do Local $i = 1 While 1 Sleep(100) $r = Random(0, 9999, 1) $roll += 1 If $r < 5000 Then $win += 1 Else $lose += 1 EndIf _FileWriteLog(@ScriptDir & "\Coins.log", "Coins = " & $coins & @TAB & $r & @TAB & $roll & @TAB & "W = " & $win & @TAB & "L = " & $lose & @TAB & "Win rate = " & $win / ($win + $lose) * 100) If $r > 5000 Then $coins -= $i * $min $i *= 2 Else $coins += $i * $min * $ratio ExitLoop EndIf WEnd Until $r < 5000 Until $coins < 20 Or $coins > 100000 EndFunc Func ExitIt() Exit EndFunc
-
Oh yes, my bad :/ But even with WEnd it loops forever and doesn't factor in when $r > 5000.
-
Hello, I'm trying to make a simple simulator, and here's the source code. I want it to loop as long as <5000 is rolled, and double $min each time, once it's >5000 I want it to add $min to $coins. I keep getting this error: "\Sim.au3" (21) : ==> "Until" statement with no matching "Do" statement.: Until $r > 5000" Thanks in advance, any other tips are appreciated too. #cs "Sim.ini"- file Global $coins = 1000 Global $min = 20 Global $ratio = 1.95 #ce #include "Sim.ini" HotKeySet("{END}", ExitIt) Coins() Func Coins() Local $r Local $i = 1 Do Do While 1 If $r = Random(0, 9999, 1) < 5000 Then $coins -= $i * $min $i *= 2 MsgBox(0, $coins, $i & " " & $r) Else $coins += $min * $ratio ExitLoop EndIf Until $r > 5000 Until $coins < 20 Or $coins > 1000 EndFunc Func ExitIt() Exit EndFunc
-
If opening for the first time, I want a simple GUI with a textbox where you simply type the number, 3, 4, 5 or whatever, then press "Ok". The script is simply exectuable by double clicking the script which launches and reads the config if it's already created. I have a delay in the loop. Edit: added ' #include "qwerty.ini" ' and "$qwerty=2" in the .ini file, which is used by the script ^^
-
Exactly, doesn't matter, just restart the application, making it restart only when it crashes/freezes is something I will work with later on. What I'm focusing on now is the config and how to do it, but I have honestly no idea.
-
Primary reason to why I made a new thread was to learn more about AutoIt and making configs with it. The scripts restarts the applications (qwerty) in case they freeze or crash (not when they do).
-
I am trying to close all of them, then opening them all again. That's the sole purpose of the script. The loop is infinite with a delay between the loops. The amount of "qwerty" varies and I want a config to determinte the exact amount.
-
Hello! So I made a script that closes the program, then reopens it. Here's the source: $qwerty1 = "C:\Users\3D\Desktop\qweqwe\1\qwerty1.exe" $qwerty2 = "C:\Users\3D\Desktop\qweqwe\2\qwerty2.exe" $qwerty3 = "C:\Users\3D\Desktop\qweqwe\3\qwerty3.exe" While 1 If ProcessExists("qwerty1.exe") Then ProcessClose("qwerty1.exe") EndIf If ProcessExists("qwerty2.exe") Then ProcessClose("qwerty2.exe") EndIf If ProcessExists("qwerty3.exe") Then ProcessClose("qwerty3.exe") EndIf Run($qwerty1) Run($qwerty2) Run($qwerty3) WEndSometimes I instead want to use this: $qwerty1 = "C:\Users\3D\Desktop\qweqwe\1\qwerty1.exe" $qwerty2 = "C:\Users\3D\Desktop\qweqwe\2\qwerty2.exe" While 1 If ProcessExists("qwerty1.exe") Then ProcessClose("qwerty1.exe") EndIf If ProcessExists("qwerty2.exe") Then ProcessClose("qwerty2.exe") EndIf Run($qwerty1) Run($qwerty2) WEndMy question is, how can I make a config in which I can choose the amount of "qwerty" used, for example qwerty=3. Also a first time-open config with a GUI and the specified amount of "qwerty"s used. Also, is there a way of making the script shorter? Thank you.
-
Hi, I made a couple simple scripts trying to learn coding with AutoIt. This one under is a small script that doesn't let you close it if you don't type the right password. Working as intended. <snip> Now here's the bruteforce script, which isn't quite working: <snip> What I want it to do is type all possibilities from 0000, 0001.. 0017... 9999. I want it only to work when the script that has to be cracked is active. And as well save the password which was correct. So how do I bruteforce that script correctly? Logging isn't neccessery if other options work. For educational purposes, thanks in advance.
-
Thanks a lot for the answers! Also, how do you insert a script like this?
-
Hi! I am pretty new with AutoIt, and wanted to ask help about the script, but managed to make it work myself. I am not sure why it works so I wanted to ask why and how it works as it does. Here's the script: HotKeySet("{PGDN}", "ExitIt") HotKeySet("{PGUP}", "JustAnotherFunc") Func ExitIt() Exit EndFunc $aa = 0 ; Why can't I just use 0 in While ? $bb = 101 ; The start of numbers sent $cc = 300 ; Where the numbers stop after 1-step Run("notepad.exe") WinWaitActive("Untitled - Notepad") Func JustAnotherFunc() While $aa < $cc ; Why and how does it work? Send($bb + 1) ; 1-step spam up to $cc Send("{ENTER}") $bb = $bb + 1 $aa = $bb ; The script continues infinite without this line. Why? WEnd EndFunc While 1 Sleep(100) WEnd Thanks in advance.