School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,454 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,602 people online right now. Registration is fast and FREE... Join Now!




How to automate EXE?

 

How to automate EXE?, Automating EXE file for many files - batch/javarobot?

lv18

25 Jun, 2009 - 07:06 AM
Post #1

New D.I.C Head
*

Joined: 25 Jun, 2009
Posts: 3

Hello all, I'm new to the forum and not very experienced in coding. I have done a lot of work with MATLAB since I am a Mechanical Engineering grad student, but that's about it.

Right now I'm running some test in my lab that require me to process a couple of hundred images at a time. I have been doing some searching online to determine if it's possible to automate this image processing. Each image simply requires sending it through an EXE graphical program. There are no parameters that need to be adjusted, or anything like that, so it seems to me that it should be possible to automate this using a for loop. The MATLAB documentation indicates that it's not possible with that software.

In my searches, I have found suggestions for using a batch file or a JAVA Robot program to do similar tasks. I have spent a few hours trying to learn the basics of these methods, but I have still not convinced myself that these are the correct tools for the job I am trying to complete. I am posting here simply to ask if anyone could enlighten me as to a couple of questions:

1. Based on my brief description, does it seem plausible that I could automate this image processing?

2. If so, do either/both of these tools seem like good options for me?

3. Are there any resources that you could recommend for someone in my position to learn how to use the best tool for the job?

Thanks in advance for your suggestions.



User is offlineProfile CardPM
+Quote Post


bsaunders

RE: How To Automate EXE?

25 Jun, 2009 - 07:14 PM
Post #2

D.I.C Addict
****

Joined: 18 Jan, 2009
Posts: 554



Thanked: 42 times
My Contributions
Are you using Windows?
User is offlineProfile CardPM
+Quote Post

lv18

RE: How To Automate EXE?

26 Jun, 2009 - 04:53 AM
Post #3

New D.I.C Head
*

Joined: 25 Jun, 2009
Posts: 3

QUOTE(bsaunders @ 25 Jun, 2009 - 07:14 PM) *

Are you using Windows?


The EXE will only run in Windows, so that's the OS (XP specifically) that I'm using for this application.
User is offlineProfile CardPM
+Quote Post

Oler1s

RE: How To Automate EXE?

27 Jun, 2009 - 02:39 PM
Post #4

D.I.C Addict
****

Joined: 4 Jun, 2009
Posts: 639



Thanked: 66 times
My Contributions
QUOTE
The MATLAB documentation indicates that it's not possible with that software.
You sure? I'm looking at Matlab system documentation, so you should be able to repeatedly call the program in a loop. You just need to name the images in some algorithmic way (say numerically) so that you can iterate over them.

What you have isn't a complex issue, and there is no best tool especially considering that many tools can accomplish what you want effectively. The question is how insanely (and unnecessarily) complex you want it to get. Batch works. I used Python in conjunction with Matlab on a previous project. I had Python code driving programs, some calling by commandline, some interactive commandline input.

I write scripts in Python, but if you get up to speed with Batch, it's not difficult to do. And I've just given you the URL to the relevant Matlab function.
User is offlineProfile CardPM
+Quote Post

lv18

RE: How To Automate EXE?

29 Jun, 2009 - 06:25 AM
Post #5

New D.I.C Head
*

Joined: 25 Jun, 2009
Posts: 3

[quote name='Oler1s' date='27 Jun, 2009 - 02:39 PM' post='687021']
[quote]The MATLAB documentation indicates that it's not possible with that software.[/quote]You sure? I'm looking at Matlab system documentation, so you should be able to repeatedly call the program in a loop. You just need to name the images in some algorithmic way (say numerically) so that you can iterate over them.[/quote]

The problem I have with the MATLAB feature is that I don't think the EXE I want to control can be controlled via the command line. The EXE is a graphical program so I need to select the files and press the "ok" buttons through several screens. I don't need to actually change any of the parameters in the dialogue boxes, just click through and save the file at the end.

[quote name='Oler1s' date='27 Jun, 2009 - 02:39 PM' post='687021']
[quote]What you have isn't a complex issue, and there is no best tool especially considering that many tools can accomplish what you want effectively. The question is how insanely (and unnecessarily) complex you want it to get. Batch works. I used Python in conjunction with Matlab on a previous project. I had Python code driving programs, some calling by commandline, some interactive commandline input.

I write scripts in Python, but if you get up to speed with Batch, it's not difficult to do. And I've just given you the URL to the relevant Matlab function.
[/quote]

Glad to hear that it's not complex. As I said before, I'm very limited in my coding experience, so it's difficult for me to evaluate which tools to use in order to avoid making it unnecessarily complex. What I want is the simplest method that performs the task. If Batch is the way to go, then I'll get up to speed on that. Ultimately, I wanted to get the input from some people more experienced than myself before I invested too many hours on a specific method.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/8/09 01:57AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month