SRL Archive - SRL Snippets

DepositBox


Sin

2012-01-02 17:58:02

Function CloseDepositBox:boolean;
var
x2, y2:integer;
begin
DepositAll;
if FindObjCustom(x2, y2, ['Close'], [1580837], 0) then
MMouse(x2, y2, 2, 2);
ClickMouse2(True);
end;

No clue who created "DepositAll", rest of the function is mine since "CloseBank" wouldn't work for this :L

[Nathan]

2012-01-02 18:09:53

  MMouse(x2, y2, 2, 2);
Mouse(x2, y2, 2,2, True);

Should be avoided. It will move the mouse to a 4x4 area, and then quickly move to a different spot within the box to click? It causes the mouse to be really jerkly and not-humanlike.

I would do this:
  MMouse(x2, y2, 2, 2);
GetMousePos(x2,y2);
Mouse(x2, y2, 0,0, True);

Yago

2012-01-02 18:11:39

From: [Nathan]
  MMouse(x2, y2, 2, 2);
Mouse(x2, y2, 2,2, True);

Should be avoided. It will move the mouse to a 4x4 area, and then quickly move to a different spot within the box to click? It causes the mouse to be really jerkly and not-humanlike.

I would do this:
  MMouse(x2, y2, 2, 2);
GetMousePos(x2,y2);
Mouse(x2, y2, 0,0, True);



MMouse(x2, y2, 2, 2);
ClickMouse2(True);

Sin

2012-01-02 18:18:36

From: Yago

MMouse(x2, y2, 2, 2);
ClickMouse2(True);



Omggg
the CilckMouse2 was what i was searching for, i couldn't remember it!
Thanks :D

Gu3st...

2012-01-02 18:23:11

Mouse does a MMouse and a ClickMouse2 all in one function, btw.

[Nathan]

2012-01-02 18:34:46

From: Zyt3x
Mouse does a MMouse and a ClickMouse2 all in one function, btw.

Good call, in this situation only using Mouse works best, I was thinking of checking uptext, where you would want to do them seperate…

H_N

2012-01-02 18:53:44

Just started writing my first script and noticed CloseBank; didn't work for it too, i found that CloseWindow; works.

Good idea though, they should add in since its the only thing really missing, Good job :)