PDA

View Full Version : Problem with chooseOption._select



Alipheese
12-31-2013, 05:13 PM
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
12-31-2013, 06:30 PM
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
12-31-2013, 06:43 PM
Why aren't yall just using chooseoption.select?

The Mayor
12-31-2013, 06:52 PM
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
12-31-2013, 08:02 PM
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
12-31-2013, 08:10 PM
double check updates for srl and post a pic of the mainscreen with the optionmenu open. and doublecheck graphics settings

Alipheese
12-31-2013, 08:25 PM
Checked the settings and they're all as they should be.

http://prntscr.com/2fh514

Ashaman88
12-31-2013, 08:53 PM
Olly any thoughtz?

Alipheese
01-01-2014, 05:45 PM
UPDATE:

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