SRL Archive - Help and Support

Parameters?


DiscoBall

2006-04-18 00:07:08

Hey,

I made this script to start runescape just by starting the script, but sometimes it doesn't work, by saying Invalid number of parameters in script

How does that work?

program New;



var
x,y:Integer;


begin

MoveMouseSmooth(41, 1012)
ClickMouse(41, 1012, True)
MoveMouseSmooth(75,604)
ClickMouse(75, 604, True)
Wait(2000);
MoveMouseSmooth(547,174,True)
ClickMouse(547,174,True)
SendKeys('www.runescape.com')
Wait(10)
sendkeys(chr(13))
Wait(5000)
MoveMouseSmooth(909,527,True)
ClickMouse(909,527,True);
Wait(3000)
MoveMouseSmooth(844,515,True)
ClickMouse(844,515,True);
Wait(3000)
MoveMouseSmooth(618,444,True)
ClickMouse(618,444,True);
Wait(10000)
MoveMouseSmooth(714,600,True)
ClickMouse(714,600,True);
Wait(10)
SendKeys('')
SendKeys(chr(13))
SendKeys('')
MoveMouseSmooth(556,633,True)
ClickMouse(556,633,True)
end.

It stuffs up around the 3rd ClickMouse, and if I delete that, it stuffs up at sendkeys…and so on…

By the way, how do I put SRL in? is it SRLSetup; after begin?

Pwnd

2006-04-18 00:08:52

It says: "Line 17: [Error] (17:1)"
When you see this: (#:1) It usually means it is the line above it. MoveMouseSmooth doesn't have 3 parameters. Should onl ybe MoveMouseSMooth(909, 572);
You have a couple of those.

The Un-Named

2006-04-18 00:34:20

From: DiscoBall
MoveMouseSmooth(909,527,True)


I do that alot with MMouse and Mouse.

DiscoBall

2006-04-18 00:40:54

lol :P

Also, how would you make a mouse click on a bitmap? Is it if bitmap is found, then click on bitmap (x,y,true)?

The Un-Named

2006-04-18 00:45:30

From: DiscoBall
lol :P

Also, how would you make a mouse click on a bitmap? Is it if bitmap is found, then click on bitmap (x,y,true)?


if(FindBitmap(x, y, bitmap, cordboxhere))then

If it finds the bitmap the coords are stored at x, y.

if FindBitmap(x, y, BITMAP, 0, 0, 1023, 767) then
Writeln('We found the bitmap at: ' + IntToStr(x) + IntToStr(y));

DiscoBall

2006-04-18 01:01:03

then…how would you add clicking? if findbitmap=true, then
MMouse(x,y,true)

?

The Un-Named

2006-04-18 01:03:53

From: DiscoBall
then…how would you add clicking? if findbitmap=true, then
MMouse(x,y,true)

?


Replace the Writeln with somthing like Mouse(x, y, 5, 5, true).

MMouse(x, y, randx, randy)
Mouse(x, y, randx, randy, true)

DiscoBall

2006-04-18 02:07:41

Thanks :P

Umm..with bitmaps…

If I was to make a mining script with banking, how do I figure out the banker? I can get the mining symbols and stuff…but can't really get the bankers…

XxKanexX

2006-04-18 03:12:36

You could use colors and tolerance. Such as the banking floor and some of the yellow banking sign. :)

DiscoBall

2006-04-18 07:13:01

:P

How would I be able to click on the banker though?

XxKanexX

2006-04-18 07:31:03

SRL already has an OpenBank ;) If that's what you mean.

If not, please explain a bit more ;)