SRL Archive - RS3 Help

Problem with chooseOption._select


Alipheese

2013-12-31 12:13:37

So I'm trying to make a script that attacks things and then loots them, but for that I need to use chooseOption._select. When I try to use the function, it always results with the error that the option menu isn't open, even though it is. Is there any way I can fix this?

Example script:
program new;
{$Define SMART}
{$I srl-6/srl.simba}
begin
setupSRL();
Mouse(point(300,300), mouse_right);
if chooseoption.isopen() then
begin
if chooseOption.optionsExist(['alk here']) then
begin
writeln('the option walk here is there!');
chooseoption._select(['alk', 'lk here', 'Walk'], MOUSE_LEFT, true, 1.00, 150);
end else
begin
writeln('option is not there');
end;
end else
begin
writeln('chooseoption not open');
end;
end.

Resulting debug text:
– setupSRL(): True
– chooseOption.isOpen(): result = true
– TRSChooseOptions.optionsExist(): result = true
the option walk here is there!
– chooseOption._select():
—- chooseOption.isOpen(): result = false
—- ERROR: chooseOption menu never appeared
– chooseOption.select() result = false
– Freeing the minimap mask
– Succesfully freed SMART[15072]
Successfully executed.

Wu-Tang Clan

2013-12-31 13:30:32

I also get access violation errors when I have scripts with chooseoption_.select. So I don't know what is wrong with the function, but you aren't the only one.

Ashaman88

2013-12-31 13:43:42

Why aren't yall just using chooseoption.select?

The Mayor

2013-12-31 13:52:04

Yea what Asha said. You shouldn't have to use anything with ' _ ' in it. This works fine if you're logged in:


program new;
{$Define SMART}
{$I srl-6/srl.simba}
begin
setupSRL();
Mouse(point(300,300), mouse_right);
chooseoption.select(['alk']);
end.

Alipheese

2013-12-31 15:02:13

I still get the same problem that I had earlier.

Debug text:

– setupSRL(): True
– chooseOption._select():
—- chooseOption.isOpen(): result = false
—- ERROR: chooseOption menu never appeared
– chooseOption.select() result = false

Ashaman88

2013-12-31 15:10:12

double check updates for srl and post a pic of the mainscreen with the optionmenu open. and doublecheck graphics settings

Alipheese

2013-12-31 15:25:01

Checked the settings and they're all as they should be.

http://prntscr.com/2fh514

Ashaman88

2013-12-31 15:53:32

@Olly any thoughtz?

Alipheese

2014-01-01 12:45:59

UPDATE:

By removing the if not self.isopen(waittime) statement, I was able to make this function work properly. Resolved for now.