Mr IA: You really tickle me . It is amazing to see how people draw conclusions without even a clue what the other person could really be. I'll set aside all this for a moment and post the code here and see what you can come up with.
[code=auto:0]Dim $SelUpldCas = ""
Dim $dir0int = ""
Dim $orgdeflpt = ""
Dim $altdeflpt = "Acrobat PDFWriter,winspool,LPT1:"
WinMinimizeAll ()
Func OrgDefLpt ()
$orgdeflpt = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows","Device")
EndFunc
Func AltDefLpt ()
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows","Device","REG_SZ",$altdeflpt)
EndFunc
Func ResOrgLpt ()
RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows","Device","REG_SZ",$orgdeflpt)
EndFunc
Func MyWinExplr ()
$winexplr = ObjCreate("InternetExplorer.Application")
with $winexplr
.Visible = 1
.Toolbar = 1
.Navigate($dir0int)
EndWith
EndFunc
Func MySelCasDlg ()
$SelUpldCas = InputBox("What Case ??", "To continue please enter the case number to create report" &@LF&@LF& "Valid numbers are from 1 thro 5","", " M1")
If @error = 1 Then
MsgBox(0, "Terminated", "The report generation script was terminated by you.")
Exit
EndIf
Select
case $SelUpldCas = "1"
$dir0int = @MyDocumentsDir&"\UpLoads#1\"
MyWinExplr ()
case $SelUpldCas = "2"
$dir0int = @MyDocumentsDir&"\UpLoads#2"
MyWinExplr ()
case $SelUpldCas = "3"
$dir0int = @MyDocumentsDir&"\UpLoads#3"
MyWinExplr ()
case $SelUpldCas = "4"
$dir0int = @MyDocumentsDir&"\UpLoads#4"
MyWinExplr ()
case $SelUpldCas = "5"
$dir0int = @MyDocumentsDir&"\UpLoads#5"
MyWinExplr ()
Case $SelUpldCas = "0"
MsgBox (0,"STOP!", "You entered a case that is invalid. At this time only cases #1 thro' #5 are possible. Please reenter the corrct case #")
MySelCasDlg ()
Case $SelUpldCas >= "6"
MsgBox (0,"STOP!", "You entered a case that is invalid. At this time only cases #1 thro' #5 are possible. Please reenter the corrct case #")
MySelCasDlg ()
EndSelect
EndFunc
Func MyFilSel ()
Send("{HOME}")
Sleep(3000)
Send("{p}") ; This would be the first character of the filename
Send("{r}") ; This would be the second character of the filename
Send("{e}") ; This would be the third character of the filename
Send("{x}") ; This would be the fourth character of the filename
Send("{x}") ; This would be the fifth character of the filename
Send("{X}") ; This would be the sixth character of the filename
Send("{X}") ; This would be the seventh character of the filename
Send("{ENTER}") ; This will open the document with the associated application
Sleep(3000)
Send("{CTRLDOWN}{P}") ; Print Dialogue
Send("{CTRLUP}")
;~ An alternate method would be to use "Shift + F10" for context menu and select function, in my case it would be "convert to PDF". The lines will change depending on the methodology employed.
Sleep(2000)
Send("{ESC}") ; Print dialogue quit
Send("{CTRLDOWN}{q}")
Send("{CTRLUP}") ; Application & document quit
Sleep(1000)
Send("{ALTDOWN}{F4}")
Send("{ALTUP}") ; Explorer window quit
EndFunc
OrgDefLpt ()
AltDefLpt ()
MySelCasDlg ()
MyFilSel ()
ResOrgLpt ()
Exit