 |
 |

04-11-2005, 09:48 PM
|
|
Newcomer
|
|
Join Date: Dec 2004
Posts: 10
|
|
Keystrokes for non-windows applications
|
Hello,
I'm having some trouble running an external DOS based application from my code. I'm using shell to start the application which works fine, however I need the application to be maximised, or else it runs very slowly, and this cannot be done until the program has fully loaded or it gets squished into the top half of the screen.
I'm using the following code the start the application. Normally when running this application you need to press ALT+ENTER to maximise it however in this code the sendkeys command does not work, instead the program just beeps.
Code:
Shell "G:\SC7\MODULES\CATI\SAMPREP.BAT", 1 ' start application
Application.Wait (Now + TimeValue("0:00:10")) 'wait for application to load
SendKeys "%~" 'trying to maximise once application has loaded
I now know, reading help, that sendkeys cannot be used for external applications not designed for windows, is there anything else I can do to maximise this application?
|
|

04-12-2005, 02:00 PM
|
 |
Excellent…
Forum Leader * Expert *
|
|
Join Date: Jun 2004
Location: Minneapolis MN - deceased
Posts: 2,483
|
|
Bonjour,
Try the following:
Code:
SendKeys "%~"
Shell "G:\SC7\MODULES\CATI\SAMPREP.BAT", 1
Obviously untested on my part, I'll leave that to you. 
|
|

04-12-2005, 04:41 PM
|
|
Newcomer
|
|
Join Date: Dec 2004
Posts: 10
|
|
|
Hello,
Unfortunately this still does work. I don't think Sendkeys is going to work with the DOS application as in VBA help it says:
"Note You can't use SendKeys to send keystrokes to an application that is not designed to run in Microsoft Windows or Macintosh."
And this is a DOS based application.
But thanks for your help, any other ideas?
Cheers
|
|

04-13-2005, 09:27 AM
|
 |
Green-Eyed
Super Moderator * Guru *
|
|
Join Date: May 2001
Location: Bangkok, Thailand
Posts: 10,261
|
|
|

04-24-2005, 05:22 AM
|
|
Newcomer
|
|
Join Date: Dec 2004
Posts: 10
|
|
|
So sorry for not replying earlier, have been very busy and sick.
Thanks for all your help Timbo, I haven't yet had a chance to test it but I'm sure it'll do the job.
Thanks again
Cheers
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
|
|
 |
|