Jump to content

read from word past in msdos


Scanner
 Share

Recommended Posts

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 window

Microsoft Windows [Version 6.0.6000]

Copyright © 2006 Microsoft Corporation. All rights reserved.

*******************CMD**********************

C:\Till\System>sigentry

Enter the licence number (up to 10 chars):

132444

Enter the name of the end-user (up to 40 chars):

scanner

Enter the first line of the site address (up to 40 chars):

245 bigwalkway

Enter the second line of the site address (up to 40 chars):

small walkway

Enter a machine ID (up to 12 chars):

00123456

Enter a seat number (up to 5 digits):

1

Enter a product list (up to 80 chars):

paypoint

Enter a software version number (up to 10 chars):

6

Enter the maximum user count (up to 4 digits):

1

Enter an expiry date (in the form DD-MM-YYYY):

23-19-2009

Enter 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 created

my 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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...