Results 1 to 7 of 7

Thread: Help!

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    2

    Help!

    Okay you guys, I need some help. Attached is some software that moves a gun aroud and fires it at a IR point. Is there a way that in stead of moving a couple of servos, can it move the mouse to those coordinates? And click? That would rule. Ill send you guys pics when it's done.

    M-kay, heres the link
    http://defconbots.org/defcon14/design_software.php

  2. #2
    Frenzied Member
    Join Date
    Oct 2003
    Posts
    1,301

    Re: Help!

    What exactly do you want to achieve?

  3. #3
    Hyperactive Member singularis's Avatar
    Join Date
    Nov 2006
    Location
    Over There!
    Posts
    372

    Re: Help!

    Is this a robotics question?
    If what I said was helpful, give me rep!

    My Complete Games: -- 2D Zone (Space Shooter game) || _2D Zone 2_ || Ninja Blob (2D platformer) || Dren (Co-op up to 4 player base defence game)

    My Projects: -- The Dread Engine (2D VB game Engine) || A* Path Finding


    An excellent site for learning DirectX7, 8 & 9 (for VB6, C# & VB.net) would be: directx4vb.vbgamer.com --- For my projects and games see: pieper.freehostia.com

  4. #4

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    2

    Re: Help!

    Quote Originally Posted by singularis
    Is this a robotics question?
    Um, yes. It is. I didn't know there was a section on that. But what I'm trying to do is identify a white dot and put the mouse there.

  5. #5
    Hyperactive Member singularis's Avatar
    Join Date
    Nov 2006
    Location
    Over There!
    Posts
    372

    Re: Help!

    Ok, if you are attempting to make a simulation of this I can help you.

    Get the picture of "what the robot sees" in a picture box and make a function that loops round all the pixels in the box to find any white ones.

    I take it that you know how to use loops, there is an API call known as GetPixel which returns the colour of the pixel at specified coordinates.

    It looks somewhat like this:
    Code:
    Private Declare Function GetPixel Lib "GDI32" (ByVal hDC As Long, ByVal x As Long, ByVal y As Long) As Long
    Obviously as soon as your program finds a white pixel then it will know where the white target is.
    If what I said was helpful, give me rep!

    My Complete Games: -- 2D Zone (Space Shooter game) || _2D Zone 2_ || Ninja Blob (2D platformer) || Dren (Co-op up to 4 player base defence game)

    My Projects: -- The Dread Engine (2D VB game Engine) || A* Path Finding


    An excellent site for learning DirectX7, 8 & 9 (for VB6, C# & VB.net) would be: directx4vb.vbgamer.com --- For my projects and games see: pieper.freehostia.com

  6. #6
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246

    Re: Help!

    GetPixel is extremely slow. Depending on your needs, you may want to use Get/SetDIBits, or even consider switching to C++ and using something like SDL.

    chem

    Visual Studio 6, Visual Studio.NET 2005, MASM

  7. #7
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: Help!

    it sounds to me like classroom work in which case it has to be vb and speed doesnt matter. is this the case?
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

Posting Permissions

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



Click Here to Expand Forum to Full Width