Jump to content

Region Capture


Toady
 Share

Recommended Posts

I decided to post this script I wrote for a project I was working on at work. The cool thing about this is two things.

1. Rubberband selection box.

2. Preview the images that you have captured.

You need Auto3Lib to run this script. This is not a continuous project I am working on, just something I made for use at work. So change/modify anything you want. I will not update this or make any changes. Have fun!

*How to uses*

1. Enter name of image.

2. Select the Format.

3. Click "Select Region"

4. Press the S key for starting position.

5. Move mouse to create a selection box.

6. Press the S key again for ending position.

7. Your image is saved in the "images" folder, same directory as this script.

I noticed that people really like the way this program lets the user select the region so I wrote a separate script for easily selecting a region using a rubberband like style.

Posted Image

RubberbandSelect.au3

Region_Capture.au3

Edited by Toady

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Link to comment
Share on other sites

  • Moderators

I must have missed an update of the A3L because it threw an error of unrecognized function name: _GDIP_GraphicsDrawImageRectRect

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Doesn't work for me, I found and installed the sticky Auto3Lib and get the latest and get to

4. Press the S key for starting position.

and s and move mouse and s does nothing.

Am I doing something wrong?

You just press the S key (down and up).. do not hold down the S key while you drag mouse..

1. Pressed S key down then up.

2. Move mouse to other corner.

3. Press S key key down then up.

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Link to comment
Share on other sites

You just press the S key (down and up).. do not hold down the S key while you drag mouse..

1. Pressed S key down then up.

2. Move mouse to other corner.

3. Press S key key down then up.

it works for me fine, nice job , bt i wonder if you could replace the S with a mouseclick, match more .... nice that way

Link to comment
Share on other sites

You just press the S key (down and up).. do not hold down the S key while you drag mouse..

1. Pressed S key down then up.

2. Move mouse to other corner.

3. Press S key key down then up.

Sorry, I should have made myself clearer. I pressed the s down and up and then moved mouse and s down and up and it does't do anything. I tried all sorts of senarios and none work. A nice looking GUI but won't work on my machine. LOL

Link to comment
Share on other sites

it works for me fine, nice job , bt i wonder if you could replace the S with a mouseclick, match more .... nice that way

I did have a mouseclick, but that ruined the screenshots im some cases, hard to explain. But if you prefer, you can change the "83" in the _IsPressed() function to "1".

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Link to comment
Share on other sites

Sorry, I should have made myself clearer. I pressed the s down and up and then moved mouse and s down and up and it does't do anything. I tried all sorts of senarios and none work. A nice looking GUI but won't work on my machine. LOL

Hmm, do you even see a blue selection box when moving the mouse?

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Link to comment
Share on other sites

I dunno why it is not working for you. I ran this on Win2000, XP, and Vista. All using latest version of Autoit and Auto3Lib, it works fine.

It acts weird on me too, like gseller.

This was what i did:

I run the program

Put in filename

Click select region

GUI flashed a sec and then it went unresponding

Link to comment
Share on other sites

I don't get any kind of box while selecting the region, but it works. Nice script.

Cool, good that it works. You should see a blue transparent selection box when selecting the region. This is crazy, I have tried it on 5 different pc's so far, works fine for them. Something is screwy here.. :whistle:

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...