username9384 Posted August 1, 2015 Share Posted August 1, 2015 Hey Everyone, Thanks for being here to help. Using SCAR Divi 3.13 I'm trying to make a script that will search the screen for a color, and then click it. I know the color is always there no matter what. The color moves around the screen. Here's what I have: program Automage; var c, i, x, y, w, h:integer; begin i := 1; c := 0; findwindowtitlepart('game',false); activateclient; wait(700); keydown(115); GetClientDimensions(w, h); while (i = 1) do begin while (c < 60) do begin findColor(x, y, 1638350, 0, 0, w - 1, h - 1); clickmouse(x, y, true); wait(1000); c := c + 1; end; wait(10000); c := 0; end; end. After targeting the window, and hitting play, the mouse clicks but it keeps pointing at 1 location. At about 30, 50. If I try changing the paramaters of findColor: findColor(x, y, 1638350, 0, 0, w - 1, h - 1); I get "Canvas does not allow drawing" If I try using findColorCircle, I get the same error. Thanks, -username Quote Link to comment Share on other sites More sharing options...
username9384 Posted August 2, 2015 Author Share Posted August 2, 2015 After trying to use another script where I had mouse controls, it also doesnt work and the mouse is clicking in the same spot no matter what coords I provide. Quote Link to comment Share on other sites More sharing options...
FHannes Posted August 2, 2015 Share Posted August 2, 2015 SCAR Divi 3.13 is outdated and no longer supported. It has a lot of bugs which were later resolved. Please update to the latest version 3.41. And use the edit button instead of double posting. Quote Link to comment Share on other sites More sharing options...
username9384 Posted August 3, 2015 Author Share Posted August 3, 2015 Sorry, I completely forgot that for some reason the script only worked inside virtual box. Well I ran it inside and it works perfect! (The mouse click ones always only worked inside virtualbox.) But hey, last time I downloaded the newest SCAR I couldn't figure out how to make it press keys. That's why I reverted back to 3.13 I appreciate your devotion to helping SCAR users all these years Freddy! This thread can be closed. Quote Link to comment Share on other sites More sharing options...