Dizzle Posted March 29, 2012 Author Share Posted March 29, 2012 It does repeat the color finding all the times, thats the concept of using timers. If you want it i can make one that uses more coordinates but only if you can't use opiumhautopium1's script, cause it's a little more advanced when using timers. ---------- Post added at 05:31 PM ---------- Previous post was at 05:27 PM ---------- Okay look at this code and if you have a little experience in coding you will understand: [sCAR]var T1: Integer; begin T1 := GetTimeRunning + 5000 + random(2500); //Waits between 5-7.5 seconds repeat if T1 < GetTimeRunning then begin //Call function end; until false; end.[/sCAR] Well, all I want is just my excisting script + the ability to switch between tabs. And so far, I can't see how it should work the way you guys suggest. The script you posted there, what is there to see? As far I can tell, it's nothing I can use. Switching tabs, is to me, a very simply manoeuvre, and if someone could just explain how to extend the script, I could finish it myself. look scar is working with the aktive windowthe procedure findright window and abccom stet your browsergame window to aktive window and work with the window the procedure tab make clicks at the right tabs u only have to insert the right coordinates from the tabs u want to use then u can insert your colorfinding procedur in your script at the last step u write the main betwen begin and end. like procedure1 procedure 2 procedure3 begin procedure 3 procedure 2 if you want to repeat something repeat procedure2 until ( a event like keydown is true or procedure2 is repeatet 20 times if u dont want to loop something dont use repeat until ^^) procedure 1 end. u can call the funktions like u want at the main loop it is not possible with scar to find colors while a tab or a window is hidden minimized or closed only what u see scar can find with color funktions As I wrote, you don't understand me. You know tabs, right? The new windows you make inside your browser. They're visible at all times, so I don't know why you explain something about things not being visible. If I make two of those, they're visible and clickable at any time, as long Firefox is open, and it will be at all times. ---------- Post added at 08:33 PM ---------- Previous post was at 08:26 PM ---------- Okay, let me take a moment to explain again. I have the script to do exactly what I want. So I thought, why not make it even better, and double the profit? So I wanna be able to open two tabs(read: tabs inside Firefox, Explorer, whatever) Run the script, so it click the colours, repeating this step every 5th second. Make a new repeat, where it clicks tab1 every 1 minute, and it click tab2 every 1½ minute. So they are not attached in any way, but can repeat itself regardless of the other repeat, so that it now cycles trough the tabs and clicking the colours in both tabs. Quote Link to comment Share on other sites More sharing options...
opiumhautopium1 Posted March 29, 2012 Share Posted March 29, 2012 (edited) open firefox and run script see what happen program New; var sm,Firefox_x2, Firefox_y2:integer; procedure findRightWindow; // finds windows begin if FindWindowTitlePart('Firefox',true) then begin SM := GetClientWindowHandle; Writeln('firefoxwindow found: '+inttostr(SM)); end else Writeln('firefoxNOT found '); end; procedure Firefox; begin Writeln('KontrollpunktMainMap)'); SetClientWindowHandle(sm); GetClientDimensions(Firefox_x2, Firefox_y2); ActivateClient; Writeln('Firefox x2,y2 '+inttostr(Firefox_x2)+'x '+inttostr(Firefox_y2)); end; Procedure FindTab1; begin Firefox; movemouse (276,40); wait(2000); ClickMouse(276,40,True); end; Procedure FindTab0; begin Firefox; movemouse (26,40); wait(2000); ClickMouse(26,40,True); end; begin findRightWindow; repeat FindTab1; wait(1500); FindTab0; wait(1500); until(false); end. is it to change betwen 2 tabs that what u want ? and of course u can call in every tab a other function ( to find the right color may be) may be u have to change the coordinates in FindTab0; and FindTab1 when mouse not move to right tab if the tab change is what u want you can do something like this insert in script Procedure FindClick; begin your color funktion or whatever end; begin findRightWindow; repeat FindTab1; FindClick; wait(5000); FindTab0; FindClick; wait(5000); until(false); Edited March 29, 2012 by opiumhautopium1 Quote Link to comment Share on other sites More sharing options...
sjesper Posted March 29, 2012 Share Posted March 29, 2012 Oh im sorry, i thought u had some scripting skills, and would understand the thing i said. But the thing about this is that you can't just do a repeat FindColor; Wait(5000); NewTab; until(false) You do want it to search for the color the whole time right? Then you need to do like i posted in my first post in this thread just with more coordinates (of your tabs). Quote Link to comment Share on other sites More sharing options...
Dizzle Posted March 30, 2012 Author Share Posted March 30, 2012 Oh im sorry, i thought u had some scripting skills, and would understand the thing i said. But the thing about this is that you can't just do a repeat FindColor; Wait(5000); NewTab; until(false) You do want it to search for the color the whole time right? Then you need to do like i posted in my first post in this thread just with more coordinates (of your tabs). But when I look at the script you posted earlier(2nd page), it looks like it wont repeat itself(colour wise), instead, it'll repeat all steps, which is not what I want it to do. I want them seperated, so they both repeat, but not within the same repeat.. Quote Link to comment Share on other sites More sharing options...