Author Topic: My script  (Read 657 times)

Offline Wolfer

  • Leecher
  • Posts: 6
  • Rep: 0
    • View Profile
My script
« on: January 01, 2011, 01:42:10 pm »
Hi.I do not  very well English because a i am spanish. Here mi script :
[scar]Program WolferDO;
const
x = 681;
y = 136;
d = 759;
l = 135;
m = 522;
j = 199;
o = 518;
p = 167;
var
xx,yy,dd,ll: Integer;
begin
repeat
ClickMouse(x,y,True);
Wait(600)
ClickMouse(m,j,true);
ClickMouse(d,l,True);
ClickMouse(x,y,True);
Wait(600)
ClickMouse(m,j,true);
ClickMouse(x,y,True);
Wait(600)
ClickMouse(o,p,true);
ClickMouse(d,l,True);
ClickMouse(x,y,True);
Wait(600)
ClickMouse(d,l,True);
ClickMouse(x,y,True);
Wait(600)
ClickMouse(m,j,true);
ClickMouse(d,l,True);
until(false)
end.[scar]
I want to know which scripts must be written to press a key.
Thank
Happy new year :D

Freddy1990.com

My script
« on: January 01, 2011, 01:42:10 pm »

Offline Janilabo

  • Sr. Member
  • ****
  • Posts: 301
  • Rep: 7
    • MSN Messenger - labojani@hotmail.com
    • Yahoo Instant Messenger - janilabo
    • View Profile
    • Email
Re: My script
« Reply #1 on: January 01, 2011, 03:15:26 pm »
KeyDown() + KeyUp() combo would work. If you want command to press a key.

Here is example for pressing ESC with that combo:

Code: [Select]
begin
  Wait(1000);
  WriteLn('Pressing ESC...');
  KeyDown(27);
  Wait(20 + Random(15));
  KeyUp(27);
  WriteLn('Done.');
end;

..or ENTER...

Code: [Select]
begin
  Wait(1000);
  WriteLn('Pressing ENTER...');
  KeyDown(13);
  Wait(20 + Random(15));
  KeyUp(13);
  WriteLn('Done.');
end.

For sending text, basic procedure would be SendKeys().

Read the SCAR Manual, if you want to look for other functions/procedure as well.. Press F1 in SCAR.

Freddy1990.com

Re: My script
« Reply #1 on: January 01, 2011, 03:15:26 pm »

Offline Wolfer

  • Leecher
  • Posts: 6
  • Rep: 0
    • View Profile
Re: My script
« Reply #2 on: January 01, 2011, 05:07:59 pm »
Thank you on your tips.

Freddy1990.com

Re: My script
« Reply #2 on: January 01, 2011, 05:07:59 pm »