Category : Files from Magazines
Archive   : VOL10N18.ZIP
Filename : MYSHELL.2

 
Output of file : MYSHELL.2 contained in archive : VOL10N18.ZIP
REM MyShell2

Declare Sub MyShell Lib "kernel" \
(lpCmdStr$, nCmdShow As Integer) \
Alias "WinExec"

Function Extension$(fname$)
If Len(fname$) < 4 Then maxi = Len(fname$) Else maxi = 4
s$ = Right$(fname$, maxi) ' extension has to be in last characters
If InStr(s$, "\") <> 0 Then ' must be tiny directory name, not extension
Extension$ = ""
Else
n = InStr(s$, ".")
If n = 0 Then Extension$ = "" Else \
Extension$ = Right$(fname$, maxi - n)
End If
End Function

Sub Launch(cmd$)
If InStr(cmd$, " ") Then ' if space in cmd$, then
MyShell cmd$, 1 ' must have program name already
Else
ext$ = Extension$(cmd$)
prog$ = GetProfileString$("extensions", ext$) ' program.exe ^.xxx
If prog$ = "" Then
MyShell cmd$, 1 ' nothing in [extensions]: assume program name
Else
prog$ = Left$(prog$, InStr(prog$, " ")) ' throw away ^.xxx
MyShell prog$ + " " + cmd$, 1
End If
End If
End Sub

Sub MAIN
Launch "foo.bmp" ' or any filename .EXT
End Sub


  3 Responses to “Category : Files from Magazines
Archive   : VOL10N18.ZIP
Filename : MYSHELL.2

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/