zaider Posted February 26, 2012 Share Posted February 26, 2012 First of all I want to underline that I am not a pro scripter, so don't blame me for not knowing! I have written this script, but I don't seem to get it to work like I want. Procedure check;var x,y:integer; begin if FindColor(x,y,3038369,1,1,405,371) then begin ClickMouse(x,y, true); end; begin repeat ClickMouse(10,10,true) check; SendKeys('/goto' +IntToStr(Random(10))); Wait(5000); until(False); end. Basically I want the script to click on a color when it pops up and other than that I want it to type /goto 1-10 (random) every 5000 ms, but where should I add +chr(13)? I have tried like everywhere in the SendKeys line but it gives me error all the time. Also as the script looks now, it says "Identifier expected" at line 17. ---------- Post added at 06:35 PM ---------- Previous post was at 06:02 PM ---------- Fixed. program New; Procedure check; var x,y:integer; begin if FindColor(x,y,3038369,1,1,405,371) then begin ClickMouse(x,y, true); end; end; begin repeat check; ClickMouse(10,10,true) Wait(8000+random(1000)); check; SendKeys('/goto ' +IntToStr(Random(101))); SendKeys(#13) check; Wait(5000+random(1000)); until(False); end. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted February 27, 2012 Share Posted February 27, 2012 Glad you could fix the issue on you own really helps in the understanding process. Also for future reference use [ Scar] [/scar ] around your scar code and it wont loose its formatting ect. be a lot easier for us to read.[/Code] Quote Link to comment Share on other sites More sharing options...