SRL Archive - SRL Bugs

OptionsExist


smurg

2012-01-03 03:56:55

I'm making my own Bank withdrawal method via DTM's and am incorporating OptionsExit to tell if I need to Withdraw-X or not.

Withdrawal itself semi-blows because it only does WaitOptions and re-right-clicks to get the menu for Withdraw-X. (It only happens once and then the -X will be -# and it won't matter, I know, yada….)

Anyways OptionsExist's descriptions is "Returns true if an Option in txt is found in the RS Option Menu. Will move or do nothing according to the boolean Move"

So I do OptionsExist(['whatever', 'adsa'], False)

Yet, it uses ChooseOptionMultiEx which has at the end

if (not result) then
ChooseOptionMultiEx(['Cancel', 'ancel', 'ncel'], 'All', clickLeft);

The whole purpose of using OptionsExist and setting the Move boolean to False is to keep the menu up. Yet, it clicks the 'Cancel' option.

Wouldn't this be more appropriate:

if (not result) and (Action <> Nothing)then
ChooseOptionMultiEx(['Cancel', 'ancel', 'ncel'], 'All', clickLeft);

YoHoJo

2012-01-03 04:09:38

Offtopic: Care to say what script you're making? Got any private ones, I bet you do :p

smurg

2012-01-03 05:05:30

From: YoHoJo
Offtopic: Care to say what script you're making? Got any private ones, I bet you do :p


Always moving in between scripts right now, it's hard to say; I need to stick to one and polish it up.

I made an (so-far) incomplete red chin hunter that requires babysitting (no fake trap detection) and I've run it for an hour or two at a time.

Currently working on a different script (will pm you it because it hasn't gotten much notice and I don't want randoms making it :) ).

Coh3n

2012-01-03 15:39:36

From: smurg
Withdrawal itself semi-blows because it only does WaitOptions and re-right-clicks to get the menu for Withdraw-X. (It only happens once and then the -X will be -# and it won't matter, I know, yada….)
Why not fix that? ;)

From: smurg

The whole purpose of using OptionsExist and setting the Move boolean to False is to keep the menu up. Yet, it clicks the 'Cancel' option.

Wouldn't this be more appropriate:

if (not result) and (Action <> Nothing)then
ChooseOptionMultiEx(['Cancel', 'ancel', 'ncel'], 'All', clickLeft);
You're right. I'll fix this, and look into the Withdraw() thing as well when I have time. :)

smurg

2012-01-03 23:54:44

From: Coh3n
Why not fix that? ;)

You're right. I'll fix this, and look into the Withdraw() thing as well when I have time. :)


Haha alright, I'll post my little snippet for Withdraw() then too.

Coh3n

2012-01-04 00:40:21

This is my OptionsExist (SRL5). I don't see a problem/it doesn't look the same as yours?

function OptionsExist(txt: TStringArray; MoveMouse: boolean): boolean;
begin
if MoveMouse then
Result := ChooseOptionMultiEx(Txt, 'All', Move)
else
Result := ChooseOptionMultiEx(Txt, 'All', Nothing);
end;

smurg

2012-01-04 01:11:35

From: Coh3n
This is my OptionsExist (SRL5). I don't see a problem/it doesn't look the same as yours?
Simba Code:
[LEFT]function OptionsExist(txt: TStringArray; MoveMouse: boolean): boolean;
begin
if MoveMouse then
Result := ChooseOptionMultiEx(Txt, 'All', Move)
else
Result := ChooseOptionMultiEx(Txt, 'All', Nothing);
end;
[/LEFT]



Ya, that looks normal.

The snippets I posted before were from ChooseOptionMultiEx which OptionsExist uses.

Coh3n

2012-01-04 01:27:47

Haha, my bad. :p

Fixed in SRL5.