Jump to content
Incommodious

Simple Script

Recommended Posts

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....

Link to comment
Share on other sites

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 by Incommodious
Link to comment
Share on other sites

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).

 

...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...