Incommodious Posted November 16, 2012 Share Posted November 16, 2012 Ive been trying the script for a little bit now but cant seem to get it to work right. Here is what I am trying to do. When the color 1638350 appears at (352, 203), it needs to press the Right arrow key and hold down Ctrl until the color 1638350 at (352, 203) disappears end. thank you very much Quote Link to comment Share on other sites More sharing options...
LordJashin Posted November 16, 2012 Share Posted November 16, 2012 Thank you for being more clear. However you did not need to create a new thread for this. Try this: [scar] program aaa; begin if (GetColor(352, 204) = 1638350) then begin PressVKey(VK_RIGHT); VKeyDown(VK_CONTROL); Repeat wait(500); until (GetColor(352, 204) <> 1638350); VKeyUp(VK_CONTROL); end; end. [/scar] This will press the "Right Arrow" key once if the color is found, and hold down the control key. Then when it isn't found the control key is no longer pressed.... Quote Link to comment Share on other sites More sharing options...
Incommodious Posted November 16, 2012 Author Share Posted November 16, 2012 Thanks, i thought it would be a good idea to make a new thread in a different topic cause i was requesting something els, my bad. Quote Link to comment Share on other sites More sharing options...
Incommodious Posted November 16, 2012 Author Share Posted November 16, 2012 (edited) So far this is working for what i modified it to do but instead of pressing the Right Arrow Key is presses (im on my laptop) FN+O(6) so on a normal keyboard it would be the 6 button all the way on the right of the Keyboard and also how do you make it a Code SCAR instead of just Code? program aaa; begin repeat if (GetColor(344, 193) = 1638350) then begin VKeyDown(VK_RIGHT); Wait(250) VKeyUp(VK_RIGHT); Wait(50) VKeyDown(VK_CONTROL); Repeat wait(1000); until (GetColor(344, 193) <> 1638350); VKeyUp(VK_CONTROL); end; until(false) ; end. Edited November 16, 2012 by Incommodious Quote Link to comment Share on other sites More sharing options...
Janilabo Posted November 16, 2012 Share Posted November 16, 2012 You do: [sc*r]SCAR script stuff goes here...[/sc*r] *=a Quote Link to comment Share on other sites More sharing options...
LordJashin Posted November 16, 2012 Share Posted November 16, 2012 So far this is working for what i modified it to do but instead of pressing the Right Arrow Key is presses (im on my laptop) FN+O(6) so on a normal keyboard it would be the 6 button all the way on the right of the Keyboard and also how do you make it a Code SCAR instead of just Code? program aaa; begin repeat if (GetColor(344, 193) = 1638350) then begin VKeyDown(VK_RIGHT); Wait(250) VKeyUp(VK_RIGHT); Wait(50) VKeyDown(VK_CONTROL); Repeat wait(1000); until (GetColor(344, 193) <> 1638350); VKeyUp(VK_CONTROL); end; until(false) ; end. Ah... so now you want it to push the Function (FN) key and the 6 key? Well you would need some way to find out what scan code or VKEY corresponds to this function key (FN). ... Quote Link to comment Share on other sites More sharing options...
Incommodious Posted November 16, 2012 Author Share Posted November 16, 2012 I dont want it to push FN and 6, im saying it is. It shouldnt be but it is, idk why. Quote Link to comment Share on other sites More sharing options...