Scanner Posted February 9, 2007 Share Posted February 9, 2007 I have an application which runs in dos. when the exe file is run from within dos it requires a number of questions to be answered, the final result is a lisence file created by this utility.the answers are sent to me in a word doc format.below is the contents of the CMD windowMicrosoft Windows [Version 6.0.6000]Copyright © 2006 Microsoft Corporation. All rights reserved.*******************CMD**********************C:\Till\System>sigentryEnter the licence number (up to 10 chars):132444Enter the name of the end-user (up to 40 chars):scannerEnter the first line of the site address (up to 40 chars):245 bigwalkwayEnter the second line of the site address (up to 40 chars):small walkwayEnter a machine ID (up to 12 chars):00123456Enter a seat number (up to 5 digits):1Enter a product list (up to 80 chars):paypointEnter a software version number (up to 10 chars):6Enter the maximum user count (up to 4 digits):1Enter an expiry date (in the form DD-MM-YYYY):23-19-2009Enter the licence code (16 hex-digit pairs):E2 3E EE 44 55 77 88 88 88 88 88 88********end of window***********at this point after the last enter a file called paypoint.sig is createdmy question is. can a script be created to extract the information from the word doc and paste it in the dos window at it each question prompt.bear in mind scripting is a new thing to me. mostly i look at other scripts and try figure them out any help would be appreciated Link to comment Share on other sites More sharing options...
Confuzzled Posted February 10, 2007 Share Posted February 10, 2007 What version of Windoze and Word are you running?Is your DOS program satified with non-valid date entries such as 23-19-2009? Word to text conversion: You could try cut-and-paste from Word using AutoIT to create a text document from your paypoint.sig file, a 'save as' to save as a text file, or just examine your 'Word' document to verify it is actually in MS Word format, and not just a simple text file. There are command line utilities that can convert your Word document into a text file.You should be able to pipe your answers from the text file to the DOS program with little difficulty. Link to comment Share on other sites More sharing options...
Scanner Posted February 12, 2007 Author Share Posted February 12, 2007 What version of Windoze and Word are you running?Is your DOS program satified with non-valid date entries such as 23-19-2009? Word to text conversion: You could try cut-and-paste from Word using AutoIT to create a text document from your paypoint.sig file, a 'save as' to save as a text file, or just examine your 'Word' document to verify it is actually in MS Word format, and not just a simple text file. There are command line utilities that can convert your Word document into a text file.You should be able to pipe your answers from the text file to the DOS program with little difficulty.Im Using windows Vista and Word 2007 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now