Sign in to follow this  
Followers 0
Toady

Region Capture

29 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



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


[center]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.[/center]

Share this post


Link to post
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?

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

gesller, you're not running it in Beta mode are you? Auto3Lib only works in production mode. Also, are you running Win2000 or greater? GDI+ is not included by Microsoft in Windows versions prior to that.


[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Share this post


Link to post
Share on other sites

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

No, it does nothing. I'm getting the same thing as geseller.

Share this post


Link to post
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.


www.itoady.com

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Sorry, was at work.. Yep, I am runnning XP and 3.2.4.9..

Share this post


Link to post
Share on other sites

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

Does a Tooltip get displayed right after you clicked "Select Region"?


www.itoady.com

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Works Great now.. I like the tooltip tells you when it is ready for you to push s.. Very nice work... :whistle:

Share this post


Link to post
Share on other sites

Works Great now.. I like the tooltip tells you when it is ready for you to push s.. Very nice work... :whistle:

Suuuuweet! Thx :lmao:


www.itoady.com

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0