Dynamic Scripting question

Discussion in 'OT Technology' started by korrupshun, May 16, 2006.

  1. korrupshun

    korrupshun New Member

    Sep 8, 2004
    Likes Received:
    I am currently posed with an interesting problem at work and wondering if anyone has any feedback/experience they might be able to lend to help guide me in the right direction.

    I am looking to script GUI functionality for an undocumented application. Thanks to NDAs that is about as far as i can describe what i am actually trying to do. However, i have an example that i think is somewhat comparable.

    Lets pretend i am trying to script the windows game 'Minesweeper'. What i need to be able to do is control mouse clicks and key board input such that this 'game' can be automated to a win/loss solution. This means i need to have someway to read in whats VISIBLE (say i automate a click on a square and the number 2 appears, i need to have a way to recognize the 2), and then apply logic to it.

    This poses a few problems:

    1) Automating mouse and keyboard functionality (i am looking at http://www.autohotkey.com/ for a possible solution there)

    2) Reading in dynamic undocumented images from an application (no clue where to go from here)

    3) Finding a solution that will tie in with a higher level programming language (like c++, java, etc) so that i can apply logic to 'potentially' random events and output.

    Anyone have any ideas, or better yet experience, with this kind of problem? If so, can you point me in the right direction?

    Open source is preferred, but not mandatory.

    TIA for the help! :)
  2. Yep

    Yep Knick knack paddy whack, give the old dog a bone

    Jan 22, 2001
    Likes Received:
    South Jersey
    Tough to give you suggestions without true specs, but if I was faced with this task I'd custom write it.

    I don't know of any off the shelf software that will interpert screen display, figure out what it is, and then make a decision. A while back someone asked a very similiar question.

    In the past I wrote a VB6 program for an online game at pogo.com called Swashbucks. It's at the bottom of the page if you want to register and look at it. My intention was to earn huge amounts of contest points to try and win the grand prize.

    Basically the game entails a bunch of different color coins coming out of a cave and spinning in a circle until they go down a hole. There is a cannon in the middle that will fire random coin denominations out. If the total of two coins was 100 they would disappear, shortening the chain of coins and giving you more time.

    To make a long story short, the program would grab the pixel colors at certain points in the screen, figure out what color coin was waiting to fire, and decide where to fire it to try and total 100. It involved mouse movement, getting pixel colors, etc. It worked well and extremly fast. It was hard to keep up with what was going on on the screen.

    What I'm driving at, is you might be better off just hiring someone to write something custom for you.
  3. EvilSS

    EvilSS Active Member

    Jun 11, 2003
    Likes Received:
    The closest thing I can think of would be the scripting and testing products from Mercury Interactive. Definitely not cheap though.

Share This Page