February 2nd, 2007, 07:54 AM
WSH and reading a line from a file that matches a string
im kind of stuck and need pointing in the right direction (or left, whichever gets the job done )
ok so i have this simple script already
basically asks the user for input... but im trying to make it a little bit more automated (or easier) for the user.
Message = "Please Enter the drawing number and path -- IE. \\phidias\loosegears"
Title = "DrawPrint - 2007"
Text1 = "Canceled"
Set WSHShell = WScript.CreateObject("WScript.Shell")
result = InputBox(Message,Title,"")
If result = "" Then
WshShell.Run """C:\progra~1\Solide~1\Program\smartvw.exe""" + result
we have a file for our drawing printing program that contains every drawing available in a certain directory
I want to search this file for a particular drawing number "13579" for the sake of an example and have the entire line "\\hermes\RU\13579.dft" returned in the script which can then be passed onto the program so it can follow the rest of the program and print the drawing.
does anyone know where i should start looking or if i could eliminate the need to send key presses that can easily be interupted (not that the key presses need to be changed, it will be running on a server console thats hidden away from user interaction).
thanks in advance.