Incommodious Posted November 15, 2012 Share Posted November 15, 2012 I am writing a script that requires me to hold down control until FindColor(1638350,352,204) disappears. This is what i have so far i just dont know how to finish coding this. if FindColor(1638350,352,204) then VKeyDown(39); Wait(250); repeat VKeyDown(17); Wait(200); VKeyUp(17); until ???????? // untill the FindColor(1638350,352,204) disappears. Quote Link to comment Share on other sites More sharing options...
Janilabo Posted November 15, 2012 Share Posted November 15, 2012 if (GetColor(352, 204) = 1638350) then begin VKeyDown(39); Wait(250); repeat VKeyDown(17); Wait(200); VKeyUp(17); until (GetColor(352, 204) <> 1638350); // until color at (352, 204) isn't 1638350. VKeyUp(39); // If needed.. end; Quote Link to comment Share on other sites More sharing options...
Incommodious Posted November 15, 2012 Author Share Posted November 15, 2012 Thank you very much Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted November 15, 2012 Share Posted November 15, 2012 until (GetColor(352, 204) <> 1638350); // until color at (352, 204) isn't 1638350. or until not (GetColor(352, 204) = 1638350); Six of one, half dozen of another. Some people find the use of not confusing. Some people prefer it. Quote Link to comment Share on other sites More sharing options...
LordJashin Posted November 15, 2012 Share Posted November 15, 2012 requires me to hold down control So do you want SCAR to hold down control, or are you going to do it? if you type VK_ then hit CTRL+Space, in SCAR you can see the VKeys that you can use. There is: VK_LCONTROL, and VK_RCONTROL So then you could do VKeyDown(VK_LCONTROL); Or you can see the vkeys here - http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731%28v=vs.85%29.aspx Anyway it seems Jani has posted the corrected script. I suggest you read the All In One Beginner Tutorial for SCAR Divi. or until not (GetColor(352, 204) = 1638350); Six of one, half dozen of another. Some people find the use of not confusing. Some people prefer it. What I find confusing, is using <<< and >> for bit shifts or other meanings in programming languages x.x So glad we have shl, and shr. Quote Link to comment Share on other sites More sharing options...
Incommodious Posted November 15, 2012 Author Share Posted November 15, 2012 I want scar to hold down ctrl untill it has disappeared. could u edit the part of the script at the top^^ to do that Quote Link to comment Share on other sites More sharing options...
FHannes Posted November 15, 2012 Share Posted November 15, 2012 There is: VK_LCONTROL, and VK_RCONTROL And VK_CONTROL I want scar to hold down ctrl untill it has disappeared. could u edit the part of the script at the top^^ to do that I'm confused, Janilabo already did this? Quote Link to comment Share on other sites More sharing options...
Incommodious Posted November 15, 2012 Author Share Posted November 15, 2012 I wasn't sure if he did or not, I havn't had a chance to test it out yet and was getting somewhat confused, but thanks for telling me Freddy Quote Link to comment Share on other sites More sharing options...
LordJashin Posted November 15, 2012 Share Posted November 15, 2012 Try this maybe? [scar] program aaa; begin if (GetColor(352, 204) = 1638350) then begin VKeyDown(VK_CONTROL); Repeat wait(500); until (GetColor(352, 204) <> 1638350); VKeyUp(VK_CONTROL); end; end. [/scar] Quote Link to comment Share on other sites More sharing options...