ok well i have radio buttons on my form and i have a start button so how do u make it so the script checks to see if radio button one was checked or if radio button 2 was checked?![]()
ok well i have radio buttons on my form and i have a start button so how do u make it so the script checks to see if radio button one was checked or if radio button 2 was checked?![]()
Wow. I am impressed to see such a new member using such advanced scripting concepts already
I don't know too much about forms, but each button has a separate name. So you are trying to find out how to distinguish between two different radio buttons, then it would be just like distinguishing between 2 regular variables.
If you were asking how to check if the boxes are checked or unchecked, do like:
SCAR Code:program New;
{.include SRL/SRL.scar}
var
RadioButtons: Array [0..1] of TRadioButton;
begin
if(RadioButtons[0].checked)then
Writeln('Radio button number 1 is checked');
if(RadioButtons[1].checked)then
Writeln('Radio button number 2 is checked');
end.
Obviously this is not a full form so it will not work, but that is the basic idea on how to check if the radio buttons are checked or unchecked as far as I know.
Last edited by JAD; 08-19-2009 at 12:21 PM.
Thanksok well if this does not work it occured to me while thinking earlier today that i could do this:
Code:Radiobutton.onclick := @radbut1;Code:procedure radbut1(forgot what goes here) begin rad := 1; or rad := 'rad1'; end;yes I do forgot how many ends and the tobject thing witch is why I made lots of notes in my script. If it comes down to it I think I might redo my form and make it look a but better with a banner and such like the advanced forms I have seen in tuts but for now I want to see if my script will make it past its beta stageCode:procedure startclick(again forgot) begin if rad := 1 then (or 'rad1';) begin (code) end esle begin (code) end; (possible another end;)![]()
sorry for the double post but umm is it bad or dangerouse to have ur script press the home teleport then map walk to the area you do your autoing?
You need the Sender.
Code:Procedure radbut1(Sender: TObject);It shouldn't be as long as your script can reach the place. But remember that the teleport can only be used once every 30 minutes.sorry for the double post but umm is it bad or dangerouse to have ur script press the home teleport then map walk to the area you do your autoing?
Edit: Noidea beat me.
thanks just making sure i dont need to redo my script
Last edited by boredGamer; 08-20-2009 at 09:19 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)