hi all,

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

Code:
Dim WSHShell
Dim Message
Dim Title

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
WScript.Echo Text1
Else 
WshShell.Run """C:\progra~1\Solide~1\Program\smartvw.exe""" + result
WScript.Sleep(3000)
WshShell.SendKeys "^p"
WScript.Sleep(2000)
WshShell.SendKeys "%p"
WScript.Sleep(2000)
WshShell.SendKeys "%l"
WScript.Sleep(2000)
WshShell.SendKeys "{ENTER}"
WScript.Sleep(2000)
WshShell.SendKeys "{ENTER}"
WScript.Sleep(2000)
WshShell.SendKeys "%{f4}"
End If
WScript.Quit()
basically asks the user for input... but im trying to make it a little bit more automated (or easier) for the user.

we have a file for our drawing printing program that contains every drawing available in a certain directory

small example

\\hermes\TU\1234.dwg
\\hermes\TI\5678.edwg
\\hermes\RU\13579.dft
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.

Matty G