- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have developed an agent based model for the penetration of new technology into the automarket. Some of my analyses will require multiple runs to generate appropriate statistics. Depending on the number of agents employed in the model, the run time can be quite long for each. It would be quite nice to run the model from a batch file multiple times. However, my executable requires some input from the keyboard each run, e.g. Are you introducing Car A or Car B.
Question: Can I run my *.exe file from a batch file which would also provide the normal keyboard input?
Thank you!
John
Question: Can I run my *.exe file from a batch file which would also provide the normal keyboard input?
Thank you!
John
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I supopose You are using console application.
Long time ago I put keyboard input into my FORTRAN executables through text files:
let say I have text file keyboard.txt containing:
car a
testit
carb
then I run program.exe < keyboard.txt
and each time program.exe uses "read(*,*) variable"
it obtains from keyboard.txt text (or value) "car a", "testit" and "carb".
I hope it helps
Jakub Zlamal
Long time ago I put keyboard input into my FORTRAN executables through text files:
let say I have text file keyboard.txt containing:
car a
testit
carb
then I run program.exe < keyboard.txt
and each time program.exe uses "read(*,*) variable"
it obtains from keyboard.txt text (or value) "car a", "testit" and "carb".
I hope it helps
Jakub Zlamal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - irenejohn@aol.com
I have developed an agent based model for the penetration of new technology into the automarket. Some of my analyses will require multiple runs to generate appropriate statistics. Depending on the number of agents employed in the model, the run time can be quite long for each. It would be quite nice to run the model from a batch file multiple times. However, my executable requires some input from the keyboard each run, e.g. Are you introducing Car A or Car B.
Question: Can I run my *.exe file from a batch file which would also provide the normal keyboard input?
Thank you!
John
Question: Can I run my *.exe file from a batch file which would also provide the normal keyboard input?
Thank you!
John
Would a normal argument list do the job?
Look up GETARG in the help file for more informations.
Markus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Or better, the standard GET_COMMAND_ARGUMENT.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - irenejohn@aol.com
Or have I missed something?
John
John
Yes, that you can convert a string to a number using internal READ (and the other way round using internal WRITE).
Jugoslav

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page