Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Trying to write a program called one print  RSS feed

 
Jeffrey Gutierrez
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Program info : captures the screen, paste it into mspaint, then saves it to desktop.

So thats the program idea in a nutshell, the issue I'm having is focusing what the robot does to another program, when I run the program it does everything it's suppose to do, but on netbeans, another issue I'm having is that I need it to print screen while netbeans and mspaint aren't visible,

1.) I need it to focus on mspaint when I CTRL.V - my attempted solution -> press and release alt and tab so it goes to the next program, and use some delay to give ms paint time to open. didn't work.
2.) when I Print the screen, ms paint and netbeans can't be visible(or I could write a program where it does make it visible) either way, I don't know how to minimize it, googled it no avail, searched forum no avail.
3.) When the save window is open, the defaut String is "untitled", I want to be able to generate a random 8 character long string, how to do this?
4.) if it's not possible in java, or if it's out of my ability let me know.

 
Campbell Ritchie
Sheriff
Posts: 53774
128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Too difficult for “beginning”. Moving discussion.
 
Stefan Evans
Bartender
Posts: 1834
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my opinion Java isn't the right tool for doing this.
To be specific: Java is the wrong tool for controlling other programs in your operating system.

Java is designed to run in a VM and be OS Independent. It should be able to run equally well on Linux/Mac/Whatever.
As such it doesn't have the much in the way of operating system hooks that are required for scripting control of other processes.

If what you want to do is control other programs on your computer - ie navigate to MS Paint, paste, save file - then there are better tools for that. Try Autoit for instance.

If what you want to do is capture the screen, and save it to a file, that is quite within the reach of a Java application - you just have to use the java libraries for image and file manipulation.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!