Special Ed
2007-03-20 18:46:18
Ok… I'm trying to make this script that you run and then all you do is play RS, it records your actions and uses "Writeln" to display the coding in the debug box. It's going smoothly so far but i need someone to give me a hand fixing this function. This is not meant to create a script for you but merely to help you make framework for it.
*BTW if anyone wants to help or give some ideas it would be greatly appreciated*
This part of the coding works on rightclick in the mainscreen, it finds what you clicked on and what option you chose but it has a lot of trouble finding what object you clicked on "The Name" at least but it works well otherwise.
The problem I'm having is that I want it to find the objects name using the option box rather than having it use the uptext, it only works every once and a while but if no one can fix it to make it work this way i have another idea.
Still having trouble with the RightClick but I added some new stuff…
[New] 3.21.07
Make_RadialWalk March 21st
StartRadialDegrees March 21st
EndRadialDegrees March 21st
MouseIn_Quadrant March 21st
SpecialArcTan March 21st
T'm kinda confused on the RadialWalk thing because it says to use numbers between 0 - 1440 but in the examples it is using degrees ..
StartRadial/EndRadial := Any number between 0-1440. 0=N,90=E,180=S,270=W. DO NOT USE NUMBERS UNDER 0 or ABOVE 1440
P.S. If you want to check out my progress so far you can download it but PLEASE give me feedback, also this will be members when it comes out I think.
*BTW if anyone wants to help or give some ideas it would be greatly appreciated*
This part of the coding works on rightclick in the mainscreen, it finds what you clicked on and what option you chose but it has a lot of trouble finding what object you clicked on "The Name" at least but it works well otherwise.
The problem I'm having is that I want it to find the objects name using the option box rather than having it use the uptext, it only works every once and a while but if no one can fix it to make it work this way i have another idea.
Still having trouble with the RightClick but I added some new stuff…
[New] 3.21.07
Make_RadialWalk March 21st
StartRadialDegrees March 21st
EndRadialDegrees March 21st
MouseIn_Quadrant March 21st
SpecialArcTan March 21st
T'm kinda confused on the RadialWalk thing because it says to use numbers between 0 - 1440 but in the examples it is using degrees ..
StartRadial/EndRadial := Any number between 0-1440. 0=N,90=E,180=S,270=W. DO NOT USE NUMBERS UNDER 0 or ABOVE 1440
procedure RightClick_MainScreen;
var
MX,MY,Color,OptX,OptY,MouseRand:integer;
Opt1,Opt2,Opt3,Opt4,RightObjName:string;
begin
if(IsMouseButtonDown(false))then
begin
if(not(MouseIn_MainScreen))then
begin
Exit;
end;
if(MouseIn_MainScreen)then
begin
Wait(500);
GetMousePos(MX,MY);
Color:= GetColor(MX,MY - 10);
Opt1:= Trim(GetTextAtEx(MX - 52, MY + 19, 20, upchars, True, True, 0, 3, 16777215, 30, False, tr_AllChars));
Opt2:= Trim(GetTextAtEx(MX - 52, MY + 34, 20, upchars, True, True, 0, 3, 16777215, 30, False, tr_AllChars));
Opt3:= Trim(GetTextAtEx(MX - 52, MY + 49, 20, upchars, True, True, 0, 3, 16777215, 30, False, tr_AllChars));
Opt4:= Trim(GetTextAtEx(MX - 52, MY + 64, 20, upchars, True, True, 0, 3, 16777215, 30, False, tr_AllChars));
Writeln(Opt1);
Writeln(Opt2);
Writeln(Opt3);
Writeln(Opt4);
begin
repeat
Wait(100);
until(IsMouseButtonDown(true));
GetMousePos(OptX,OptY);
end;
if(IsMouseButtonDown(true) and ((MX - 52) < OptX) and (OptX < (MX + 52)) and ((MY + 19) < OptY) and (OptY < (MY + 34)))then
begin
MouseRand:= (Random(3) + 1);
RightObjName:= Trim(GetTextAtEx(MX - 52, MY + 19, 100, upchars, False, False, 0, 3, 16776960, 50, False, tr_AllChars));
Writeln('FindObj(x,y,' + RightObjName + ',' + inttostr(Color) + ',' + inttostr(MouseRand) + ');');
Writeln('Mouse(x,y,' + inttostr(MouseRand) + ',' + inttostr(MouseRand) + ',false);');
Writeln('PopUp(' + Opt1 + ');');
end;
if(IsMouseButtonDown(true) and ((MX - 52) < OptX) and (OptX < (MX + 52)) and ((MY + 34) < OptY) and (OptY < (MY + 49)))then
begin
MouseRand:= (Random(3) + 1);
RightObjName:= Trim(GetTextAtEx(MX - 52, MY + 34, 100, upchars, False, False, 0, 3, 16776960, 50, False, tr_AllChars));
Writeln('FindObj(x,y,' + RightObjName + ',' + inttostr(Color) + ',' + inttostr(MouseRand) + ');');
Writeln('Mouse(x,y,' + inttostr(MouseRand) + ',' + inttostr(MouseRand) + ',false);');
Writeln('PopUp(' + Opt2 + ');');
end;
if(IsMouseButtonDown(true) and ((MX - 52) < OptX) and (OptX < (MX + 52)) and ((MY + 49) < OptY) and (OptY < (MY + 64)))then
begin
MouseRand:= (Random(3) + 1);
RightObjName:= Trim(GetTextAtEx(MX - 52, MY + 49, 100, upchars, False, False, 0, 3, 16776960, 50, False, tr_AllChars));
Writeln('FindObj(x,y,' + RightObjName + ',' + inttostr(Color) + ',' + inttostr(MouseRand) + ');');
Writeln('Mouse(x,y,' + inttostr(MouseRand) + ',' + inttostr(MouseRand) + ',false);');
Writeln('PopUp(' + Opt3 + ');');
end;
if(IsMouseButtonDown(true) and ((MX - 52) < OptX) and (OptX < (MX + 52)) and ((MY + 64) < OptY) and (OptY < (MY + 80)))then
begin
MouseRand:= (Random(3) + 1);
RightObjName:= Trim(GetTextAtEx(MX - 52, MY + 64, 100, upchars, False, False, 0, 3, 16776960, 50, False, tr_AllChars));
Writeln('FindObj(x,y,' + RightObjName + ',' + inttostr(Color) + ',' + inttostr(MouseRand) + ');');
Writeln('Mouse(x,y,' + inttostr(MouseRand) + ',' + inttostr(MouseRand) + ',false);');
Writeln('PopUp(' + Opt4 + ');');
end;
end;
end;
end;P.S. If you want to check out my progress so far you can download it but PLEASE give me feedback, also this will be members when it comes out I think.