Alright, I am trying to make a script fix/improve a script that a few people are working on... but I got a little stumped and need some help. I have searched the tuts and cannot seem to find what I am looking for. This is something along the lines of what I have and need.
I started out with:
SCAR Code:
if(IsFKeyDown(5))then
begin
x:=0;
AddToReport('mytext');
x:=x+1;
end;
Well.. I ran into the problem of 'F' keys being used... So I wanted to switch off to using control+number commands as to fix the problem of actually inserting a number into the field when I click a number... This is what I have:
SCAR Code:
if(IsKeyDown(Chr(49)))then
begin
x:=0;
AddToReport('mytext');
x:=x+1;
end;
... but I need it to be something along the lines of:
SCAR Code:
if(IsKeyDown("control"+Chr(49)))then
begin
x:=0;
AddToReport('mytext');
x:=x+1;
end;
My second problem came at the end of the script. I am needing the script to wait for my next command before it continues. Well, I will post the short version of what I am trying. I have been getting frustrated and now changed what I have tried to this:
SCAR Code:
Procedure procedurex;
Begin
if(IsKeyDown(Chr(49)))then
begin
x:=0;
AddToReport('mytext');
x:=x+1;
end;
if(IsKeyDown(Chr(50)))then
begin
x:=0;
AddToReport ('mytext2');
x:=x+1;
end;
Procedure thisone;
begin
repeat
procedurex;
until(x>0);
end;
Begin
SetupSRL;
thisone;
theproggyrepoty;
End.
I tried this in the end of the script earlier:
SCAR Code:
Begin
repeat
repeat
procedurex;
until(x>0);
until(IsFKeyDown(5)); //end when F5 is pressed.
end.
That epic failed...it just added "mytext" to the report until it timed out... so my two questions are:
1. How to say if(IsKeyDown(Ctrl + Chr(49)))then
2. How to have the script repeat until I say done (F5)...
Please if you don't have the knowledge of how to help or any idea of where/who to ask ... then don't post... because I don't want to have to read the useless posts in this thread...
V/Respectfully,
anonymity