Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #3438
| From | "John B. Matthews" <nospam@nospam.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: java.awt.Robot - new programmer, need a little help. |
| Date | 2011-05-02 10:12 -0400 |
| Organization | The Wasteland |
| Message-ID | <nospam-A6FE9E.10122202052011@news.aioe.org> (permalink) |
| References | <638a98f4-c108-4356-b483-5696963febd8@glegroupsg2000goo.googlegroups.com> |
In article <638a98f4-c108-4356-b483-5696963febd8@glegroupsg2000goo.googlegroups.com >, New Programmer <ryan.morrone@gmail.com> wrote: > I work in test automation. I would like to develop a small new way to > record and playback using java. I'm interested in the java.awt.robot > class, and using the createScreenCapture. This captures a rectangle > area. There are other apps out there that allow a user to select an > area, and capture an image for playback. That being said, I think a > better way would be if there was a grid overlaying the app screen you > are recording. by clicking within one of the rectangles, the java > program could automatically recognize the coordinates of the > rectangle within the grid and auto save that image to a defined > directory. This eliminates teh step of selecting an area, and > provides faster recording. > > Does any have any ideas how i could create/use a grid to pre define > coordinates? You can ask the java.awt.Toolkit to getScreenSize() and divide the real estate in whatever way makes sense to your application. You could then send the resulting rectangle(s) to createScreenCapture(). Why not just capture the whole screen in the first place? There are some example here: <http://stackoverflow.com/questions/3742731> -- John B. Matthews trashgod at gmail dot com <http://sites.google.com/site/drjohnbmatthews>
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar
java.awt.Robot - new programmer, need a little help. New Programmer <ryan.morrone@gmail.com> - 2011-05-01 21:46 -0700 Re: java.awt.Robot - new programmer, need a little help. "John B. Matthews" <nospam@nospam.invalid> - 2011-05-02 10:12 -0400
csiph-web