Ok so I am revising a really horrible script I made a week ago. Basically I want SendKeys to go from Message1 to Message2 after each repeat. (And then obviously go to Message3, MSG4, 5, ect...) Is this possible?
Ok so I am revising a really horrible script I made a week ago. Basically I want SendKeys to go from Message1 to Message2 after each repeat. (And then obviously go to Message3, MSG4, 5, ect...) Is this possible?
Post the script.
Do not propose an idea of peculation without evidence of such action.
http://cashcrate.com/704591 click here and make money!
Not until it's done :P to noobish right now... I guess it will still be nooby when I post it... But its a pretty easy concept lemme post an example. One minute.
SCAR Code:program New;
var
MessageArray: Array of String;
i: integer;
begin
SetArrayLength(MessageArray, 2);
MessageArray[0] := 'Hi';
MessageArray[1] := 'Hello';
{...}
repeat
SendKeys(MessageArray[i mod Length(MessageArray)]);
Inc(i); //i := i + 1;
wait(500);
until(false)
end.
or
SCAR Code:program New;
var
MessageArray: Array of String;
i: integer;
begin
SetArrayLength(MessageArray, 2);
MessageArray[0] := 'Hi';
MessageArray[1] := 'Hello';
{...}
repeat
for i := 0 to Length(MessageArray) - 1 do
begin
SendKeys(MessageArray[i]);
wait(500);
end;
until(false)
end.
Interested in C# and Electrical Engineering? This might interest you.
In all the languages I know there is a "for" loop. I'm not sure\re if that is in scar though. Try looking it up.
Smartz would that be in one procedure, or could I set the MessageArray as a const? Also what is the {...}?
SCAR Code:procedure Talk;
var
MessageArray: Array of String;
i: integer;
begin
SetArrayLength(MessageArray, 2);
MessageArray[0] := 'Hi';
MessageArray[1] := 'Hello';
{...}
repeat
SendKeys(MessageArray[i mod Length(MessageArray)]);
Inc(i); //i := i + 1;
wait(500);
until(i > Length(MessageArray)
end;
MessageArray must be a variable, but either of those will work fine as procedures.
Interested in C# and Electrical Engineering? This might interest you.
Great thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)