Results 1 to 4 of 4

Thread: Question about arrays

  1. #1
    Join Date
    Nov 2007
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Question about arrays

    well ive been trying to get my mouse to click on one of 4 coords, randomly - how would i do that?

    at first i had something like this:
    SCAR Code:
    var coords: array of integer;
    begin
    coords:= [(128,202),(311,212),(219,283),(221,150)];
    clickmouse(coords[random(4)],true);
    wait(500);
    end;

    then after quickly scrolling through these forums i tried this:
    SCAR Code:
    var coords: Array [0..3] of integer;
    begin
    coords[0]:= (128,202);
    coords[1]:= (311,212);
    coords[2]:= (219,283);
    coords[3]:= (221,150);
    for i:=0 to 2 do
    clickmouse(coords[i],true);
    wait(500);
    end;
    aaand obviously that fails too, but how SHOULD i write it?

  2. #2
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    First of all,, use Mouse instand of clickmouse
    but why would u use a array to let the mouse click and not someting like:

    SCAR Code:
    case Random(4) of
      0: Mouse(234, 234, 2, 2, true); //etc.
      1:
      2:
      3:
    end;

  3. #3
    Join Date
    Nov 2007
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by rikjess View Post
    First of all,, use Mouse instand of clickmouse
    but why would u use a array to let the mouse click and not someting like:

    SCAR Code:
    case Random(4) of
      0: Mouse(234, 234, 2, 2, true); //etc.
      1:
      2:
      3:
    end;
    alright, thanks! :P why should i use mouse instead of clickmouse though?

  4. #4
    Join Date
    Jun 2007
    Posts
    246
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Clickmouse moves the mouse and clicks instantly on the position and mouse moves the mouse to that position human like and clicks..so clickmouse is detectable, mouse isnt

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Arrays, stuck on arrays
    By Camaro' in forum OSR Help
    Replies: 1
    Last Post: 03-08-2008, 02:02 AM
  2. arrays
    By omgh4x0rz in forum OSR Help
    Replies: 10
    Last Post: 02-20-2007, 04:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •