hello for starters iam looking for some help possibly one on one help iam trying to beable to random click bitmaps and random click x1, y1, x2, y2, boxs i make
hello for starters iam looking for some help possibly one on one help iam trying to beable to random click bitmaps and random click x1, y1, x2, y2, boxs i make
You can use:
Simba Code:FindBitmap(bitmap, x, y);
to find the bitmap on the screen.
You can then use:
Simba Code:moveMouse(x + random(7), y + random(7));
fastClick(MOUSE_LEFT);
or
Simba Code:mouse(x + random(7), y + random(7), MOUSE_LEFT);
You can find about the TBox stuff in this thread.
For TBoxes, you can do something like:
Simba Code:program new;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
procedure practiceBox();
var
settingsButton: TBox; //declare TBox variable
begin
settingsButton := intToBox(735, 80, 750, 100); // Top left, bottom right points
mouseBox(settingsButton, MOUSE_LEFT); // Left click the box we just made
end;
begin
clearDebug();
setupSRL();
practiceBox();
end.
This will click randomly inside the TBox.
thanks the bitmap one works but the T box dont work it pops up a new tab when i click complie and it says
Error: Duplicate declaration "mbOk" at line 30
Compiling failed.
then this pops up in a new tab
__________________________________________________ __________________________________________________ ______________________________________
(*
Globals
=======
The globals file holds any variables used throughout multiple files in SRL.
The source for this file can be found `here <https://github.com/SRL/SRL-6/blob/master/lib/core/globals.simba>`_.
*)
{$f-}
const
VK_ENTER = {$IFDEF LINUX}10{$ELSE}VK_RETURN{$ENDIF};
(*
var MessageBox
~~~~~~~~~~~~~~
Variables that store Simba's MessageBox function parameters. Makes it easier to
use rather than just remembering values.
Example:
.. code-block:: pascal
MessageBox('Test!', 'Test', mbOkCancel);
*)
var
mbOk = 0;
mbOkCancel = 1;
mbAbortRetryIgnore = 2;
mbYesNoCancel = 3;
mbYesNo = 4;
mbCancelRetry = 5;
mrYes = 6;
mrNo = 7;
(*
var Colors
~~~~~~~~~~
Convenient colors for scripters to use. Used mainly for SMART debugging.
Example:
.. code-block:: pascal
smartImage.drawBox(minimap.getBounds(), false, clFuchsia);
*)
var
clWhite = 16777215;
clBlack = 0;
clRed = 255;
clGreen = 32768;
clBlue = 16711680;
clPurple = 8388736;
clYellow = 65535;
clAqua = 16776960;
clOrange = 26367;
clFuchsia = 16711935;
clTeal = 8421376;
clNavy = 8388608;
clGray = 8421504;
clLime = 65280;
clMaroon = 128;
clSilver = 12632256;
clPink = 11772650;
(*
Constant: Events
~~~~~~~~~~~~~~~~
Integer constants of all the events called througout SRL.
Example:
.. code-block:: pascal
SRL_Events[RS_UPDATE] := @SixHourFix;
*)
const
EVENT_COUNT = 5;
EVENT_RS_UPDATE = 0;
EVENT_LOGOUT = 1;
EVENT_LOGIN = 2;
EVENT_PLAYER_NEXT = 3;
EVENT_ANTIBAN = 4;
(*
Variable: SRL_Events
~~~~~~~~~~~~~~~~~~~~
Events that are called throuhgout SRL. These events can be set in any script
so custom procedures can be called in certain areas of SRL.
Example:
.. code-block:: pascal
SRL_Events[RS_UPDATE] := reloadCurrentClient;
*)
var
SRL_Events: array[0..(EVENT_COUNT - 1)] of procedure;
ya i did i dont believe the DEFINE SMART WORKS i think your right because i havent used simba in awhile so where do i go to download SRL-6 because i dont believe i have it also
about the T box thing i think iam gettng it but one problem it works fine but it is not going to the box 397, 278, 531, 306
its going to 0, 0 with a randomness of 10 as you can see
program new;
var
X, Y:Integer;
procedure practice();
var
login: TBox; //declare TBox variable
begin
login := intToBox(397, 278, 531, 306); // Top left, bottom right points
moveMouse(x + random(10), y + random(10));
end;
begin
practice();
end.
also i would like to mention thank you for your time it helps so much i can get the bitmap to work now just the random click on screen or the T box
Last edited by maxlvs; 11-08-2015 at 12:49 AM.
You need to have it move to the coordinates of the box.
In the code you have shown, you have the mouse move to the points x and y. Currently, they are not set to anything, so it automatically chooses zero.
you would need to do something like this:
Simba Code:mouseBox(login, MOUSE_LEFT);
it says Unknown declaration "mouseBox" tho so i think i need a updated verision where would i get it
I would recommend reading this: https://villavu.com/forum/showthread.php?t=47714
or download the SRL include here: https://github.com/SRL/SRL-6
There are currently 1 users browsing this thread. (0 members and 1 guests)