Results 1 to 8 of 8

Thread: how to rotate and search?and findmouse?

  1. #1
    Join Date
    Oct 2007
    Posts
    678
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default how to rotate and search?and findmouse?

    ok i need help, how do i make it rotate and search for a colortolerance, dtmtolerace, or bitmaptolerance? or how come scar cant find the cursor?
    i need it to find the mouse arrow as a dtm or bitmap? how can i do this?
    thnx for ur help

  2. #2
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    FindDTMRotated???

  3. #3
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Colors are individual pixels so no need to ever rotate them? But..
    For DTMs there is a function in SRL called 'DTMRotated' in the 'DTM' include.
    For BMPs there is a function in SCAR
    function FindDeformedBitmapToleranceRotationIn(bitmap: Integer; var x, y: Integer; x1, y1, x2, y2: Integer; tolerance: Integer; Range: Integer; var accuracy: Extended; AngleIntervals: Extended; StartAngle, MaxAngle: Extended; var angle: Extended): Boolean;
    Works similar to FindDeformedBitmapToleranceIn but allows searching for rotated bitmaps as well. Basically it rotates bitmap, searches in target image, then rotates again, searches again. AngleIntervals specifies by how much it rotates every time, StartAndge specifies initial rotation angle, MaxAngle specifies how far it rotates and angle returns angle of found image. All angles are specified in radians (Pi = 180˚)
    Example:
    FindDeformedBitmapToleranceRotationIn(minimaptree, x, y, 582, 37, 700, 117, 170, 0, acc, PI/10, 0, 2*PI, angle);

    And what is it that you want to find a BMP of the mouse arrow for??
    if you just are looking to find where the curser is you can use
    SCAR Code:
    GetMousePos(x, y);
    and it will put the location into the variables x and y.

  4. #4
    Join Date
    Oct 2007
    Posts
    678
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Derek- View Post
    Colors are individual pixels so no need to ever rotate them? But..
    For DTMs there is a function in SRL called 'DTMRotated' in the 'DTM' include.
    For BMPs there is a function in SCAR



    And what is it that you want to find a BMP of the mouse arrow for??
    if you just are looking to find where the curser is you can use
    SCAR Code:
    GetMousePos(x, y);
    and it will put the location into the variables x and y.
    thnx, thats half of wat i needed,i think.......wait by rotate do u mean degrees on screen? by roate i ment rotate camera ingame(arrow keys) and look for color, cuz things move..lol? dtm or bmp of cursor, which is for my own stuff(not rs) but i duno if scar can even do that, and rotate camera and look for color.. ?

  5. #5
    Join Date
    Feb 2007
    Location
    Het ademt zwaar en moedeloos vannacht.
    Posts
    7,211
    Mentioned
    26 Post(s)
    Quoted
    72 Post(s)

    Default

    The mousearrow is drawn in a different buffer that scar can't search, it'll see through the mouse cursor.
    Rotate camera: KeyDown(VK_LEFT/VK_RIGHT/VK_DOWN/VK_UP); wait(sometimehere) KeyUp(whatever is in the keydown).
    Instead of the wait you can do a loop like
    KeyDown(blabla)
    repeat
    wait(10); //10 milliseconds = 0,001 second
    until(FindColor(blablabla))
    KeyUp(blablablablabla)
    I made a new script, check it out!.

  6. #6
    Join Date
    Oct 2007
    Posts
    678
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ahh well that explain alot mucho gracias..hmm wat it can look for is a pic of a pic lol, il just do that thnx

  7. #7
    Join Date
    Dec 2006
    Location
    Copy pastin to my C#
    Posts
    3,788
    Mentioned
    8 Post(s)
    Quoted
    29 Post(s)

    Default

    For any possible need of having the bitmap or a DTM of the cursor I can imagine, getMousePos does the job.

  8. #8
    Join Date
    Jul 2007
    Location
    St. Louis, Missouri, USA.
    Posts
    575
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by n3ss3s View Post
    For any possible need of having the bitmap or a DTM of the cursor I can imagine, getMousePos does the job.
    Unless you wanted to randomly move the mouse over a page until it went into the pointy-finger for a click, but you could just use findcolor for the highlighted link.
    -You can call me Mick-



Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to rotate ?
    By Dervish in forum OSR Help
    Replies: 6
    Last Post: 01-11-2009, 05:23 PM
  2. How to rotate screen, can't find :S
    By PwNZoRNooB in forum OSR Help
    Replies: 7
    Last Post: 07-28-2007, 06:28 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
  •