uk80glue Posted August 14, 2009 Share Posted August 14, 2009 Friend sent me a script, it's supposed to loop. It's the exact same script he's using and his loops, however mine doesn't. I run the script, it does its thing one time then AutoIt closes. Is there something I'm missing? Link to comment Share on other sites More sharing options...
Yashied Posted August 14, 2009 Share Posted August 14, 2009 I suggest you ask your friend about it. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Belfigor Posted August 14, 2009 Share Posted August 14, 2009 Or show your script to us [size="1"]My bear is so cute asleep in the closet, not even drinking vodka. My nuclear bomb name is Natasha.[/size] Link to comment Share on other sites More sharing options...
uk80glue Posted August 14, 2009 Author Share Posted August 14, 2009 We've been over it like 10 times and for some reason mine just will not loop. It's the exact same script, exact same version of AutoIt. Link to comment Share on other sites More sharing options...
uk80glue Posted August 14, 2009 Author Share Posted August 14, 2009 here is the script: Global $Paused Global $35check Global $cratecheck Global $movecheck Global $shoecheck Global $unfinishedcheck HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") Opt("MouseClickDragDelay", 100) #include <Misc.au3> Sleep("1000") ; Pause to switch to SWG - Windowed Mode $i = 0 ; Infinite loop SplashTextOn("Setup", "Leftclick somewhere on screen that turns dark with attach SEA popup", 400, 100, -1, -1, 1, "Ariel", 14) While 1 Sleep(100) If _IsPressed("01") Then $pos = MouseGetPos() ExitLoop EndIf WEnd SplashOff() $popX = $pos[0] $popY = $pos[1] Sleep(300) SplashTextOn("Setup", "Click on the +35 powerbit (left blue side). Make sure the status menu opens", 400, 100, -1, -1, 1, "Ariel", 14) While 1 Sleep(100) If _IsPressed("01") Then $pos = MouseGetPos() ExitLoop EndIf WEnd SplashOff() $modX = $pos[0] $modY = $pos[1] Sleep(1000) SplashTextOn("Setup", "Click just left above Power in the status menu", 400, 100, -1, -1, 1, "Ariel", 14) While 1 Sleep(100) If _IsPressed("01") Then $pos = MouseGetPos() ExitLoop EndIf WEnd SplashOff() $pX = $pos[0] $pY = $pos[1] Sleep(1000) SplashTextOn("Setup", "Click just leftabove the 35 in the status menu", 400, 100, -1, -1, 1, "Ariel", 14) While 1 Sleep(100) If _IsPressed("01") Then $pos = MouseGetPos() ExitLoop EndIf WEnd SplashOff() $35Cx1 = $pos[0] $35Cy1 = $pos[1] $35Cx2 = $pos[0] + 14 $35Cy2 = $pos[1] + 10 Sleep(300) SplashTextOn("Setup", "Leftclick on the spot right of the +35 in inventory, so you'll touch the item you use for grinding", 400, 100, -1, -1, 1, "Ariel", 14) While 1 Sleep(100) If _IsPressed("01") Then $pos = MouseGetPos() ExitLoop EndIf WEnd SplashOff() $mod2X = $pos[0] $mod2Y = $pos[1] Sleep(300) SplashTextOn("Setup", "Leftclick on the +35 Powerbit storage", 400, 100, -1, -1, 1, "Ariel", 14) While 1 Sleep(100) If _IsPressed("01") Then $pos = MouseGetPos() ExitLoop EndIf WEnd SplashOff() $storageX = $pos[0] $storageY = $pos[1] Sleep(300) SplashTextOn("Setup", "Leftclick on the crate of items you use for grinding", 400, 100, -1, -1, 1, "Ariel", 14) While 1 Sleep(100) If _IsPressed("01") Then $pos = MouseGetPos() ExitLoop EndIf WEnd SplashOff() $shoeX = $pos[0] $shoeY = $pos[1] Sleep(300) SplashTextOn("Setup", "Leftclick on the junktool", 400, 100, -1, -1, 1, "Ariel", 14) While 1 Sleep(100) If _IsPressed("01") Then $pos = MouseGetPos() ExitLoop EndIf WEnd SplashOff() $junkX = $pos[0] $junkY = $pos[1] Sleep(300) SplashTextOn("Setup", "Leftclick on the RE tool", 400, 100, -1, -1, 1, "Ariel", 14) While 1 Sleep(100) If _IsPressed("01") Then $pos = MouseGetPos() ExitLoop EndIf WEnd SplashOff() $reX = $pos[0] $reY = $pos[1] Sleep(300) SplashTextOn("Setup", "Leftclick on the unfinished powerbit (storage)", 400, 100, -1, -1, 1, "Ariel", 14) While 1 Sleep(100) If _IsPressed("01") Then $pos = MouseGetPos() ExitLoop EndIf WEnd SplashOff() $unfinishedX = $pos[0] $unfinishedY = $pos[1] Sleep(300) MouseClick("left", $modX, $modY, 1, 3) Sleep(1500) $pre35check = PixelChecksum($pX, $pY, $pX + 10, $pY + 10) $35check = PixelChecksum($35Cx1, $35Cy1, $35Cx2, $35Cy2) $popcheck = PixelGetColor($popX, $popY) $cratecheck = PixelChecksum($shoeX - 5, $shoeY - 5, $shoeX + 5, $shoeY + 5) $shoecheck = PixelChecksum($mod2X, $mod2Y, $mod2X + 10, $mod2Y + 10) $unfinishedcheck = PixelChecksum($unfinishedX - 10, $unfinishedY - 10, $unfinishedX + 10, $unfinishedY + 10) Sleep(100) MouseClickDrag("left", $modX, $modY, $storageX, $storageY, 3) Sleep(1000) $movecheck = PixelChecksum($modX - 5, $modY - 5, $modX + 5, $modY + 5) Sleep(1000) MouseClickDrag("left", $unfinishedX, $unfinishedY, $modX, $modY, 3) Do Sleep(100) Until Not isempty() Sleep(1000) Do MouseClick("left", $modX, $modY, 1, 3) ToolTip("1", 0, 0) Do Sleep(100) Until PixelChecksum($pX, $pY, $pX + 10, $pY + 10) == $pre35check ToolTip("") If check35() Then Do MouseClickDrag("left", $modX, $modY, $storageX, $storageY, 3) Sleep(600) Until isempty() Do If Not unfinishedcheck() Then Exit 0 EndIf MouseClickDrag("left", $unfinishedX, $unfinishedY, $modX, $modY, 3) Sleep(500) If (isempty()) Then Sleep(500) If (isempty()) Then Sleep(500) If (isempty()) Then Sleep(500) EndIf EndIf EndIf Until Not isempty() EndIf If Not cratecheck() Then Exit 0 EndIf Do MouseClickDrag("left", $modX, $modY, $reX, $reY, 3) Sleep(1000) Until isempty() Do MouseClick("right", $junkX, $junkY, 1, 3) Sleep(1000) Send("5") MouseClick("left", $junkX, $junkY, 1, 3) Sleep(500) $xx = 0 Do Sleep(500) $xx = $xx + 1 Until Not isempty() Or $xx > 10 Until Not isempty() Do MouseClickDrag("left", $modX, $modY, $reX, $reY, 3) Sleep(1000) Until isempty() Do MouseClick("right", $reX, $reY, 1, 3) Sleep(1000) Send("6") MouseClick("left", $reX, $reY, 1, 3) Sleep(500) Until Not isempty() MouseClick("left", $shoeX, $shoeY, 2, 3) Sleep(200) Do Sleep(500) Until Not shoecheck() Do MouseClickDrag("left", $modX, $modY, $mod2X, $mod2Y, 3) Sleep(1000) Until popup() Send("{enter}") Do Sleep(600) Until Not popup() Do MouseClickDrag("left", $modX, $modY, $reX, $reY, 3) Sleep(1000) Until isempty() Do MouseClick("right", $reX, $reY, 1, 3) Sleep(1000) Send("5") MouseClick("left", $reX, $reY, 1, 3) Sleep(500) Until Not isempty() Until $i = 1 Func check35() Return PixelChecksum($35Cx1, $35Cy1, $35Cx2, $35Cy2) == $35check EndFunc ;==>check35 Func shoecheck() Return PixelChecksum($mod2X, $mod2Y, $mod2X + 10, $mod2Y + 10) == $shoecheck EndFunc ;==>shoecheck Func isempty() Return PixelChecksum($modX - 5, $modY - 5, $modX + 5, $modY + 5) == $movecheck EndFunc ;==>isempty Func cratecheck() Return PixelChecksum($shoeX - 5, $shoeY - 5, $shoeX + 5, $shoeY + 5) == $cratecheck EndFunc ;==>cratecheck Func unfinishedcheck() ;Return PixelChecksum($unfinishedX - 5, $unfinishedY - 5, $unfinishedX + 5, $unfinishedY + 5) == $unfinishedcheck Return True EndFunc ;==>unfinishedcheck ;Pause Script Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script Paused', 0, 0) WEnd ToolTip("") EndFunc ;==>TogglePause Func popup() Return PixelGetColor($popX, $popY) <> $popcheck EndFunc ;==>popup ;Terminate Script Func Terminate() Exit 0 EndFunc ;==>Terminate Link to comment Share on other sites More sharing options...
Belfigor Posted August 15, 2009 Share Posted August 15, 2009 While 1 Sleep(100) If _IsPressed("01") Then $pos = MouseGetPos() ExitLoop EndIf WEnd If it detect Left Mouse button click it will auto exit script. Try to change it to somthing else. [size="1"]My bear is so cute asleep in the closet, not even drinking vodka. My nuclear bomb name is Natasha.[/size] Link to comment Share on other sites More sharing options...
uk80glue Posted August 15, 2009 Author Share Posted August 15, 2009 stupid question, but how? assume i want to change it to the "8" key. sorry, I've never actually written any scripts or anything before. Link to comment Share on other sites More sharing options...
Belfigor Posted August 15, 2009 Share Posted August 15, 2009 stupid question, but how? assume i want to change it to the "8" key. sorry, I've never actually written any scripts or anything before. Try to use this If _IsPressed("38") Then [size="1"]My bear is so cute asleep in the closet, not even drinking vodka. My nuclear bomb name is Natasha.[/size] Link to comment Share on other sites More sharing options...
uk80glue Posted August 15, 2009 Author Share Posted August 15, 2009 cool, ill test this out in a bit and post my results. thanks for the help. Link to comment Share on other sites More sharing options...
uk80glue Posted August 15, 2009 Author Share Posted August 15, 2009 not working, sort of. I still need to be able to click items in game, now clicking them does nothing. problem I had before is everything ran smoothly, but it would only work once. the script would run, then at the end instead of looping AutoIt would just close out. Link to comment Share on other sites More sharing options...
Belfigor Posted August 15, 2009 Share Posted August 15, 2009 (edited) well i dont work with spagetty code for a very long time >_< Post origenal au3 file, it will be more easy to check it Edited August 15, 2009 by Belfigor [size="1"]My bear is so cute asleep in the closet, not even drinking vodka. My nuclear bomb name is Natasha.[/size] Link to comment Share on other sites More sharing options...
uk80glue Posted August 15, 2009 Author Share Posted August 15, 2009 http://www.filefront.com/14287269/AutoREing.au3 Link to comment Share on other sites More sharing options...
Belfigor Posted August 15, 2009 Share Posted August 15, 2009 May be there is diferent interface options between you and your friend? Script will autoexit loop if cratecheck() <> $cratecheck [size="1"]My bear is so cute asleep in the closet, not even drinking vodka. My nuclear bomb name is Natasha.[/size] 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