| 1. |
Solve : How to input line commands in another program from DOS? |
|
Answer» Hi, I've been reading your posts, but I couldn't find a problem similar to what I have. I'm trying to create a DOS FILE to input line commands in another program, FLUENT. FLUENT has a line command like DOS, and I wanted to create an executable or .bat file to open (a simple START Fluent.exe), and then input commands to the fluent command line. For example, something to write FILE in FLUENT's command line. Any ideas would be very much appreciated! Nice piece of code but Dos can not really use a vbsBy using start "" filename.vbs, it runs the script outside the DOS.An alternative METHOD would be to have the script launch Fluent. Missing from the previous VBScript is grabbing a handle on the Fluent window. Consequently, the destination of the keystrokes is unpredictable. Code: [Select]Set WshShell = CreateObject("Wscript.Shell") WshShell.Run "Fluent.exe",,False WScript.Sleep 100 WshShell.AppActivate "Fluent Window Title" WScript.Sleep 100 WshShell.SendKeys "command{enter}" WScript.Sleep 100 Just a thought. Hi, thank you all for your ideas! It turnsout it was simple, all it needed was a batch file with an indication like 'fluent -g -i start', being start' a journal file with all the inputs I wanted to give through the command line! Thank you all very much! IsabelQuote from: IMartins on June 24, 2008, 11:17:08 AM 'fluent -g -i start' that looks awfully like a command line switch to me....... Yes, you're right, but when I tried "fluent.exe /?" it didn't return a thing, so I thought it didn't have those capabilities, until I found a pdf that explained exactly how to do it. Thanks for your trouble!Quote from: IMartins on June 25, 2008, 04:32:10 AM I tried "fluent.exe /?" it didn't return a thing I'll let you off then... Just pleased it's working now. |
|