Skrip Posted December 25, 2005 Share Posted December 25, 2005 TrayTip("", "Press F5 to stop renaming", 10, 1)HotKeySet("{F5}", "stop")$name = RandomRun("notepad.exe")WinWaitActive("Untitled", "", 2)Send("!f")Send("o")If WinExists("Open") ThenSleep(50)WinMove ( "Open", "", 0, 0 );MouseMove(@DesktopWidth - 990, @DesktopHeight - 900);MouseClick("left")Sleep(50)MouseMove(140, 80)MouseClick("right")sleep(50)MouseMove(220, 410)MouseClick("left")Send("$name")Send("{ENTER}")Sleep(50)MouseMove(140, 90)MouseClick("right")sleep(50)MouseMove(220, 420)MouseClick("left")Send("$name")Send("{ENTER}")Sleep(50)MouseMove(140, 111)MouseClick("right")sleep(50)MouseMove(220, 435)MouseClick("left")Send("$name")Send("{ENTER}")Sleep(50)MouseMove(140, 122)MouseClick("right")sleep(50)MouseMove(220, 445)MouseClick("left")Send("$name")Send("{ENTER}")Sleep(50)MouseMove(140, 133)MouseClick("right")sleep(50)MouseMove(220, 455)MouseClick("left")Send("$name")Send("{ENTER}")Sleep(50)MouseMove(140, 144)MouseClick("right")sleep(50)MouseMove(220, 465)MouseClick("left")Send("$name")Send("{ENTER}")Sleep(50)MouseMove(140, 155)MouseClick("right")sleep(50)MouseMove(220, 475)MouseClick("left")Send("$name")Send("{ENTER}")Sleep(50)MouseMove(140, 166)MouseClick("right")sleep(50)MouseMove(220, 485)MouseClick("left")Send("$name")Send("{ENTER}")EndIfFunc stop()exitEndFuncFunc Random()Send(". " & Random(0, 99, 1) )EndFuncI know it will take up CPU and I know how to fix that but I can't get it to work.Everything red is what I need help with I can't get a good random func going please help! I want them all to change to a random number [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
Skrip Posted December 25, 2005 Author Share Posted December 25, 2005 I also tried this with no luck expandcollapse popupTrayTip("", "Press F5 to stop renaming", 10, 1) HotKeySet("{F5}", "stop") ; ; If Random() < 99.5 Then $name = "test" Else $name = "test2" Endif ; ; Run("notepad.exe") WinWaitActive("Untitled", "", 2) Send("!f") Send("o") If WinExists("Open") Then Sleep(50) WinMove ( "Open", "", 0, 0 ) ;MouseMove(@DesktopWidth - 990, @DesktopHeight - 900) ;MouseClick("left") Sleep(50) MouseMove(140, 80) MouseClick("right") sleep(50) MouseMove(220, 410) MouseClick("left") Send("$name") Send("{ENTER}") Sleep(50) MouseMove(140, 90) MouseClick("right") sleep(50) MouseMove(220, 420) MouseClick("left") Send("name2") Send("{ENTER}") Sleep(50) MouseMove(140, 111) MouseClick("right") sleep(50) MouseMove(220, 435) MouseClick("left") Send("name3") Send("{ENTER}") Sleep(50) MouseMove(140, 122) MouseClick("right") sleep(50) MouseMove(220, 445) MouseClick("left") Send("name4") Send("{ENTER}") Sleep(50) MouseMove(140, 133) MouseClick("right") sleep(50) MouseMove(220, 455) MouseClick("left") Send("name5") Send("{ENTER}") Sleep(50) MouseMove(140, 144) MouseClick("right") sleep(50) MouseMove(220, 465) MouseClick("left") Send("name6") Send("{ENTER}") Sleep(50) MouseMove(140, 155) MouseClick("right") sleep(50) MouseMove(220, 475) MouseClick("left") Send("name7") Send("{ENTER}") Sleep(50) MouseMove(140, 166) MouseClick("right") sleep(50) MouseMove(220, 485) MouseClick("left") Send("name8") Send("{ENTER}") EndIf Func stop() exit EndFunc [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 25, 2005 Moderators Share Posted December 25, 2005 expandcollapse popupTrayTip("", "Press F5 to stop renaming", 10, 1) HotKeySet("{F5}", "stop") Run("notepad.exe") WinWaitActive("Untitled", "", 2) Send("!f") Send("o") If WinExists("Open") Then Sleep(50) WinMove ( "Open", "", 0, 0 ) ;MouseMove(@DesktopWidth - 990, @DesktopHeight - 900) ;MouseClick("left") Sleep(50) MouseMove(140, 80) MouseClick("right") sleep(50) MouseMove(220, 410) MouseClick("left") RandomSend() Send("{ENTER}") Sleep(50) MouseMove(140, 90) MouseClick("right") sleep(50) MouseMove(220, 420) MouseClick("left") RandomSend() Send("{ENTER}") Sleep(50) MouseMove(140, 111) MouseClick("right") sleep(50) MouseMove(220, 435) MouseClick("left") RandomSend() Send("{ENTER}") Sleep(50) MouseMove(140, 122) MouseClick("right") sleep(50) MouseMove(220, 445) MouseClick("left") RandomSend() Send("{ENTER}") Sleep(50) MouseMove(140, 133) MouseClick("right") sleep(50) MouseMove(220, 455) MouseClick("left") RandomSend() Send("{ENTER}") Sleep(50) MouseMove(140, 144) MouseClick("right") sleep(50) MouseMove(220, 465) MouseClick("left") RandomSend() Send("{ENTER}") Sleep(50) MouseMove(140, 155) MouseClick("right") sleep(50) MouseMove(220, 475) MouseClick("left") RandomSend() Send("{ENTER}") Sleep(50) MouseMove(140, 166) MouseClick("right") sleep(50) MouseMove(220, 485) MouseClick("left") RandomSend() Send("{ENTER}") EndIf Func stop() exit EndFunc Func RandomSend(); <<< You had Func Random() - Can't name a function a keyword Send(". " & Random(0, 99, 1) ) EndFunc Also, what Editor are you using, SciTe would show you all these errors... Try running my script in my signature if your having problems. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Skrip Posted December 25, 2005 Author Share Posted December 25, 2005 (edited) Yea, 2 things -- 1 -- I have the beta -- 2 -- what is SciTe? And thanks for the support! Edited December 25, 2005 by Firestorm [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted December 25, 2005 Moderators Share Posted December 25, 2005 SciTe is the Text Editor that most of that use AuotIt use. It's updated by Jdeb, and he keeps it up to date with all the new addon's that come out with AutoIt. If you don't hae it, and your new to using AutoIt, IMHO it's a must have. Like I said, run the script in my signature and download it... you'll enjoy the ease of use and debugging opportunities. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
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