SRL Archive - Help and Support

popup is bothersome...


weaselforce

2006-05-27 19:01:54

ok my problem is im making a fletcher, and sometimes it misses the coord in the bank. Instead of clicking, it creates a popup where the only option is cancel.I'm trying to make a way to avoid this. Wil this work? know any better ways?

ispopup := PopUp(cancel); (its a boolean)

repeat
If(ispopup)then
begin
Withdraw2(1,14);
Wait(1000);
until(ExistsItem(1) and false);

Jagex_Fagex

2006-05-27 20:04:26

maybe, if it does it, use choose option cancel or something.. or findbitmap and option2.. hm, there is a few ways i can think of, i will have a look at them.

weaselforce

2006-05-27 20:08:37

i'm sorry, i cant type coherantly lately. Thank you very much, it basically creates that popup and then the script keeps trying to click on that spot but it hits the popup again. causing eventual logout

Jagex_Fagex

2006-05-27 20:12:04

in a drop to i believe it is, what it does, is finds the bitmap of the text, moves mouse over it and waits until it finds the yellow version of it and clicks, then goes on.

phantombmx

2006-05-27 20:31:18

make a bitmap of the option (like if using trade betty, bitmap the e of trade and b of betty all in one bmp) then do somethin like this

procedure ClickBank;
begin
repeat
Mouse(bankx, banky, 5, 5, false);
Wait(100+random(100));
if(not(FindBitmapIn(optionbmp, x, y, x1, y1, x2, y2)))then
ChooseOption(cx, cy, 'Cancel');
until(FindBitmapIn(optionbmp, x, y, x1, y1, x2, y2))
Mouse(x, y, 5, 5);
end;

weaselforce

2006-05-27 21:06:52

yeayae but another problem is i wanted it in a repeat loop, and if it did find a popupmenu(not every time i get this problem) it would deal with it then return to the top of the loop. I guess id have to make it into a procedure or function then. (thats what i attempted to avoid above :( )