SRL Archive - OSR Help

Can't find the basic mouse functions???


waffles0404

2013-12-03 21:09:47

I'm looking to make a script that will run in a webpage. I made a script a couple months ago, but it looked something like this:

MoveMouse(65, 38);
wait(150);
ClickMouse(65, 38, 1);
wait(1000);
repeat
wait(20);
until(getcolor(1412, 42) = 23254);
wait(2000);
MoveMouse(1512, 42);
wait(100);
ClickMouse(1512, 42, 1);
wait(1000);

Obviously it's pretty rough, it failed every 2 or 3 cycles. What are the best mouse functions to use for clicking in webpages, and also typing? And for failsafes, whats recomended? is getcolor(x, y) fine? Or maybe DTMs?

You guys are the experts, let me know! :P

Waffle

Foundry

2013-12-03 21:19:49

The mouse functions have changed quite a bit… you can go here to find out how to use them. Here is an adapted version of your script.

     
mouse(point(65, 38), MOUSE_LEFT);
wait(1000);
repeat
wait(20);
until(getcolor(1412, 42) = 23254);
wait(2000);
mouse(point(1512, 42), MOUSE_LEFT)
wait(1000);

waffles0404

2013-12-03 21:28:23

Ahh, Mouse is the one I was looking for. I remember back in the day using Mouse(x, y, xrand, yrand, button). Guess thats changed. Thanks!

rj

2013-12-03 21:42:48

From: Foundry
The mouse functions have changed quite a bit… you can go here to find out how to use them. Here is an adapted version of your script.

     
mouse(point(65, 38), MOUSE_LEFT);
wait(1000);
repeat
wait(20);
until(getcolor(1412, 42) = 23254);
wait(2000);
mouse(point(1512, 42), MOUSE_LEFT)
wait(1000);


The script hesing using can still work, movemouse and clickmouse are still the same. The only thing that has changed is srl5-srl6 mouse functions which he isn't using


OT: it's good to make a main loop that check for every possibility and executes stuff accordingly

Foundry

2013-12-03 21:45:04

From: Officer Barbrady
The script hesing using can still work, movemouse and clickmouse are still the same. The only thing that has changed is srl5-srl6 mouse functions which he isn't using


OT: it's good to make a main loop that check for every possibility and executes stuff accordingly


Oh yeah, forgot it was for a webpage :duh:

waffles0404

2013-12-04 16:53:36

Wow, Im using mouse now, but its SOOOO wavy in its movement, has it been changed in the last few months? Is there a more straight or fast function I could use? Mouse will do, its just that it hovers over menus sometimes and opens them up

bonsai

2013-12-04 17:03:27

yes, the ones you had in the script originally!

http://docs.villavu.com/simba/scriptref/mouseandkeyboard.html?highlight=mouse