SRL Archive - OSR Help

Looping until an option box opens w/ certain text


KFC

2012-01-04 17:09:58

I've got this loop and i just need something to put in the "until" part.




//Repeat
//insert w/e code here
//Until(Something that will repeat until an option box with the choice you choose is available);


ive tries IsUp but thats only available for uptext


EDIT—————–

Done a little playing around and this is my code so far:


Repeat
FindObjCustom(x, y, ['Insert text here'], [InsertColor Here], 7);
Mouse(x, y, 0, 0, False);
ChooseOption('Insert Option Here');
Until(ChooseOption('Insert Option Here'));

But it just right clicks and chooses the option over and over again.

Brandon

2012-01-04 17:12:59

OptionsExist(Options: TStringArray, MoveMouse: Boolean);

KFC

2012-01-04 17:16:04

From: ggzz
OptionsExist(Options: TStringArray, MoveMouse: Boolean);


:o i was looking at that but i wasn't sure how it works, specifically the MoveMouse part it tells me to do. do i just say MoveMouse?

wantonman

2012-01-04 17:19:32

u can use the wait func… waits for your function to be true the life shall go on


WaitFunc(@ChooseOption, 1000+ Random(300), 3000)

Brandon

2012-01-04 17:21:36

From: KFC
:o i was looking at that but i wasn't sure how it works, You reccomend a certain tutorial?



Repeat
MMouse(X, Y, 0, 0);
if isUptextMultiCustom(['meh', 'sheep', 'whatever']) then
ClickMouse2(False);
Until(OptionsExist(['Option 1', 'Option 2', 'Option 3', 'However many u want'], False);

A TStringArray is just a whole "Bunch" of strings.. aka an Array.

Can be ['fssgs', 'fsgsgs', 'ainfsdgnsdgs', 'fsfs gdsgs gdg'] <— can contain spaces in the string, each option is separated by a comma and an array always has square brackets.

:Boolean can only be true or false..

So finally:

OptionsExist([you array of strings here], Move the mouse or not? can be false or true)..
Example: OptionsExists(['gdgds' , 'sgsdg', 'gsgs'], False);… will look for those options and will NOT hover over them.

KFC

2012-01-04 17:24:07

:DDDD Perfected it Thanks for help guys.