Automate Programs that are not .exe - how can i control keyboard keys or mouse???
Hi,
I would really appreciate if anyone coul help me.
I am trying automate a process using MS Office 2007 macros. The process involves opening a *.tnd file which automatically opens in an engineering software called TRANED and then running the analysis.
There are no hot keys to run the software. usually running it involves clicking the "Run TRANSYT" button when the file opens, which completes the run and then "produce report" button to create the report.
How can i automate this process using excel? I have managed to open the file using Shellexecute, but it just opens the file. how can i run it and produce report automatically? is it possible to get macros to somehow press these buttons to run the program and save the report. I am really desperate. I need to finish this work asap. Please help!!!:wave:
Edit by admin: no contact info permitted on the forum, thank you
Re: Automate Programs that are not .exe - how can i control keyboard keys or mouse???
Welcome to the forums :wave:
Are you using XP or Vista?
Re: Automate Programs that are not .exe - how can i control keyboard keys or mouse???
Many thanks for your reply.
I have VISTA at home but at my workplace were i need to use this macro I have XP. So its Windows XP i am interested in.
Any help would be much appreciated.
Thanks
Noman
Re: Automate Programs that are not .exe - how can i control keyboard keys or mouse???
Ok...
You can use ShellExecute to open the file, which you already are doing.
Since you are using XP, Have you considered the option of using sendkeys?
Re: Automate Programs that are not .exe - how can i control keyboard keys or mouse???
Thanks for your prompt reply. I havn't used it as yet. Do u have an example?
Basically, i just want to some how press the buttons to execute and produce the report.
I have noticed if I press 'Alt' then 'right arrow' key 9 times, then 'down arrow key once' and then press enter, the program runs. Ca i somehow get macro to perform this operation??
Thanks
Re: Automate Programs that are not .exe - how can i control keyboard keys or mouse???
Search the forums on sendkeys... There are plenty of examples in the forums.