Results 1 to 4 of 4

Thread: How would I do something like this?

  1. #1
    Join Date
    Jan 2012
    Posts
    64
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default How would I do something like this?

    I'm rather new to this since I only really do Java/C++ stuff so I was wondering how to translate something like this.

    int x = (int)(Math.random() * 5)
    if(x == 3) {
    //moves the mouse to (3, 5)
    }

  2. #2
    Join Date
    Dec 2006
    Location
    Sweden
    Posts
    10,812
    Mentioned
    3 Post(s)
    Quoted
    16 Post(s)

    Default

    Simba Code:
    var eee: integer;
    eee := Random(3);
    if (eee = 0) then
      MMouse(3,5,0,0);

    random(3) = 4 chances, 0..3. MMouse's 2nd parms are for randomness.


    Send SMS messages using Simba
    Please do not send me a PM asking for help; I will not be able to help you! Post in a relevant thread or make your own! And always remember to search first!

  3. #3
    Join Date
    Jan 2012
    Posts
    64
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thank you.

  4. #4
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Goodness Harry, at least promote decent standards...

    Simba Code:
    var
      eee: integer;
    begin
      eee := Random(3);
      if (eee = 0) then
        MMouse(3,5,0,0);
    end;

Thread Information

Users Browsing this Thread

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

Posting Permissions

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