home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 6_2008-2009.ISO / data / zips / Shoutcast_21712512272009.psc / frmMain.frm < prev   
Text File  |  2009-12-26  |  73KB  |  2,013 lines

  1. VERSION 5.00
  2. Object = "{6BF52A50-394A-11D3-B153-00C04F79FAA6}#1.0#0"; "wmp.dll"
  3. Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
  4. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  5. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  6. Begin VB.Form frmMain 
  7.    Caption         =   "GetShoutcast by M. Morrow/F. Aldea"
  8.    ClientHeight    =   9870
  9.    ClientLeft      =   3090
  10.    ClientTop       =   2970
  11.    ClientWidth     =   6030
  12.    Icon            =   "frmMain.frx":0000
  13.    LinkTopic       =   "Form1"
  14.    ScaleHeight     =   9870
  15.    ScaleWidth      =   6030
  16.    Tag             =   "-1"
  17.    Begin VB.Frame Frame1 
  18.       Caption         =   "Shoutcast/Saved Station Options (Read-Only)"
  19.       Enabled         =   0   'False
  20.       Height          =   1935
  21.       Left            =   60
  22.       TabIndex        =   22
  23.       Top             =   5100
  24.       Width           =   5895
  25.       Begin VB.TextBox txtServer 
  26.          Height          =   285
  27.          Left            =   1560
  28.          TabIndex        =   27
  29.          TabStop         =   0   'False
  30.          Text            =   "0.0.0.0"
  31.          ToolTipText     =   "URL or IP address of Shoutcast/ICY station to record."
  32.          Top             =   300
  33.          Width           =   4200
  34.       End
  35.       Begin VB.CheckBox chkFileBySong 
  36.          BackColor       =   &H00C0FFC0&
  37.          Caption         =   "Use ICY song title for filename (overrides filename prefix, below)"
  38.          Height          =   255
  39.          Left            =   150
  40.          TabIndex        =   26
  41.          Tag             =   "-1"
  42.          ToolTipText     =   "If checked, break stream into separate recordings by received filename (may not always be good to do)."
  43.          Top             =   1260
  44.          Width           =   5555
  45.       End
  46.       Begin VB.CheckBox optTimedStop 
  47.          BackColor       =   &H00C0FFC0&
  48.          Caption         =   "Stop recording at: not set"
  49.          Height          =   255
  50.          Left            =   150
  51.          TabIndex        =   25
  52.          Tag             =   "-1"
  53.          ToolTipText     =   "If checked, recording will stop after this many minutes."
  54.          Top             =   990
  55.          Width           =   5555
  56.       End
  57.       Begin VB.CheckBox optSupplyFilename 
  58.          BackColor       =   &H00C0FFC0&
  59.          Caption         =   "Use this filename prefix: not set"
  60.          Height          =   255
  61.          Left            =   150
  62.          TabIndex        =   24
  63.          Tag             =   "-1"
  64.          ToolTipText     =   "If checked, use supplied name for filename prefix, else use generic filename."
  65.          Top             =   1530
  66.          Width           =   5555
  67.       End
  68.       Begin VB.CheckBox optTimedStart 
  69.          BackColor       =   &H00C0FFC0&
  70.          Caption         =   "Start recording at: not set"
  71.          Height          =   255
  72.          Left            =   150
  73.          TabIndex        =   23
  74.          Tag             =   "-1"
  75.          ToolTipText     =   "If checked, use supplied station (stream) information for recording."
  76.          Top             =   720
  77.          Width           =   5555
  78.       End
  79.       Begin VB.Label lblServer 
  80.          AutoSize        =   -1  'True
  81.          Caption         =   "Server IP/Path:Port:"
  82.          Height          =   195
  83.          Left            =   60
  84.          TabIndex        =   28
  85.          Top             =   330
  86.          Width           =   1440
  87.       End
  88.    End
  89.    Begin VB.Frame fraManualControls 
  90.       Caption         =   "Manual Recording Controls"
  91.       Height          =   1155
  92.       Left            =   60
  93.       TabIndex        =   21
  94.       Top             =   7140
  95.       Width           =   5895
  96.       Begin VB.CommandButton cmdExit 
  97.          BackColor       =   &H00FF00FF&
  98.          Cancel          =   -1  'True
  99.          Caption         =   "E&xit"
  100.          Height          =   360
  101.          Left            =   3900
  102.          MaskColor       =   &H00C0FFFF&
  103.          Style           =   1  'Graphical
  104.          TabIndex        =   9
  105.          ToolTipText     =   "Close all files and cease all operation."
  106.          Top             =   675
  107.          UseMaskColor    =   -1  'True
  108.          Width           =   1800
  109.       End
  110.       Begin VB.CommandButton cmdDisconnectFromServer 
  111.          BackColor       =   &H008080FF&
  112.          Caption         =   "&Disconnect from Server"
  113.          Enabled         =   0   'False
  114.          Height          =   360
  115.          Left            =   1920
  116.          Style           =   1  'Graphical
  117.          TabIndex        =   6
  118.          ToolTipText     =   "Disconnect from server."
  119.          Top             =   300
  120.          Width           =   1970
  121.       End
  122.       Begin VB.CommandButton cmdStartRecording 
  123.          BackColor       =   &H00FFFF80&
  124.          Caption         =   "&Start Recording"
  125.          Enabled         =   0   'False
  126.          Height          =   360
  127.          Left            =   120
  128.          MaskColor       =   &H00FFFFFF&
  129.          Style           =   1  'Graphical
  130.          TabIndex        =   5
  131.          ToolTipText     =   "Start saving the received data to the Output Path folder with default or entered filename."
  132.          Top             =   675
  133.          UseMaskColor    =   -1  'True
  134.          Width           =   1800
  135.       End
  136.       Begin VB.CommandButton cmdStopRecording 
  137.          BackColor       =   &H008080FF&
  138.          Caption         =   "Stop Re&cording"
  139.          Enabled         =   0   'False
  140.          Height          =   360
  141.          Left            =   1920
  142.          Style           =   1  'Graphical
  143.          TabIndex        =   7
  144.          ToolTipText     =   "Stop recording stream in the selected file."
  145.          Top             =   660
  146.          UseMaskColor    =   -1  'True
  147.          Width           =   1970
  148.       End
  149.       Begin VB.CommandButton cmdSelectMemory 
  150.          BackColor       =   &H0080C0FF&
  151.          Caption         =   "Saved St&ations"
  152.          Height          =   360
  153.          Left            =   3900
  154.          MaskColor       =   &H00FFFFFF&
  155.          Style           =   1  'Graphical
  156.          TabIndex        =   8
  157.          ToolTipText     =   "Display a Msgbox with partial or full information on the displayed station.  Varies with how the station info was acquired."
  158.          Top             =   300
  159.          UseMaskColor    =   -1  'True
  160.          Width           =   1800
  161.       End
  162.       Begin VB.CommandButton cmdConnectToServer 
  163.          BackColor       =   &H00FFFF80&
  164.          Caption         =   "&Connect to Server"
  165.          Height          =   360
  166.          Left            =   120
  167.          Style           =   1  'Graphical
  168.          TabIndex        =   4
  169.          ToolTipText     =   "Attempt to connect to shown server."
  170.          Top             =   300
  171.          Width           =   1800
  172.       End
  173.    End
  174.    Begin VB.Timer tmrUpdateAll 
  175.       Interval        =   1000
  176.       Left            =   5940
  177.       Top             =   840
  178.    End
  179.    Begin VB.Frame fraOptions 
  180.       Caption         =   "Recording/Playback Options"
  181.       Height          =   2775
  182.       Left            =   60
  183.       TabIndex        =   18
  184.       Top             =   2220
  185.       Width           =   5895
  186.       Begin VB.Frame fraPlayControl 
  187.          BorderStyle     =   0  'None
  188.          Height          =   615
  189.          Left            =   3430
  190.          TabIndex        =   34
  191.          Top             =   660
  192.          Visible         =   0   'False
  193.          Width           =   1830
  194.          Begin VB.CheckBox chkPlayStop 
  195.             DownPicture     =   "frmMain.frx":0442
  196.             Height          =   660
  197.             Left            =   1200
  198.             Picture         =   "frmMain.frx":0AEA
  199.             Style           =   1  'Graphical
  200.             TabIndex        =   37
  201.             Tag             =   "-1"
  202.             ToolTipText     =   "Play or stop the current stream.  If you stop it, then play again, it wills start from the very beginning."
  203.             Top             =   0
  204.             Width           =   675
  205.          End
  206.          Begin VB.CheckBox chkMutePlayback 
  207.             DownPicture     =   "frmMain.frx":11B2
  208.             Height          =   660
  209.             Left            =   600
  210.             Picture         =   "frmMain.frx":1874
  211.             Style           =   1  'Graphical
  212.             TabIndex        =   36
  213.             Tag             =   "-1"
  214.             ToolTipText     =   "Mute the playback of the stream without changing the volume level.  Click again to hear recording (will not pause)."
  215.             Top             =   0
  216.             Width           =   675
  217.          End
  218.          Begin VB.CheckBox chkPausePlayback 
  219.             DownPicture     =   "frmMain.frx":1F36
  220.             Height          =   660
  221.             Left            =   0
  222.             Picture         =   "frmMain.frx":253F
  223.             Style           =   1  'Graphical
  224.             TabIndex        =   35
  225.             Tag             =   "-1"
  226.             ToolTipText     =   "Pause the playback of the stream.  Click again to resume from paused position."
  227.             Top             =   0
  228.             Width           =   675
  229.          End
  230.       End
  231.       Begin VB.CommandButton cmdBFF 
  232.          Caption         =   "..."
  233.          Height          =   285
  234.          Left            =   5460
  235.          TabIndex        =   32
  236.          Tag             =   "-1"
  237.          ToolTipText     =   "Click to browse the file system for a folder into which to save the Shoutcast stream files."
  238.          Top             =   310
  239.          Width           =   315
  240.       End
  241.       Begin VB.CheckBox chkRecordAllMemorized 
  242.          BackColor       =   &H00C0C0FF&
  243.          Caption         =   "Record all ti&med entries in the saved stations list to the Output Path, above."
  244.          Height          =   780
  245.          Left            =   660
  246.          TabIndex        =   2
  247.          Tag             =   "-1"
  248.          ToolTipText     =   "When checked, program is in ""Automatic Record"" mode.  Uncheck for manual recording."
  249.          Top             =   690
  250.          Width           =   2235
  251.       End
  252.       Begin VB.TextBox txtOutPath 
  253.          Height          =   285
  254.          Left            =   1080
  255.          TabIndex        =   1
  256.          Text            =   "c:\"
  257.          ToolTipText     =   "Output folder for recordings.  Click ""..."" button at right to select folder."
  258.          Top             =   310
  259.          Width           =   4335
  260.       End
  261.       Begin MSComctlLib.Slider sliVolume 
  262.          Height          =   255
  263.          Left            =   60
  264.          TabIndex        =   3
  265.          ToolTipText     =   "Adjust playback volume, Low to High."
  266.          Top             =   1500
  267.          Width           =   5775
  268.          _ExtentX        =   10186
  269.          _ExtentY        =   450
  270.          _Version        =   393216
  271.          MousePointer    =   9
  272.          Enabled         =   0   'False
  273.          Max             =   100
  274.          SelStart        =   50
  275.          TickFrequency   =   2
  276.          Value           =   50
  277.          TextPosition    =   1
  278.       End
  279.       Begin MSComctlLib.Slider sliBalance 
  280.          Height          =   255
  281.          Left            =   60
  282.          TabIndex        =   30
  283.          ToolTipText     =   "Adjust balance Left to Right."
  284.          Top             =   2100
  285.          Width           =   5775
  286.          _ExtentX        =   10186
  287.          _ExtentY        =   450
  288.          _Version        =   393216
  289.          MousePointer    =   9
  290.          Enabled         =   0   'False
  291.          LargeChange     =   10
  292.          Min             =   -100
  293.          Max             =   100
  294.          TickFrequency   =   4
  295.          TextPosition    =   1
  296.       End
  297.       Begin VB.Label lblPlayControl 
  298.          Caption         =   " Pause    Mute   Play/Stop "
  299.          Height          =   195
  300.          Left            =   3520
  301.          TabIndex        =   33
  302.          Tag             =   "-1"
  303.          Top             =   1320
  304.          Visible         =   0   'False
  305.          Width           =   1980
  306.       End
  307.       Begin VB.Label Label1 
  308.          Alignment       =   2  'Center
  309.          BackStyle       =   0  'Transparent
  310.          Caption         =   "L------------------------------------- Balance --------------------------------------R"
  311.          BeginProperty Font 
  312.             Name            =   "Arial"
  313.             Size            =   8.25
  314.             Charset         =   0
  315.             Weight          =   700
  316.             Underline       =   0   'False
  317.             Italic          =   0   'False
  318.             Strikethrough   =   0   'False
  319.          EndProperty
  320.          ForeColor       =   &H00FFFFFF&
  321.          Height          =   195
  322.          Index           =   2
  323.          Left            =   150
  324.          TabIndex        =   31
  325.          Tag             =   "-1"
  326.          ToolTipText     =   "Adjust balance Left to Right."
  327.          Top             =   2400
  328.          Width           =   5625
  329.       End
  330.       Begin VB.Label Label1 
  331.          Alignment       =   2  'Center
  332.          BackStyle       =   0  'Transparent
  333.          Caption         =   "L------------------------------- Playback Volume -------------------------------H"
  334.          BeginProperty Font 
  335.             Name            =   "Arial"
  336.             Size            =   8.25
  337.             Charset         =   0
  338.             Weight          =   700
  339.             Underline       =   0   'False
  340.             Italic          =   0   'False
  341.             Strikethrough   =   0   'False
  342.          EndProperty
  343.          ForeColor       =   &H00FFFFFF&
  344.          Height          =   195
  345.          Index           =   1
  346.          Left            =   150
  347.          TabIndex        =   29
  348.          ToolTipText     =   "Adjust playback volume, Low to High."
  349.          Top             =   1800
  350.          Width           =   5625
  351.       End
  352.       Begin VB.Label Label1 
  353.          Caption         =   "O&utput Path:"
  354.          Height          =   255
  355.          Index           =   0
  356.          Left            =   120
  357.          TabIndex        =   0
  358.          Tag             =   "-1"
  359.          Top             =   340
  360.          Width           =   975
  361.       End
  362.       Begin VB.Image Image1 
  363.          Height          =   195
  364.          Left            =   150
  365.          Picture         =   "frmMain.frx":2B48
  366.          Tag             =   "-1"
  367.          Top             =   1800
  368.          Width           =   5625
  369.       End
  370.       Begin VB.Image Image2 
  371.          Height          =   195
  372.          Left            =   150
  373.          Picture         =   "frmMain.frx":3A33
  374.          Tag             =   "-1"
  375.          Top             =   2400
  376.          Width           =   5625
  377.       End
  378.       Begin VB.Label lblPlayControlsComing 
  379.          Alignment       =   2  'Center
  380.          BackStyle       =   0  'Transparent
  381.          Caption         =   "Play Controls will appear here when appropriate."
  382.          Height          =   630
  383.          Left            =   3465
  384.          TabIndex        =   38
  385.          Top             =   850
  386.          Width           =   1785
  387.          WordWrap        =   -1  'True
  388.       End
  389.    End
  390.    Begin VB.PictureBox Picture1 
  391.       BackColor       =   &H00000000&
  392.       Height          =   2055
  393.       Left            =   60
  394.       ScaleHeight     =   1995
  395.       ScaleWidth      =   5835
  396.       TabIndex        =   10
  397.       TabStop         =   0   'False
  398.       ToolTipText     =   "Information panel.  Point to items herein for specific information."
  399.       Top             =   120
  400.       Width           =   5895
  401.       Begin VB.Label lblSize 
  402.          AutoSize        =   -1  'True
  403.          BackStyle       =   0  'Transparent
  404.          Caption         =   "Size: n/a"
  405.          Enabled         =   0   'False
  406.          ForeColor       =   &H00FFFFFF&
  407.          Height          =   195
  408.          Left            =   1560
  409.          TabIndex        =   17
  410.          ToolTipText     =   "Filesize of output file (stream data)."
  411.          Top             =   1665
  412.          Width           =   645
  413.       End
  414.       Begin VB.Label lblFile 
  415.          AutoSize        =   -1  'True
  416.          BackStyle       =   0  'Transparent
  417.          Caption         =   "File: n/a"
  418.          Enabled         =   0   'False
  419.          ForeColor       =   &H00FFFFFF&
  420.          Height          =   195
  421.          Left            =   60
  422.          TabIndex        =   16
  423.          ToolTipText     =   "Output filename for stream data."
  424.          Top             =   1080
  425.          Width           =   585
  426.       End
  427.       Begin VB.Label lblTime 
  428.          AutoSize        =   -1  'True
  429.          BackColor       =   &H00000000&
  430.          Caption         =   "Running time: n/a"
  431.          Enabled         =   0   'False
  432.          BeginProperty Font 
  433.             Name            =   "Verdana"
  434.             Size            =   8.25
  435.             Charset         =   0
  436.             Weight          =   400
  437.             Underline       =   0   'False
  438.             Italic          =   0   'False
  439.             Strikethrough   =   0   'False
  440.          EndProperty
  441.          ForeColor       =   &H00FFFFFF&
  442.          Height          =   195
  443.          Left            =   3195
  444.          TabIndex        =   15
  445.          ToolTipText     =   "Total recording time unless files are being broken into titled segments, then title time."
  446.          Top             =   1680
  447.          Width           =   1545
  448.       End
  449.       Begin VB.Label lblStatus 
  450.          BackStyle       =   0  'Transparent
  451.          Caption         =   "REC"
  452.          BeginProperty Font 
  453.             Name            =   "Verdana"
  454.             Size            =   32.25
  455.             Charset         =   0
  456.             Weight          =   700
  457.             Underline       =   0   'False
  458.             Italic          =   0   'False
  459.             Strikethrough   =   0   'False
  460.          EndProperty
  461.          ForeColor       =   &H000000FF&
  462.          Height          =   735
  463.          Left            =   45
  464.          TabIndex        =   14
  465.          ToolTipText     =   "Will blink, slowly, when recording active."
  466.          Top             =   1215
  467.          Visible         =   0   'False
  468.          Width           =   1455
  469.       End
  470.       Begin VB.Label lblBitrate 
  471.          AutoSize        =   -1  'True
  472.          BackStyle       =   0  'Transparent
  473.          Caption         =   "Bitrate: n/a"
  474.          Enabled         =   0   'False
  475.          ForeColor       =   &H00FFFFFF&
  476.          Height          =   195
  477.          Left            =   1560
  478.          TabIndex        =   13
  479.          ToolTipText     =   "Server bitrate for stream."
  480.          Top             =   1395
  481.          Width           =   795
  482.       End
  483.       Begin VB.Label lblTitle 
  484.          AutoSize        =   -1  'True
  485.          BackStyle       =   0  'Transparent
  486.          Caption         =   "Title: n/a"
  487.          Enabled         =   0   'False
  488.          ForeColor       =   &H00FFFFFF&
  489.          Height          =   195
  490.          Left            =   60
  491.          TabIndex        =   12
  492.          ToolTipText     =   "Song title if titles being sent in ICY headers."
  493.          Top             =   810
  494.          Width           =   645
  495.       End
  496.       Begin VB.Label lblRadio 
  497.          Alignment       =   2  'Center
  498.          BackStyle       =   0  'Transparent
  499.          Caption         =   "Stream ID and Status Messages"
  500.          BeginProperty Font 
  501.             Name            =   "Arial"
  502.             Size            =   9.75
  503.             Charset         =   0
  504.             Weight          =   700
  505.             Underline       =   0   'False
  506.             Italic          =   0   'False
  507.             Strikethrough   =   0   'False
  508.          EndProperty
  509.          ForeColor       =   &H00FFFF00&
  510.          Height          =   735
  511.          Left            =   120
  512.          TabIndex        =   11
  513.          ToolTipText     =   "Stream and server status messages."
  514.          Top             =   0
  515.          UseMnemonic     =   0   'False
  516.          Width           =   5595
  517.       End
  518.    End
  519.    Begin MSWinsockLib.Winsock wsShoutcastReceiver 
  520.       Left            =   5940
  521.       Top             =   420
  522.       _ExtentX        =   741
  523.       _ExtentY        =   741
  524.       _Version        =   393216
  525.    End
  526.    Begin MSComDlg.CommonDialog cmDlg 
  527.       Left            =   5940
  528.       Top             =   1260
  529.       _ExtentX        =   847
  530.       _ExtentY        =   847
  531.       _Version        =   393216
  532.       Orientation     =   2
  533.    End
  534.    Begin WMPLibCtl.WindowsMediaPlayer WMP 
  535.       Height          =   1215
  536.       Left            =   60
  537.       TabIndex        =   20
  538.       Top             =   8580
  539.       Width           =   5895
  540.       URL             =   ""
  541.       rate            =   1
  542.       balance         =   0
  543.       currentPosition =   0
  544.       defaultFrame    =   ""
  545.       playCount       =   1
  546.       autoStart       =   -1  'True
  547.       currentMarker   =   0
  548.       invokeURLs      =   0   'False
  549.       baseURL         =   ""
  550.       volume          =   50
  551.       mute            =   0   'False
  552.       uiMode          =   "full"
  553.       stretchToFit    =   0   'False
  554.       windowlessVideo =   0   'False
  555.       enabled         =   -1  'True
  556.       enableContextMenu=   -1  'True
  557.       fullScreen      =   0   'False
  558.       SAMIStyle       =   ""
  559.       SAMILang        =   ""
  560.       SAMIFilename    =   ""
  561.       captioningID    =   ""
  562.       enableErrorDialogs=   -1  'True
  563.       _cx             =   10398
  564.       _cy             =   2143
  565.    End
  566.    Begin VB.Label lblCurrTime 
  567.       Alignment       =   2  'Center
  568.       BackColor       =   &H00C0E0FF&
  569.       BorderStyle     =   1  'Fixed Single
  570.       Caption         =   "Current Time here"
  571.       Height          =   300
  572.       Left            =   60
  573.       TabIndex        =   19
  574.       Tag             =   "-1"
  575.       ToolTipText     =   "Well, duhhhhh...."
  576.       Top             =   8280
  577.       Width           =   5880
  578.    End
  579.    Begin VB.Menu mnuFile 
  580.       Caption         =   "&File"
  581.       Begin VB.Menu mnuFileExit 
  582.          Caption         =   "E&xit"
  583.       End
  584.    End
  585.    Begin VB.Menu mnuSR 
  586.       Caption         =   "&Shutdown/Reboot"
  587.       Begin VB.Menu mnuSRS 
  588.          Caption         =   "Shut&down after recordings end"
  589.       End
  590.       Begin VB.Menu mnuSRR 
  591.          Caption         =   "&Reboot after recordings end"
  592.       End
  593.    End
  594. End
  595. Attribute VB_Name = "frmMain"
  596. Attribute VB_GlobalNameSpace = False
  597. Attribute VB_Creatable = False
  598. Attribute VB_PredeclaredId = True
  599. Attribute VB_Exposed = False
  600. Option Explicit
  601.  
  602.   ''''''''''''''''''''''''''''''''''''''''''''''
  603.   ''    Module written by Fernando Aldea G.   ''
  604.   ''    e-mail: fernando_aldea@terra.cl       ''
  605.   ''    Release October, 2004                 ''
  606.   ''                                          ''
  607.   ''    sorry for not comment the code        ''
  608.   ''    & sorry for my English!               ''
  609.   ''                                          ''
  610.   ''    Your English is NO problem.           ''
  611.   ''    Mike Morrow added some comments.      ''
  612.   ''''''''''''''''''''''''''''''''''''''''''''''
  613.   
  614.   Const ReqHeader = "GET $ HTTP/1.0" & vbCrLf & _
  615.                     "Host: %" & vbCrLf & _
  616.                     "User-Agent: WinampMPEG/2.7" & vbCrLf & _
  617.                     "Accept: */*" & vbCrLf & _
  618.                     "Icy-MetaData:1" & vbCrLf & _
  619.                     "Connection: close" & vbCrLf & vbCrLf
  620.                   
  621.   
  622.   Dim IcyReceived As Boolean
  623.   Dim sIcyHeader As String
  624.   
  625.   Dim sData As String
  626.   Dim sMeta As String
  627.   
  628.   Dim DataLen As Long
  629.   Dim MetaLen As Long
  630.   
  631.   Dim nData As Long
  632.   Dim bMeta As Boolean
  633.   
  634.  'Next var is both a switch and a DSECT pointer.  Extra points if you know what a DSECT is!
  635.  'When = 0, no recording is taking place and that is the switch part.
  636.  'When <> 0, recording happening to that file (by number).
  637.   Dim giFile As Integer
  638.   Dim gFileLen As Long
  639.   Dim gsPath As String
  640.   
  641.   Dim dtStartTime As Date
  642.   
  643.   Private bNowRecording As Boolean
  644.   
  645.  'Private Const LOCAL_PORT = 8000
  646.   Private gStartOnTime As Boolean
  647.   Private gbDataComing As Boolean
  648.   
  649.   Private gdtRecordStartTime As Date
  650.   
  651.   Private gsCurrentOutputFile As String
  652.   
  653.   Private giEnablePlayRecording As Long
  654.   Private gbNowPlaying As Boolean
  655.   
  656.   Private gsStationFormat As String
  657. Sub CalculateStartEndTimes(iWhich As Long)
  658.  
  659.   Dim s As String
  660.   Dim dt As Date
  661.   Dim i As Integer
  662.   Dim j As Integer
  663.   
  664.  'This routine calculates dtAutoRecordStart and dtAutoRecordStop.
  665.  'These are the automatic start and stop times for each station stream entry.
  666.  
  667.   If IsDate(gtMemorizedStations(iWhich).StartDate) Then
  668.     gtMemorizedStations(iWhich).dtAutoRecordStart = CDate(gtMemorizedStations(iWhich).StartDate & " " & _
  669.                               gtMemorizedStations(iWhich).StartHour & ":" & gtMemorizedStations(iWhich).StartMin)
  670.   Else
  671.     s = Format(Now, "dddd") & "s"
  672.     If gtMemorizedStations(iWhich).StartDate = s Then  ' This looks dumb but I have to find today before the loop, else I find a week from today.
  673.       dt = Now  ' This looks dumb, too, but I don't want any chance of it changing while I am fetching it 3 times.
  674.       gtMemorizedStations(iWhich).dtAutoRecordStart = CDate(Year(dt) & "/" & Month(dt) & "/" & Day(dt) & " " & _
  675.                           gtMemorizedStations(iWhich).StartHour & ":" & gtMemorizedStations(iWhich).StartMin)
  676.     Else
  677.       dt = Now
  678.       For i = 0 To 5
  679.         j = i + 1
  680.         dt = dt + 1
  681.         If Format(dt, "dddd") & "s" = gtMemorizedStations(iWhich).StartDate Then
  682.           gtMemorizedStations(iWhich).dtAutoRecordStart = CDate(Year(dt) & "/" & Month(dt) & "/" & Day(dt) & " " & _
  683.                               gtMemorizedStations(iWhich).StartHour & ":" & gtMemorizedStations(iWhich).StartMin)
  684.         End If
  685.       Next
  686.     End If
  687.   End If
  688.   
  689.   gtMemorizedStations(iWhich).dtAutoRecordStop = DateAdd("n", gtMemorizedStations(iWhich).Duration, gtMemorizedStations(iWhich).dtAutoRecordStart)
  690.   
  691. End Sub
  692.  
  693. Sub ConnectToServer()
  694.  
  695.   Dim sServer As String
  696.   Dim sPath As String
  697.   Dim sPort As String
  698.   Dim ipos As Integer
  699.   
  700.  'Remove possible http://
  701.   sServer = Replace(txtServer.Text, "http://", "")
  702.   ipos = InStr(1, sServer, ":")
  703.   If ipos = 0 Then
  704.     MsgBox "Port number not found.  Please enter 'ServerIP' field as 'IPaddr/Path:Port' (Note: Path is needed only if required by desured Shotcast server."
  705.     Exit Sub
  706.   End If
  707.   sPort = Mid(sServer, ipos + 1)
  708.   sServer = Left(sServer, ipos - 1)
  709.   
  710.  'split url to get any existent path after a slash
  711.   ipos = InStr(1, sServer, "/")
  712.   If ipos > 0 Then
  713.     sPath = Mid(sServer, ipos)
  714.     sServer = Left(sServer, ipos - 1)
  715.   End If
  716.   
  717.   ipos = InStr(1, sPort, "/")
  718.   If ipos > 0 Then
  719.     sPath = Mid$(sPort, ipos + 1)
  720.     sPort = Left(sPort, ipos - 1)
  721.   End If
  722.   
  723.   If ValidURL(sServer) Then
  724.     Tune sServer, sPort, sPath
  725.   Else
  726.     MsgBox "Reenter the URL or IP Address.  It does not appear to be valid."
  727.   End If
  728.   
  729. End Sub
  730.  
  731. Sub DisconnectFromServer()
  732.  
  733.   wsShoutcastReceiver.Close
  734.   
  735.   lblRadio.Caption = "Disconnected"
  736.   
  737.   StopRecording
  738.   
  739.   cmdStartRecording.Enabled = False  ' Override StopRecording
  740.   cmdDisconnectFromServer.Enabled = False
  741.   
  742. End Sub
  743.  
  744. Sub FindNextToRecord()
  745.       
  746.   Dim i As Integer
  747.   
  748.   For i = 1 To giMemorizedStationsCt
  749.     If gtMemorizedStations(i).StartDate <> "" Then
  750.       CalculateStartEndTimes (i)
  751.     Else
  752.       gtMemorizedStations(i).dtAutoRecordStart = gdtEpoch
  753.       gtMemorizedStations(i).dtAutoRecordStop = gdtEpoch
  754.     End If
  755.   Next
  756.  
  757.  'Now, all of the start times, if any, have been calculated.  See if any station has a record start time >= now.
  758.  'If so, set bSomethingToRecord to True and update main with the information.
  759.  
  760.   giNextToRecord = 0  ' If this is still 0 at the end, there is nothing to record.
  761.   For i = 1 To giMemorizedStationsCt
  762.     If gtMemorizedStations(i).dtAutoRecordStart <= Now() And Now() < gtMemorizedStations(i).dtAutoRecordStop Then
  763.    'We have a winner.  We are in this time (start/stop) window.  Stop now and use what we have
  764.       giNextToRecord = i  ' This is our guy!  Get out and start recording.
  765.       Exit For
  766.     Else  ' Now test for starting and ending some time in the future
  767.       If gtMemorizedStations(i).dtAutoRecordStart <> gdtEpoch And gtMemorizedStations(i).dtAutoRecordStart >= Now() And _
  768.          gtMemorizedStations(i).dtAutoRecordStart < gtMemorizedStations(giNextToRecord).dtAutoRecordStart Then _
  769.          giNextToRecord = i ' Remember sooner start than previously captured and where the rest of the needed information is.
  770.     End If
  771.   Next
  772.   
  773.   If giNextToRecord > 0 Then  ' If there is something to record...
  774.     
  775.     chkRecordAllMemorized.Enabled = True
  776.     chkRecordAllMemorized.Value = vbChecked
  777.     
  778.     optTimedStart.Caption = "Start recording at: " & gtMemorizedStations(giNextToRecord).dtAutoRecordStart
  779.     optTimedStart.Value = vbChecked
  780.     
  781.     optTimedStop.Caption = "Stop recording at: " & gtMemorizedStations(giNextToRecord).dtAutoRecordStop
  782.     optTimedStop.Value = vbChecked
  783.     
  784.     gsStationFormat = gtMemorizedStations(giNextToRecord).Format
  785.     
  786.     If gtMemorizedStations(giNextToRecord).MyFilePrefix <> "" Then
  787.       optSupplyFilename.Caption = USE_FILE_PREFIX & gtMemorizedStations(giNextToRecord).MyFilePrefix
  788.       optSupplyFilename.Value = vbChecked
  789.     End If
  790.     
  791.     
  792.     txtServer = gtMemorizedStations(giNextToRecord).URL
  793.     
  794.     If gtMemorizedStations(giNextToRecord).UseICYSongTitle = vbChecked Then
  795.       chkFileBySong.Value = vbChecked
  796.     Else
  797.       chkFileBySong.Value = vbUnchecked
  798.     End If
  799.     
  800.     lblRadio = "Next recording is stream: " & gtMemorizedStations(giNextToRecord).StationName
  801.     
  802.     cmdConnectToServer.Enabled = False
  803.     chkRecordAllMemorized.Enabled = True
  804.     cmdSelectMemory.Enabled = False
  805.   Else  ' There is nothing to record.  I am mortified!  Why am I here???  I have NOTHING TO DO!!!  I am going home!!  Release me you brute!!!!!!
  806.         '   ...or kindly pick a stream, please.
  807.     chkRecordAllMemorized.Value = vbUnchecked  ' If it is still disabled, uncheck it.
  808.     optTimedStart.Caption = "Start recording at: " & NOT_SET
  809.     optTimedStart.Value = vbUnchecked
  810.     optTimedStop.Caption = "Stop recording at: " & NOT_SET
  811.     optTimedStop.Value = vbUnchecked
  812.         
  813.     txtServer = ""
  814.     
  815.   End If
  816.   
  817. End Sub
  818.  
  819. Sub InitVars()
  820.  
  821.   Dim i As Long
  822.   Dim iFile As Integer
  823.   Dim sWork As String
  824.   Dim iInternalCount As Long
  825.   
  826.   gbIgnoreClicks = True
  827.   gbStopAllFunctions = False
  828.   gbStopContinuousPlay = True  ' Initially, no playing please.
  829.   
  830.   ReDim Preserve sPlayFilesQueue(100)
  831.   ReDim Preserve NewShoutcastStation(0)
  832.   
  833.   iPlayFilesQueue = 0
  834.   
  835.   gsDayNames(0) = WeekdayName(1)
  836.   gsDayNames(1) = WeekdayName(2)
  837.   gsDayNames(2) = WeekdayName(3)
  838.   gsDayNames(3) = WeekdayName(4)
  839.   gsDayNames(4) = WeekdayName(5)
  840.   gsDayNames(5) = WeekdayName(6)
  841.   gsDayNames(6) = WeekdayName(7)
  842.   
  843.   sWMPStates(0) = "Undefined"
  844.   sWMPStates(1) = "Stopped"
  845.   sWMPStates(2) = "Paused"
  846.   sWMPStates(3) = "Playing"
  847.   sWMPStates(4) = "Scan Forward"
  848.   sWMPStates(5) = "Scan Reverse"
  849.   sWMPStates(6) = "Buffering"
  850.   sWMPStates(7) = "Waiting"
  851.   sWMPStates(8) = "Media Ended"
  852.   sWMPStates(9) = "Transitioning"
  853.   sWMPStates(10) = "Ready"
  854.   sWMPStates(11) = "Reconnecting"
  855.  
  856.   giNextToRecord = 0  ' Point to the "immediate" station -- 0.  If manually recording, use the information from array element 0
  857.   giCurrentInBuffer = 0  ' It will be added to before each use.
  858.   
  859.   gdtEpoch = CDate(MyBirth)  ' This will be the comparison, if needed.  May not be needed...
  860.   
  861.   Me.Top = GetSetting(App.EXEName, "Form", "frmMain_Top", 0)
  862.   If Me.Top < 0 Then Me.Top = 0
  863.   If Me.Top + Me.Height > Screen.Height Then Me.Top = Screen.Height - Me.Height
  864.   
  865.   Me.Left = GetSetting(App.EXEName, "Form", "frmMain_Left", 0)
  866.   If Me.Left < 0 Then Me.Left = 0
  867.   If Me.Left + Me.Width > Screen.Width Then Me.Left = Screen.Width - Me.Width
  868.   
  869.   txtServer = GetSetting(App.EXEName, "LastTuned", "IP", "0.0.0.0:8000")
  870.   
  871.   txtOutPath = GetSetting(App.EXEName, "Options", "OutFilePath", "C:\Temp")
  872.   
  873.   chkFileBySong.Value = GetSetting(App.EXEName, "Options", "BySong", vbUnchecked)
  874.   
  875.   optSupplyFilename.Value = GetSetting(App.EXEName, "Options", "UsePrefix", vbUnchecked)
  876.   sWork = GetSetting(App.EXEName, "Options", "TextPrefix", "")
  877.   If sWork = "" Then
  878.     optSupplyFilename.Caption = USE_FILE_PREFIX & NOT_SET
  879.     optSupplyFilename.Value = vbUnchecked
  880.   Else
  881.     optSupplyFilename.Caption = sWork
  882.     optSupplyFilename.Value = vbChecked
  883.   End If
  884.   
  885.   optTimedStart.Value = GetSetting(App.EXEName, "Options", "StartOnTime", vbUnchecked)
  886.   gsStationFormat = GetSetting(App.EXEName, "Options", "StationFormat", "")
  887.   NewShoutcastStation(0).StationName = GetSetting(App.EXEName, "Options", "StationName", "")
  888.   NewShoutcastStation(0).ID = GetSetting(App.EXEName, "Options", "SCID", "")
  889.   
  890.   sliVolume.Value = GetSetting(App.EXEName, "Options", "PlayVolume", 50)
  891.   sliBalance.Value = GetSetting(App.EXEName, "Options", "Balance", 0)
  892.   
  893.   mnuSRR.Checked = GetSetting(App.EXEName, "BootShut", "Reboot", vbUnchecked)
  894.   mnuSRS.Checked = GetSetting(App.EXEName, "BootShut", "Shutdown", vbUnchecked)
  895.   
  896.   bNowRecording = False  ' Initially not recording.
  897.   gStartOnTime = False  ' Timer set and waiting for the time.
  898.   gbDataComing = False  ' Nothing coming in at the moment.  But that is soon to change, we hope.
  899.   
  900.   lblCurrTime = "It is now " & Now
  901.   lblRadio = "Idle state.  Not connected, not waiting to record."
  902.  
  903.  'Now, read all of the saved Memorized Stations into memory array.
  904.   sWork = Dir$(App.Path & "\SavedParms.txt")
  905.   If sWork <> "" Then
  906.     iFile = FreeFile
  907.     Open App.Path & "\SavedParms.txt" For Input Access Read As iFile
  908.     Line Input #iFile, sWork
  909.    
  910.    'OK, so I forgot to put in the file version on the first go around.  I actually thought
  911.    'about it but decided to leave it out.  I thought  "...I won't ever need this..." but
  912.    'WRONG AGAIN, SOFTWARE BREATH!
  913.    'So version 1 parms file will not have a V in the first byte.  All others will.
  914.    'If there is a V, then save it off and read the next line in so the rest of the routine
  915.    'will be in sync.  Otherwise, use what we read in from the first line, it is a V1 file
  916.    'and that first line is the Stations Count.
  917.    
  918.     If Left(sWork, 1) = "V" Then  ' If this is a file version greater than 1, it will have a "V" followed by a number.
  919.       sParmsFileVersion = Val(Mid$(sWork, 2))
  920.       Line Input #iFile, sWork  ' Now read the number of streams in the file to get ready for the loop.
  921.     Else
  922.       sParmsFileVersion = 1  ' If no "V", then this is a version 1 file and won't have the UseICYSongTitle check field in it.
  923.     End If
  924.     giMemorizedStationsCt = Val(sWork)
  925.     
  926.     For i = 1 To giMemorizedStationsCt And Not EOF(iFile)  ' The EOF is a little safety valve for corrupt/incomplete file.
  927.       
  928.       iInternalCount = iInternalCount + 1  ' Count this set.
  929.       
  930.       Line Input #iFile, gtMemorizedStations(i).StationName
  931.       Line Input #iFile, gtMemorizedStations(i).MyFilePrefix
  932.       Line Input #iFile, gtMemorizedStations(i).Format
  933.       Line Input #iFile, gtMemorizedStations(i).ID
  934.       Line Input #iFile, gtMemorizedStations(i).URL
  935.       Line Input #iFile, gtMemorizedStations(i).BitRate
  936.       Line Input #iFile, gtMemorizedStations(i).Genre
  937.       Line Input #iFile, gtMemorizedStations(i).StartDate
  938.       Line Input #iFile, gtMemorizedStations(i).StartHour
  939.       Line Input #iFile, gtMemorizedStations(i).StartMin
  940.       Line Input #iFile, gtMemorizedStations(i).Duration
  941.       If sParmsFileVersion > 1 Then  ' Version 2 file has an extra field per stream in it.
  942.         Line Input #iFile, sWork
  943.         gtMemorizedStations(i).UseICYSongTitle = Val(sWork)
  944.       End If
  945.     
  946.     Next
  947.     Close iFile
  948.     If gbDebugLogic Then Debug.Print MyTime() & "Expecting " & giMemorizedStationsCt & " and read " & iInternalCount & "."
  949.     If giMemorizedStationsCt <> iInternalCount Then _
  950.       MsgBox "The memorized stations file is quite probably corrupted.  Only " & iInternalCount & " of the expected " & giMemorizedStationsCt & " stream sets were found."
  951.       
  952.     gtMemorizedStations(0).dtAutoRecordStart = CDate("12/31/2999 23:59:59")
  953.     gtMemorizedStations(0).MyFilePrefix = optSupplyFilename.Caption
  954.     
  955.     If giForceTimed = F_None Then
  956.       chkRecordAllMemorized.Value = GetSetting(App.EXEName, "Options", "RecordAll", vbUnchecked)  ' Will run FindNextToRecord if needed.
  957.     Else
  958.       If giForceTimed = F_On Then
  959.         chkRecordAllMemorized.Value = vbChecked
  960.       Else
  961.         chkRecordAllMemorized.Value = vbUnchecked
  962.       End If
  963.     End If
  964.   End If
  965.   
  966.   gbIgnoreClicks = False
  967.   
  968. End Sub
  969. Sub StartRecording()
  970.       
  971.   If gbDebugLogic Then Debug.Print MyTime() & "Starting Recording"
  972.  
  973.   If CreateOutFile Then
  974.     cmdStartRecording.Enabled = False
  975.     cmdConnectToServer.Enabled = False
  976.     cmdSelectMemory.Enabled = False
  977.     cmdStopRecording.Enabled = True
  978.     lblStatus.Visible = True
  979.     
  980.     lblTitle.Enabled = True
  981.     lblFile.Enabled = True
  982.     lblBitrate.Enabled = True
  983.     lblSize.Enabled = True
  984.     lblTime.Enabled = True
  985.     
  986.     bNowRecording = True
  987.     gdtRecordStartTime = Now
  988.     
  989.     giEnablePlayRecording = 0  ' After 5 seconds, can enable the play button
  990.     gbNowPlaying = False  ' Just started recording. Can't play yet.  Need some buffer.
  991.     gbNowRecording = True
  992.   Else
  993.     DisconnectFromServer
  994.   End If
  995.  
  996. End Sub
  997.  
  998. Sub StopRecording()
  999.  
  1000.   If gbDebugLogic Then Debug.Print MyTime() & "Stopping Recording"
  1001.   
  1002.   CloseOutFile
  1003.   
  1004.   cmdStartRecording.Enabled = True
  1005.   cmdConnectToServer.Enabled = True
  1006.   cmdSelectMemory.Enabled = True
  1007.   cmdStopRecording.Enabled = False
  1008.   
  1009.   lblStatus.Visible = False  ' Turn off REC "light"
  1010.   
  1011.   lblTitle.Enabled = False
  1012.   lblTitle = "Title: n/a"
  1013.   
  1014.   lblFile.Enabled = False
  1015.   lblFile = "File: n/a"
  1016.   
  1017.   lblBitrate.Enabled = False
  1018.   lblBitrate = "Bitrate: n/a"
  1019.  
  1020.   lblSize.Enabled = False
  1021.   lblSize = "Size: n/a"
  1022.   
  1023.   lblTime.Enabled = False
  1024.   lblTime = "Running time: n/a"
  1025.   
  1026.   bNowRecording = False
  1027.   
  1028.   lblRadio = "Recording stopped at: " & Now
  1029.     
  1030.   If gbStopContinuousPlay Then
  1031.     fraPlayControl.Visible = False
  1032.     lblPlayControl.Visible = False
  1033.     lblPlayControlsComing.Visible = True
  1034.   End If
  1035.   
  1036. End Sub
  1037.  
  1038. Sub StopWaiting()
  1039.  
  1040.   gStartOnTime = False
  1041.  
  1042.   cmdConnectToServer.Enabled = True
  1043.   cmdSelectMemory.Enabled = True
  1044.   
  1045.   lblRadio = "Timed record wait cancelled at " & Now
  1046.   
  1047. End Sub
  1048.  
  1049. Public Sub Tune(ByVal ServerIP As String, ByVal Port As Long, Optional sPath As String)
  1050.   
  1051.   Dim sCompletePath As String
  1052.   
  1053.   IcyReceived = False
  1054.   sIcyHeader = ""
  1055.   sData = ""
  1056.   sMeta = ""
  1057.   DataLen = 0
  1058.   MetaLen = 0
  1059.   nData = 0
  1060.   bMeta = False
  1061.   giFile = 0
  1062.   gFileLen = 0
  1063.   gsPath = IIf(sPath = "", "/", sPath)
  1064.   
  1065.   If sPath <> "" Then ServerIP = ServerIP & "/" & sPath
  1066.   
  1067.   wsShoutcastReceiver.Close
  1068.   wsShoutcastReceiver.Connect ServerIP, Port
  1069.  
  1070. End Sub
  1071.  
  1072. Private Sub chkMutePlayback_Click()
  1073.   
  1074.   If chkMutePlayback.Value = vbChecked Then
  1075.     WMP.settings.mute = True
  1076.   Else
  1077.     WMP.settings.mute = False
  1078.   End If
  1079.   
  1080. End Sub
  1081.  
  1082. Private Sub chkPausePlayback_Click()
  1083.  
  1084.   If chkPausePlayback.Value = vbChecked Then
  1085.     WMP.Controls.pause
  1086.   Else
  1087.     WMP.Controls.play
  1088.   End If
  1089.  
  1090. End Sub
  1091.  
  1092. Private Sub chkPlayStop_Click()
  1093.   
  1094.   If chkPlayStop.Value = vbChecked Then
  1095.     gbStopContinuousPlay = False  ' Allow continuous play
  1096.     StartPlaying
  1097.   Else
  1098.     gbStopContinuousPlay = True  ' No More playing, please.
  1099.     StopPlaying
  1100.   End If
  1101.   
  1102. End Sub
  1103.  
  1104. Private Sub chkRecordAllMemorized_Click()
  1105.  
  1106.   If gbNowRecording Then Exit Sub  ' If I am now recording, the buttons will be handled later by someone else.
  1107.   
  1108.   If chkRecordAllMemorized.Value = vbChecked Then
  1109.     cmdConnectToServer.Enabled = False
  1110.     FindNextToRecord
  1111.   Else
  1112.     cmdConnectToServer.Enabled = True
  1113.     cmdSelectMemory.Enabled = True
  1114.     lblRadio = "Idle state.  Not connected, not waiting to record."
  1115.   End If
  1116.   
  1117. End Sub
  1118.  
  1119. Private Sub cmdBFF_Click()
  1120.  
  1121.   On Error GoTo UserCancelError
  1122.  
  1123.  'set object, i.e., when the geflagamach is engaged, the remflaglation enunsifies the malitunjite and the whole thing gets refalgomized.
  1124.  'Clear now?  If so, you are as sick as I am!  I feel for you...  GET HELP!!!   NOW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  1125.  
  1126.   Set ShBFF = SH.BrowseForFolder(hwnd, "Select Folder for Saving Shoutcast Stream Files.", 1)
  1127.   
  1128.   With ShBFF.Items.Item
  1129.   Debug.Print MyTime() & ShBFF.Items.Item.Name
  1130.  'get folder props
  1131.   
  1132.   If .Path = "" Then
  1133.     txtOutPath = "C:\"
  1134.   Else
  1135.     txtOutPath = .Path
  1136.     On Error GoTo BadOutPath
  1137.     ChDrive Left(txtOutPath, 1)
  1138.     ChDir txtOutPath
  1139.     On Error GoTo 0
  1140.   End If
  1141.   If gbDebugLogic Then _
  1142.     Debug.Print MyTime() & "Name: " & .Name & vbCrLf & "Type: " & .Type & vbCrLf & "Last Modified: " & .ModifyDate & vbCrLf & "Parent: " & .Parent & vbCrLf
  1143.   End With
  1144.   On Error GoTo 0
  1145.   Exit Sub
  1146.   
  1147. BadOutPath:
  1148.   On Error GoTo 0
  1149.   MsgBox "Directory Error TOP1 Cannot find the folder " & txtOutPath & ".  Please change the path or create it."
  1150.   Exit Sub
  1151.  
  1152. UserCancelError:
  1153.   On Error GoTo 0
  1154.   MsgBox "User cancel or filesystem error UCE1.  Path not changed."
  1155.   Exit Sub
  1156.  
  1157. End Sub
  1158.  
  1159. Private Sub cmdConnectToServer_Click()
  1160.   ConnectToServer
  1161. End Sub
  1162.  
  1163. Private Sub cmdDisconnectFromServer_Click()
  1164.   DisconnectFromServer
  1165. End Sub
  1166.  
  1167. Private Sub cmdExit_Click()
  1168.   DoExit
  1169. End Sub
  1170.  
  1171. Sub DoExit()
  1172.  
  1173.   gbStopAllFunctions = True  ' Going home
  1174.   If bNowRecording Then StopRecording
  1175.   WMP.Controls.stop: Wait 50
  1176.   Unload Me
  1177.   
  1178. End Sub
  1179. Sub StartPlaying()
  1180.  
  1181.   Dim i As Integer
  1182.   
  1183.   If gbDebugLogic Then Debug.Print MyTime() & "Trying for: " & gsCurrentOutputFile
  1184.   gbNowPlaying = True  ' Stop the button from being re-enabled.
  1185.   sliVolume.Enabled = True
  1186.   sliBalance.Enabled = True
  1187.   
  1188.  'Play first song.  The rest will be pushed along by WMP.PlayStateChange
  1189.   
  1190.   If gbDebugLogic Then Debug.Print MyTime() & "Playing first song: " & sPlayFilesQueue(0)
  1191.   WMP.URL = sPlayFilesQueue(0): Wait 20
  1192.   WMP.Controls.play: Wait 20
  1193.   
  1194.   If iPlayFilesQueue > 0 Then  ' Obvious maybe but this overlays the file in item 0 and copies all the rest down one toward 0.  File 0 played next.
  1195.     If gbDebugLogic Then Debug.Print MyTime() & "There are " & iPlayFilesQueue & " songs in queue."
  1196.     For i = 0 To iPlayFilesQueue - 1
  1197.       sPlayFilesQueue(i) = sPlayFilesQueue(i + 1)
  1198.       sPlayFilesQueue(i + 1) = ""
  1199.       If gbDebugLogic Then Debug.Print MyTime() & "PlayNextSong: Queue item " & i & ": " & sPlayFilesQueue(i)
  1200.     Next
  1201.     iPlayFilesQueue = iPlayFilesQueue - 1
  1202.   End If
  1203.  
  1204. End Sub
  1205.  
  1206. Private Sub cmdFakeLoad_Click()
  1207.  
  1208.   Dim i As Long
  1209.   Dim j As Long
  1210.   Dim k As Long
  1211.   
  1212.   j = GetTickCount
  1213.   For i = 1 To 100000
  1214.     DoEvents
  1215.     k = GetTickCount
  1216.     If k <> j Then
  1217.       Debug.Print i, j, k
  1218.       j = k
  1219.     End If
  1220.   Next
  1221.   
  1222.   Debug.Print MyTime() & "There are " & iPlayFilesQueue & " songs in queue now.  Adding....."
  1223.   fraPlayControl.Visible = True
  1224.   gbStopContinuousPlay = False
  1225.   
  1226.   sPlayFilesQueue(iPlayFilesQueue) = "C:\Shoutcasts\Ron Grainer - Dr. Who Theme.aac"
  1227.   iPlayFilesQueue = iPlayFilesQueue + 1
  1228.   sPlayFilesQueue(iPlayFilesQueue) = "C:\Shoutcasts\Jwwwthis is.aac"
  1229.   iPlayFilesQueue = iPlayFilesQueue + 1
  1230.   sPlayFilesQueue(iPlayFilesQueue) = "C:\Shoutcasts\Ron Grainer - Dr. Who Theme.aac"
  1231.   iPlayFilesQueue = iPlayFilesQueue + 1
  1232.   sPlayFilesQueue(iPlayFilesQueue) = "C:\Shoutcasts\Jwwwthis is.aac"
  1233.   iPlayFilesQueue = iPlayFilesQueue + 1
  1234.   
  1235.   Debug.Print MyTime() & "There are " & iPlayFilesQueue & " songs in queue now.  Done."
  1236.  
  1237.  End Sub
  1238.  
  1239. Private Sub cmdSelectMemory_Click()
  1240.   
  1241.  'tmrUpdateAll.Enabled = False  ' Waste of CPU time and screws up debugging.
  1242.   
  1243.   optTimedStart.Caption = "Start recording at: " & NOT_SET
  1244.   optTimedStart.Value = vbUnchecked
  1245.   optTimedStop.Caption = "Stop recording at: " & NOT_SET
  1246.   optTimedStop.Value = vbUnchecked
  1247.  
  1248.   frmStationMemory.Show vbModal
  1249.   
  1250.   txtServer = gtMemorizedStations(iFinallyTheStationToTune).URL
  1251.   gsStationFormat = gtMemorizedStations(iFinallyTheStationToTune).Format
  1252.   chkFileBySong.Value = gtMemorizedStations(iFinallyTheStationToTune).UseICYSongTitle
  1253.   
  1254.   If gtMemorizedStations(iFinallyTheStationToTune).MyFilePrefix <> "" Then
  1255.     gtMemorizedStations(iFinallyTheStationToTune).MyFilePrefix = MultiReplace(gtMemorizedStations(iFinallyTheStationToTune).MyFilePrefix, USE_FILE_PREFIX, "")
  1256.     optSupplyFilename.Caption = USE_FILE_PREFIX & gtMemorizedStations(iFinallyTheStationToTune).MyFilePrefix
  1257.     optSupplyFilename.Value = vbChecked
  1258.   End If
  1259.   
  1260.  'tmrUpdateAll.Enabled = True
  1261.  
  1262.   If chkRecordAllMemorized.Value = vbChecked Then FindNextToRecord  ' Only do this if requested.
  1263.  
  1264. End Sub
  1265.  
  1266. Private Sub cmdStartRecording_Click()
  1267.   StartRecording
  1268. End Sub
  1269.  
  1270. Sub StopPlaying()
  1271.  
  1272.   gbNowPlaying = False
  1273.   
  1274.   WMP.Controls.stop
  1275.   
  1276.   sliVolume.Enabled = False
  1277.   sliBalance.Enabled = False
  1278.  
  1279. End Sub
  1280. Private Sub cmdStopRecording_Click()
  1281.   StopRecording
  1282. End Sub
  1283.  
  1284. Private Sub Form_Load()
  1285.     
  1286.   gbDebugLogic = True  ' Controls lots of Debug.Print statements.
  1287.   gbDebugFile = False  ' Controls one more to create/not create the file "Received Data.txt " of received data for debugging.
  1288.   gbDebugBuffer = False  ' Dump ProcessBuffer packets or not.
  1289.   
  1290.   gbIgnoreClicks = True
  1291.   
  1292.   Me.Caption = Me.Caption & " - v" & App.Major & "." & App.Minor & "." & App.Revision
  1293.   
  1294.   gbQuickExit = False
  1295.   ProcessCommands
  1296.   
  1297.   InitVars
  1298.   
  1299.   gbIgnoreClicks = False
  1300.   
  1301.   DO_CtrlOutline Me
  1302.   
  1303.   If gbMinimizeMe And giForceTimed = F_On Then Me.WindowState = vbMinimized
  1304.   
  1305. End Sub
  1306. Sub ProcessCommands()
  1307.  
  1308.   Dim sCommands As String
  1309.   Dim aCommands() As String
  1310.   Dim aSplit() As String
  1311.   Dim i As Integer
  1312.   
  1313.   sCommands = UCase(Command$)
  1314.   aCommands = Split(sCommands, "-")
  1315.   If gbDebugLogic Then Debug.Print "There is " & UBound(aCommands) & " option on the command line."
  1316.   If UBound(aCommands) < 0 Then Exit Sub
  1317.   
  1318.   giForceTimed = F_None  ' Set the default
  1319.   giSavedStationNo = -1  ' An impossible station to tune so is a marker that none has been set.
  1320.   
  1321.   For i = 1 To UBound(aCommands)
  1322.     
  1323.     If gbDebugLogic Then Debug.Print "Parm " & i & ": " & aCommands(i)
  1324.     
  1325.     aSplit = Split(aCommands(i), "=")
  1326.     If gbDebugLogic Then Debug.Print "Found " & UBound(aSplit) & " parm on " & aSplit(0) & " option."
  1327.     
  1328.     If UBound(aSplit) < 1 Then
  1329.       MsgBox "There is an error in the input parms near -" & aSplit(0) & ". No option specified.  Please correct and rerun."
  1330.       gbQuickExit = True
  1331.       Unload Me
  1332.       End
  1333.     End If
  1334.     
  1335.     If UBound(aSplit) > -1 Then
  1336.       If gbDebugLogic Then Debug.Print "Processing option " & aSplit(0)
  1337.     End If
  1338.     
  1339.     Select Case Left(aSplit(0), 1)
  1340.       Case "F"
  1341.         If Left(aSplit(1), 2) = "ON" Then
  1342.           giForceTimed = F_On
  1343.           If gbDebugLogic Then Debug.Print "Set RecordNow"
  1344.         ElseIf Left(aSplit(1), 2) = "OF" Then
  1345.           giForceTimed = F_Off
  1346.           If gbDebugLogic Then Debug.Print "Clear RecordNow"
  1347.         Else
  1348.           MsgBox "Error: Unrecognized option " & aSplit(1) & " on parm ckExit = True
  1349.    
  1350.     FTWARE BREA  optTimedSabIndex        =   13
  1351. YSon = Trueoong.Value = gtzedStationsCt
  1352.  nize    mhen Me.Windowi  60
  1353.  ic Tilse
  1354.     
  1355.  lds
  1356.   
  1357.  Eni  60
  1358.  ic Tim sCommands
  1359.     CCApp.sands
  1360.     CCApp.sands
  1361.     CCAppbork = "" Then
  1362.     optSupplsQueue > 0 T aCom   FTop.sTabIndt
  1363.     optSu vbUnchecked)
  1364.   gsStationFormat = GetSe8dthe remhkFileBtati   optSu
  1365.   iPlayFilesQwi  giNextToRec 2) = "ON" Thend
  1366.   End Ifon solwmdSelectMng = FalseG next.
  1367.     If gbDelayFile    IfFile    If  If gbDencedeBtaO
  1368.   iP.n
  1369.     gtMemons will belSplit(0) & "ectMrintG.   ''
  1370.   '
  1371.   gbNowPlayiFIX, "")
  1372.     optSupf gb DeAwill beete file.()
  1373.   StopRecordingleslm'b DeAwilll.WindPlayFilbE  
  1374.  ldspootrtMngiU time and screws up debuo     B1 B1 B1 B1 B1 B1 B1 B1 B    giForceTimed = FGt = True
  1375.     lbE  
  1376.  lding to0WMP.Controls.gbDelayFile    IfFile    If  If gB/ aCommands() As String
  1377.   Dim aSplit() As String
  1378.   Dim i As Integer
  1379.   intG.   ''3 As Long
  1380.  ringrefix <> "vtations  =  f
  1381.     
  1382.     S=ding
  1383. End Sub
  1384.  
  1385. Sub8"C:
  1386. End Sub
  1387.  
  1388. Sub8g.Prpng.Value = GetSeeOn Error GoTo Bad     pf time and screws up debuo ing
  1389. EnoTo BahD i 
  1390. S.1 B1 BIand sebuog.Value =     ,nd sD i 
  1391.  up de and yyyyyyyyyysOReco.1 B1birtionsCtyyyy"Timethe file versictMrintG.   ''
  1392.   '
  1393.  
  1394.   gbQup ProcessBuffe   =   14
  1395. Te fe &  &  &t for  aS.aacA = GetSe8dthe remhka.
  1396.     '
  1397.   'DFalse  ' Duen     : n/ND &  &t for  aS.aacA = GetSe8dthe remhof re now recordingl
  1398.   'DFalsewill be the compariE  
  1399.  ldsp   Iible = True
  1400.   gbStoctions =orma    Ebect4
  1401. Tehe rions(giNextToRecord) True
  1402.   gbdStatG.   ''3 As Long
  1403.  ringrefix <> "vta' Was' ldsp   Iible tHourath =tationToTune).Foome.Estop
  1404.   
  1405.   sliVoluan00&MIible tHourath =tatiplit(h =tatio0   'a' Wase 0 played next  gbdStatG.   rfFalse
  1406.   lblTitl-nce.Va HeItl-nce  13
  1407. Yh =riz
  1408.  
  1409. Sub StopWaiting
  1410.   lhecke  Ea = "To = F_On.ds(i)-nce  13
  1411. ttiF_On.ds(i)-nce  1HeItl-nce  13
  1412. Yh =rs0, USE_FILE_PREFIX, ".ds(i)-nce  1HeItl-nce  13
  1413. Yh =rs0, USE_F  13
  1414. Yh  = FGt = True
  1415.     lbE  
  1416.  lding tlTiplit(0)
  1417.     End If
  1418.    ysOReco.1 B1birtionsCplit(0)
  1419.     Enlea"Falsebledx
  1420.  iPlayFilesQu0)
  1421.     Enlea"False_On.dsic Then Debug.Print M1)
  1422.  
  1423.  i0)
  1424.     Enlea"FaFilesQu0)
  1425. L ot.
  1426.   
  1427.   gbIgnoreClicks = True
  1428.   
  1429.   Me.Caption = Me.Caption & " - v" & App " - v" & Aks =       !a- v" " 
  1430.  u9ng = True
  1431.   hkMutePlaltt
  1432.     Sns", "UsePrefix", vb(App.EtoRayCount       =$C:\Sho- v" " 
  1433.  u9ng_Ctr Ctr  e rionoAagTitle = Val(ix", vbie
  1434.   
  1435.   cmdStartRecog.  
  1436.  VMsgBox "Error: Unrecognized opBent: " & .Parent & v)
  1437.   W
  1438.     
  1439.     ed
  1440.   ent & v)
  1441.  0nvbiot.
  1442.   
  1443.   gbIg Ifpen Debug.Print R.stop
  1444.   R,ncueue(ToServ)
  1445.     
  1446.     WVa He 
  1447.  iPlann to tunimes(   WVa He 
  1448.  iPlahkFileBySong.VancutTimC    ", 0)
  1449.   If Me.L    '
  1450.   ,fromDrintG.   '(   WVa HR,nit = TrMHourath =ile is sion = sal ServerIP As String, " -
  1451.    Em If Me.
  1452.     
  1453.     ed
  1454.   RowStFGt = True
  1455.     lr  gbDebugFile  'False ed\ar RecrLf ,. be but this ovMyFilePre    _VT73bug.Print "Parm " & i & ": " & aCommands(i)
  1456.     
  1457.    ne).int  "Parm " & i & "    Ee)  ddddddddn  ' This looration
  1458.  ringre    iuEvenmShut", "Srs0, US aSp
  1459.     ed
  1460.   Rt i, j, k
  1461.  
  1462.   
  1463.  is ovMyFilePre  ppStart = gdtEpoch
  1464.       gtMemorizedStatSeeOn Er
  1465.  ut(Port,Pre  seICYSoNamje  13
  1466. Yh =rs0, End I
  1467.  
  1468.  "   r  But t
  1469.    T  gt"   r  But t
  1470.    T  gt"   u$lblTi  dd opt13
  1471. Yh =rs0, USE_F "Enabled = False
  1472.   Else 
  1473. Yh  = F    ed\ar DeAwilui                 iuEvenmShut", "Srs0, US aSp
  1474.     edFFFFWh =tatio0  &  Ea = "T\
  1475.       gtMemorizedfrom sD i 
  1476.  up de and yyyyyyyyypt13
  1477. Yh =rs0      !a- v
  1478.   Me.Caption = Me.Capt "Enabled rem" lonNol' No Me.Caption = Me.Capt "Enabled rem"imeNCapt "Enabled rem" lonNolue =     , = Meoirrena and ylalsebleible tHourath =tationToTunlue = )nNol' No Pre  ppSlsebleible tHourath =tationToTunlue = )nNol' No Pre  ppSlsebl " & i & "   o,ns(iFinallyTheS "Srs0,  txtSt.Ca)nNol' ist starPlayFilesQueue + 1
  1479.  Mriis. = FioadsQueule iFalse
  1480.   
  1481.  w =rs0"ilesQwi d rem" and t",doong.VancutTimClonNoluee
  1482. etgule i gbNo "En"C:\Snex        ate gbNowPlay"ilolume.ErecsQwi =     2yyyyyyyypt13
  1483. Yh =rs0nerecsQ.at "t on the command line."
  1484.   m I.e).UseIbdrecsds
  1485.   
  1486.   InitVar = sd line. in it.
  1487.     End If
  1488.    Tyyyyyyyyprslui           Procesebug.Print     Procmdds
  1489.   
  1490.   InitVar = sd line. in i   Else
  1491.       goTo Rlean
  1492. <>     ProAm.GetSetting(App.EXEName, :.PrintnG.  htoen _
  1493.  ,ule i gbNing(App.EXEName, :.Printnourations(iWhich).dtFalse
  1494.     con > 1e,ule i gbNib2) = "ourath =tl.dtFalse
  1495.     conth =tl.dtF)SupplyFilename.Vo lblFilee,ule in/ND &  &t for  aS.aacA = GetSe8dthea HR,/ND &  &t for  aS.aacA = GetSe8dthsMe.Captow() A8dthe reNppt: " & .Parent & v)
  1496.   W
  1497.     
  1498.     ed
  1499.   ent & v)
  1500.  0nvb
  1501.     EndnToTu = sd lOpenen _SE_Fpp.Moarent & orizedfroT  gt"d = Truy"ilolume.Erec 
  1502. !!!!!!!!!!!ings.mute = Trueebug.Pr!!!!!!!!!!!ings
  1503.  0nvb
  1504.     rm_Load  ed
  1505.   ent & vng(App.E= sA.aacA =ngs.mu "Srs0,  tx         ub chkMutePlayback_Click()
  1506.   
  1507.   If tmmands(e.
  1508.  Truy"ilolut  option."
  1509.     
  1510.     If UBound(aSplit) 
  1511.   
  1512.   If tmmands(e.Unrecognized option " & aSplit(1) & tmmandi"o j = GetTickCGNizedfrom dddddn  ' ThartD3bIf
  1513.   
  1514. Ende1led rem" lonNol1 tmmands(e.
  1515.  Truy"i   'GitVar Tim sCommands
  1516.  cW"(e.
  1517.  Truyeogic"alse
  1518. n
  1519.       Begin VB.Menu mnuFileExit 
  1520.          CapTo 4ueue(ToSesdp deBolean
  1521.   
  1522. eews 
  1523.   lblFile extToReco ternalCount & "."
  1524.     .Enecsd        ate gbNo(e.
  1525.  Truy"i   'GitVar Tim sCommands
  1526.  cW"(ds
  1527.  cW"(ds
  1528.  cW"(1)
  1529. I lblFile extToR rionCount & Truy"rnit = hen FindNextTo:BouCommarra a item " = )name, "F& AksQo2nt NOT_SET
  1530.   optTimed lblFile extToR rionCount & Truy"rn()
  1531.   StaFileoption " & aSplems.GTimed ue anDim aSplata extToR rionCount &uy"rn()
  1532.   StaFileoption " & at &uyeed 
  1533.   NeedxoeIp  ent &pt13it :ion    End If
  1534.     
  1535.     If UBound(aSplit) > -1 TheF pushed alorionCo_SET
  1536.   optTimed lblFiIeyou aggib,
  1537.  = Fio  sle gbN
  1538.     baS.aacA = Get & "Errostl-nce.Va HiGesQueue) = "CutPath= Fio  I am going home!!  Rept13u"oineoineoineoineoineorluee1 sD ie  Else 
  1539. Yh)er, ip!  Rept13u"oWeekdayName(4)
  1540.   gsDayNa filug.Pip!nn()
  1541.   a HR,n 
  1542. imed = F_On
  1543.           If gbDebugLog h= Fi5d."
  1544.  ding
  1545. e.Enabdr = sd nce.Va HiGeVa HiGesQueu edeneoigLog)PathayFilrocmdds
  1546.   
  1547.   InitVarsd nonNogtcas0.  
  1548.  W()
  1549.   a iQ1 )name,,,,,,,,,,,,,,,,t =
  1550.   ggLogicording()
  1551.       
  1552.   If gbD If gbD If gbD If gbD If gbD If gbD ord).dMch
  1553.     
  1554.   If gbD I2   Sns", "UsePrrent oAksQo  Debug.Print+Play3 If gbDebugLog h= FiPrren App.Path & "\Saven A
  1555.   If gbD I2   Sns"g h= FiPrrpRecordin StopPlayingNos + 1)
  1556.   sServer = Left(sSeriFormands(  If UBs<Unchaven A
  1557.  ce(g If gEnabled = TruedMch
  1558.      og)PathayFilrocmdds
  1559.   
  1560.   InitVds
  1561.  cW"(d cW"(d ()
  1562.  
  1563.   Dim i( Falrefix, er
  1564.   
  1565. g.   "SSSSS
  1566.                               sa iQ1 )name,,sgBox "There isommandss(e.
  1567.  Truy"i   'GitVar UBs<Un deid$(sWork, 2))
  1568. eft(sSeriForman)eGitVar UBs<mpmandss(   sPla.3u"oWeekddtAutoRecordStart)
  1569.   
  1570. $de!!  Rept13u"oineoSerih= FiPan)eGitV  iPlayFilesQueuegbNo(e.oRec!!!!looration
  1571.  rinneog atttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttg to re  'GitVar UBs<Un deid$(ssdp deBoletttiP.n
  1572.  Un den dMi &ogLogic Then D ord)refixablePlayRecording = 0  ' UBound(tttttttPnnectFromServer(\Snex nnee.Capt "Enabled rem"imeNCapt "EnablsconNCapt s,W   If p the button from being re-enabled.
  1573.   sliVolume.Enabs
  1574.   pt13it :ion  nt+Pl ow.  Done."
  1575.  
  1576.  End Sub
  1577.  
  1578. Private Sub cmdSF  ' oPan)eGitV.n fro  DoneimeNot+Play3 If gbDebugLog h= e
  1579. Privatevate Sub camei   '(-ork, 2))k, 2))k,ter a nd I If  If legnized option " & aSplit(1) & tmmandi"oVar UBs<Uone Then
  1580.   $(ssdp deBoletttiP.n
  1581.  Un den dMi ng_CD.E= e  ' C 0  ' UMi e
  1582.  op the ng_CD.)
  1583.   de anm gFi 2))Tart n dMi ng_CD.E= e  i ng
  1584.  Un den dMi ng_CD.E= 
  1585.  VMsgBox Ie, "F&   
  1586.     S=layFc!!!!looratiVar UBtiont0nerK).y1 B1TheF pushed al))k,tN deBolettard).dtAutoilesQwi tN cmdExit_Click()ivatev- for  String
  1587.  #ne Inpu 
  1588. !(te(MyBirgTiIFck()   '
  1589.  Xu F_On
  1590.    cW"(d   ' UBound(tttttttPnnectFromServer(\Snex nnee.Capt "Enabled rem"imegeStations(iWhich).StartMin)
  1591.   Else
  1592.   
  1593.     T  gt"ourath =tationT u$ltl-nce.Va Hier.En       If UBound dMi ng_CD.E=" & aSpliieRec!!!!looration
  1594.  rinneog atttttttttttttttyx une).MApp.EXE a sF.aSpli
  1595.   er, ip!  Rept13u"oWeekday lwmdune).M" & aSplit(1)I).M" & aSplitCng.Value = Geund(bbdrecsds
  1596.   
  1597.   InitVar = sd line. iound(ttttmo aSplit(1)I).M"  DeAwilui        ( 0"
  1598.     
  1599.  zed optiP!!!loo Aks =        ( 0"
  1600.     
  1601.  zed o.'I  ( 0"cT   ForB0"
  1602.        ( 0"
  1603.    -1)I).M"wilui   1  
  1604. g)k, 2)tN B0"
  1605.   wiludss(e.
  1606.  u.aSplkday lwmdun"pp.EXENe.
  1607. Unch = "Sttttttnt &pt1tttttttttttttttttttttttttg toiN
  1608.   
  1609. $de!!  Rept13u"oineoSerih= FiPan)eGitV  iPlayFilesQueuegbNo(e.oRec!!iattttttt.oRen " & ived =u
  1610.  iPlann to tunimes(   WVa He 
  1611.  iPlahkMhen  'olue b 'oRes(   WVa Hu =tatiplit(h =tatio0   'a' Wase 0 pltyFitatio,nd(tttttttPnnectPlahk low#s(    WVa Hu =tatiplit(ho   lbE  
  1612. dL
  1613.   m I.e).UseIbdrecsds
  1614.    aS)k, 2y!iatM"  DeAwilui   n No Me.Caption = Me. n No Fio  sle gbN
  1615.     baS.aacA = Get & "ErrosnyyysORecpdrecsds
  1616.    a = de!!  Rept13u"oineoSerihT!iatLE_PRE tHouE_PRE tHouE_PREt)
  1617.   ,ia,on."
  1618. i e
  1619.  op the ng_CD.)
  1620.   de anm gFi 2))Tar "Enable.s the malitutHouE_PmQo  DebnIWS.aack, 2iluPRE= FGng_CD.E= 
  1621.  VMsgN d5), 2icd o.'I  ( 0"cT.pause
  1622.   Else
  1623. R;emorizedStatm attttttonCoAP.n
  1624.  Un wat) > -1 TheF pushed atrsbDebugFile  'False ed\ar Reg-ugFile  'False ed\aFalsGet & "E)
  1625. rsbDebugFile  'False ed\ar Reg-ugFile  'False ed\aFalsGet & "E)WRevebugFile  'False 
  1626.     S=layFc!!!!looratiVar UBtiont0nerK).y1 B1Th.ivatev- m"imegeStations(isalse  'Fawh!!!!looratiVar tre    _VT73bug.Print "Parm " & i & ": " & aComman" & b m"ie.
  1627. rK).yy$F  
  1628. Enable.s the mabugFile  'False 
  1629.     S=layFc!!tre    i =   kday  
  1630.   If gbDebsGeegeStations(isalsthe mab" & _
  1631.       /E)
  1632. rsbcameh).diPrrFawh!!!e.Top
  1633.     u= Me. n(Hh =rs0, End I
  1634.  
  1635.  "   r  But t
  1636.   =spoItiVar tre    1Then.Top
  1637.  h =rsGetAseIbdrecsds
  1638. (kyb
  1639.   d I If e
  1640.  e
  1641.  tev- m"I.eUnchecked
  1642.         
  1643.     txtServer = ""
  1644.     
  1645.    guy!  Get out a\ar R    nd I
  1646.  
  1647.  "   r  But t
  1648.  
  1649.  "   r  BuUnchecFile 2yiN
  1650.   
  1651. $de!!  Rept13u"oineoSerih= FiPan)eGitV  iPlayFendecsds
  1652.    a = de!!  RepF=  CCAdiPl0"cA =  UaSpl  htoen _
  1653.  ,ulend IMe.Capppppp IMe.d
  1654.   ent & v)och
  1655.   ng_s
  1656.   
  1657.   InitVCapppppp IMe.....t13uGetAseIbdrdia EndpnKA =  UaSpl  bding at: " Wluee
  1658. ebNoi cmdStartRecording.Enaded"
  1659.   sWMPStrinoalse ed\aFE gbrecsssds
  1660.   at DisconnectFroror GotVCa vebu.ErecsQwi =    lblStlSpliaSp lblSng_s=uUBound5dia EndpnKA = ag"
  1661.   sWMP Trh).Duration, gtMemorizedStations(iWhich).dtAutoRecordppppp ItVar = .EnableuD#te.  Not con0"
  1662.     
  1663.  zed o.'I  ( 0 "Oplile  'False 
  1664.     S BuUnchecFile 2yiN
  1665.   
  1666. $d!!!lEable.s1  
  1667. YSon =    eItVar =sh   
  1668.  zsD i 
  1669.  up de and yyyyyyyyyysOReco!File exrdine.  /E)
  1670. rF"BudpnKOptions", "StatonN
  1671.  up de and yyyyyyyyyysORetartRecording.EnFnErec,RmA = " & _
  1672.  6 If Ure towe  'False 
  1673.     S FilF"BudpnKOs(iF = " &tsh   
  1674.  zsD1ryyyyek()
  1675.   StartRecese    ( 0"
  1676.     b
  1677.   (rizedStatiatiatiatiatiatlitCng.Value = Geund(bbdrzsD1ryyyyek()
  1678.   StartRecese    ( 0"
  1679.   ant Then   lblRa S Byyyek()
  1680.   ,up de annized opmorizedStationEnecs0litCng.Value = Geund(bbdrzsD1ryyyyek()
  1681.   Staalse g.Enabled = True
  1682.   cmdConnectToServer.Enabled = True
  1683.   cmdSelectMemory.Enabled = dle state.  N= "Pd
  1684.      d = d dle state.  N= "Pd
  1685.      d = d dle state.  N= "P
  1686.  h =rsGetAseIbdrecsds
  1687. (ky abled =  = d p.EXle stutVarsd nonNogtcas0.  
  1688.  W()
  1689.   a iQ1 )name,,,option "  sle gbN
  1690.    d
  1691.   
  1692.     chkRecordAllMem iQ1Mem iQ1Mem iQ1M)WRm iQ1MeOIf ToRecord if needed.Dption "  sle gbN
  1693.  ar UBtiont0nerK).yonFo Data.txt " of p de e 2yiN
  1694. Hording().DnitVC d = d tMemoriy = False
  1695.   
  1696.   sPld & .P
  1697.    Tyyyyyyyys.
  1698.    r(looration
  1699.  rinneog ag()Ie, "F& u
  1700. Hordilick()
  1701.  
  1702.   Dim i As Lon
  1703.     txt if needed.Dption "  slet.Caption  ng_CD.Elet
  1704.   i  txt if needed.Dption "  slet.Caption  ng_CD.Eleft(sPort, ipos Mid$(iound(ttttmo aSplit(.DnitVC     
  1705.  zedI"  DeAwilui       sCommnt MbN
  1706.    d
  1707.   
  1708.     cid$(iound(n "
  1709.   Dim iIjEndnToPrint MyTime(sCommnt MbN
  1710.      End If & .Pat MbN
  1711.    d
  1712.   X "  DeAwam in it.
  1713. "imegeStations(iWhich).Stamo aSpd."yTim
  1714.     ue
  1715.     l DeAwan"pp.EXENe u"i  m
  1716.   rst lieog an.
  1717. "imaed mo aSpd."yTim aSps(iFTheFs(iF.
  1718. "imaao aSpd."
  1719.  "      d
  1720.  pg(App.E-p.E-
  1721.  W()
  1722.  it.
  1723. "imegeStO 'Fa dd opt1odsDayNa fO 'Fa dNe u"i  m
  1724.   rst lStartRe    v rst lStartRe    v rst lStarte.  N="
  1725.  "    Dim i As    lr it(1ileBySn   tx(1ileBySn   tx( gtMem  
  1726.  zt(sWork, 2))
  1727. efarte.  Niw1ileBySch).dtFa  
  1728.  zt(sWoog auy"i   LatiVar 1ilh).dtFa  
  1729.  zt(skyyysOyek()
  1730.   StaalseuallyTheSt0dExitWB.LatiVar 1ilh).
  1731.  " W1-i txt iR gbDatapiatiatihecdan)EuallyTheSt0dzt(skyf  rDptiApp.Minor & "ds
  1732. (ky abled =  Dim j As Long
  1733.   Dim k As Long
  1734.   
  1735.   j = GetTickCount
  1736.   Fory.Show vbModal
  1737.   
  1738.   txtServer = gtMemorizedStNugLoe0dExitWB.LatiVar 1ilh)ebIf t05 = )nNol' No Pre  pp"rizedSUW()
  1739.  it.
  1740. "imeal()
  1741.  t(skyf  rDptiAp
  1742. En. & ".cordecording.EnaAlue (aSpd."yhf  rDptiApp.Minor & "ds
  1743. (ky abled =   sliBalance.s 
  1744.   tker thakCount== FiPan)ekaCo"rizedSUW()a = nLab
  1745.   <Ctr Cer thakCount== FiPan)ekaCo"rizedSUW()a = nLab
  1746.  pp.EXE  iVar<Ctr  LatiVar 1ilh).dtFa  
  1747.  zt(svatevds(e.s LatiVar 1ilh).dtFa  h)ebIf t05 =vr for Saving Shoute.s Laick()ivatev- for  String
  1748. u0tatm atkyyysOyek()
  1749.   StaalseuallyTheSt0dExitWB.LatiVar 1ilh).
  1750.  " W1-i txt iR gbD " W1-i txt iR gbDatapiatiatihecdan)EualimegeSi =spoItiVD.E= mlseuPnnectPlahk low#s(    WVa Hu =tatiplIrE t0a   lb
  1751.         If Left(aSpw comparilah/31/2999 23:59:en Deound(nbug.Print+Plan)Eualime that first line is the Slsen Me.seuallyTheSt0dExiti" &
  1752.   W1-i txe.seuallyThi)
  1753.     geSio.seuaallyThecdan)Eualimrad     pf time and screws up debuo ing
  1754. EnoTo BahD i 
  1755. S.1 B1 BIand sebuog.Value =     ,nd sD i 
  1756.  up de and yyyyyyyyyysOReco.1 B1birtionsCtyyyy"Timethe file versictMrintG.   ''
  1757.   '
  1758.  
  1759.   gbQup ProcessBuffe   =   14
  1760. Te fe &  &  &t for  aS.aacA = GetSe8dUW()a =  "OpversiRwill      f giNextTo aS.aacimrad     pf Bi Bi Bi Bi Htihecdan)EBi Hglekon,_On TBi HtitionsCtgLeft(sSeriFormands(  If UBs<Unchaven fe sCtgWRevebugFile  'FaUBs<rmaa = nLab
  1761.   <CtrxitW vebu.Erec.eded.Dption "  slet.Caption  ng_Co2))F_Oid$(iouyoim iniFormands(  If Ul  bdini.PruallyTheSt0dExiti" &
  1762.   tre  T$Ymed =     F_Oid
  1763.  ii Htfs(  IntG.   ''
  1764.   '
  1765.  
  1766.   gbQup ProceptioonsCt & " stream setsG.   ''
  1767.   ' &  &  &t for  aS.aacA = Gtreant: " & .Pim k oons  cW"& .Pplit& . or  aS.aa & "iuPlayeSt0dExxiti" 
  1768.   r " &,e,iPld = Falsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssd =d I If e
  1769.  e
  1770.  t(isalsthe mab" ssssssss=
  1771.     giE  aS.a() & "NamIX & NOre isomzedsssssss=,IDebugLogopt1oo,sssss(iouyoim iniFormands(  I    E  ckExi & apt13u"fysOyuE_PREt)
  1772.   ,ia,on+ 1
  1773.  led = True
  1774.   cmdConne
  1775.  led = True
  1776.   cmdConne
  1777.  led = Tssssss  "Opvby ab.StartMin
  1778.       Line Input #iFile, gtMe2estl-nce.Va HiGesQuet #i<d yyyyyyput #iFi:ue
  1779.   cmdColoiu"G    Meet. ab.S' C  
  1780.   cmdConne
  1781.  led = True
  1782.   cmdConne
  1783.  ledse SbQueu gI's
  1784.    Tyyyy     Line InBnrivate Subw3at: " & 0 T aCohthe mab" ssssssss=
  1785.     giE 
  1786.     
  1787.  zed optiP!
  1788.   <CtrxitW vsssss=
  1789.     giE XENam&
  1790.   n,,,,,1re  T$Ymed =     F_  =   '     F!!!loora Laick()ivatev- for  String
  1791. u0
  1792.    l|e mab" & _
  1793.   T$Y  La 
  1794.  z&
  1795.   n,,,,,1re re Sbdr = sd plBudpnKptring
  1796.  plBudpnKptring
  1797.  plBudpnKptring
  1798.  plBudpnKptring
  1799.  plBudpng
  1800. u0
  1801.   xttttonCiont0nerK          izedStations(i).Genr
  1802.    d
  1803.   X "  DedStatssssssss(1f Ure towyound:hssss(1f Ure ab" ssssssss=
  1804.     giE  aS.a() & "NamIX 1b" ssssssss=
  1805.     giE  aS.at0nerKp0     iVar 1ssssss=
  1806.  gtMemmab" & _
  1807.   Ty i  tx,giU tisal "  DeAwam in it.
  1808. "im iFile&
  1809.   tre  T$Ymed =     F_Oid
  1810.  ii Htfs(  In TheSNrem" 5M
  1811.   Ex:
  1812.  " W1nne
  1813.  lisOosound:E  aS.at0nerKp0  krKp0     Ai"pp.EXHtfs( t0nli()# Unr  aS.at0neror &i"pp.EXHdivated)
  1814.  sB'oRe9ilesQuewnKpt- dMi ng_CD.
  1815.    a ni.Pra.Top Weekda0liu"G  b B1birtionsCCD.
  1816.    a niReplace(gtMemorizedStyyyse9ilesQusssssssssepf Bi Bi Bi Bi Htihecdan)EBi Hglekon,_On TBi HtitionsCtgLeft(sSeriFormme.Vo lcT.paus UBound(aSpRLatiVayy     Line InBnrivate Subw3at
  1817. L oqBd = 0  0  0  0  0  0  0  0  0  fT0  fT0  iFormme.Vo lcT.paus UBound(aSpRLatiVayy     Lden dM = 0      E  ckBaven A
  1818.  onsCoS(aSpRLatiVayy     Line InBnrplac    End If
  1819.    Tyyyyyyyyprslui           Procesebug.Print     Pro
  1820.   ng hom1s,nd I
  1821.  
  1822.  "   k()e reInBnrplac    End If
  1823.    Tyyyyyyyyprslui       ptiApp.Mi,efe nds   F_  =   '    1t ever nar 1ssssso0_
  1824.  WonsCtgLeft(sSeJ'ons()
  1825.   a i_
  1826.  s5megeM).M" & t   Lden dM F_  =  tisal ssssssssssssssilesQuven A
  1827.  ews ft(sSell bews sssssssssssss   l   ptiApp.Mi,efe nds   F_  =   '    1t ever nar 1ssssso0_s   l fe ndo0_sfe nds   F_  =   '    1t t ever nar 1ssssso0p 
  1828. S.1        Procesebug.Pro      ( 1t ea 1sssssoile,EM'_  =   'Ws=uUBoun.Mi,efe nds   F_  =   ' 
  1829. rFbug.error UCE1. 
  1830.   gbQN913u"Oosound:_On.ndStatG.  i_
  1831.  s5megeM).M" & t   e nds   Fever - 1tartRecording(Setting    
  1832.     ed
  1833.   . 
  1834.   gbQN913u"Oosound:_On.ndSt d
  1835.   . 
  1836.   gbQN91 ii Htfs(  In The3Ok()ioB<itunjit(  In TiNamje  13
  1837. Yh =rs0, End I
  1838. sound:_On.ndSt d
  1839.   . 
  1840.   gbQN91nd yyybd
  1841.  u"Oosound:_Ontd If
  1842.    (
  1843.   gbStopAllFunplay buttonst     Ppg(App.EI
  1844. File  'False 
  1845.     Si Htecitunjit(  dal
  1846.   
  1847.   txtServer = gtMemorizedStNugLoe0dExitT(NBnplay  
  1848.  maao aS Ifsh   
  1849.  zCtgLe  ng hom1s,nd I
  1850.  
  1851.  "   tations(iWhkSjitothayFilrocmdds
  1852.   
  1853. ASjitfT0  fT0  iForrGeund(qe  13Fm1s,nd I
  1854.  
  1855. SjitfT0  fT0  iForrGeund" & ao as'fe &  &  &t for  aS.aa" & 0 T ailh).dtFad(aSplit)emoen
  1856.     o d" & ao a  13Fm1s,nd I
  1857.  
  1858. SjitfT0  fT0  iForrG,,,,,1"(iWhk  aT0  iForrG,,,,,1txxi USE_FIL=,,,,jitfT0  fT  tmt(ho   lbE  
  1859. dL
  1860.   m I.e)d fT0   mokSjpYenk  aT0  iokSjmicks = False
  1861.   
  1862. End Sub
  1863. Sub StartRecording()
  1864.       
  1865.   If gbDebugLogicysOyuE_PREt)
  1866. e Bi Htihecdan)EBi Hglekon,w0   mo(aSpRLati"(   Ai"ppt song.  The rest wogicysOyuE_PREt)nd yyybds   F_  =   '    1  1  1  essssslbE ryyy
  1867. dL
  1868.  >D7ick(ptAseIbds(  Inire-etnd Iff sWoricy:Ymed =  mhka.
  1869.     '
  1870.   casts\Ro7ick(ptAseIbds(  Inire-etnd Iff sWor(d some buffer.
  1871.       
  1872.     tnd t t
  1873.  
  1874.  "   r  BuUnchecFiA = "Ttnd If.
  1875.  A
  1876.  w d."m=(ptAsVMsgBoxMb
  1877.  Inire-etnd Iff sWoricy:YatioaSpRLad Iff sWoricy:YatioaSpRLad Iff sWoricy:ce(gt_
  1878.  Wonsd t t
  1879. ).M"i_Yati= = iPlayFilesQue t
  1880. ).M"i_Yati= = iPlayFilesQue tItl-nce  13
  1881. Yh =rs0,Pl "  DeAwamYati= = iPM,GAseIbds(  Inire-etndim iniForbDebneorluee1 sD ie  El El El Elb0Wsal s.lrivate est downyyyprslTy     Line InBnrplac   txtServer=UBti= = iPlayFi1 sttttttttttttttndim (i)ed\aFE gbrecetTickCount
  1882.   ForEnabled = on "  = = iPM,GAseI:Hst lSt Foreiver.Conneer.ey
  1883. dL
  1884.  >D7i
  1885. e Bi Htt fessBuffesWorinneer.ey
  1886. dL
  1887.  >DeAwamYa El Elb0Wsal s.lrivate es7ick(ptAseIbdsl Sns",Ninneer.ey
  1888. dL
  1889.  >DeAElb0Enecs0li fessB 0  ' U LinoKaComman" & b m"ie.ssssatPlaif    b
  1890.   (rizebbQN913u"rrG(
  1891. dL2Satiatiatiatlie.sVol.Capti in itie.apti in itriFormandsck(ptAs
  1892.     optSu vbi= =manlie.s in itriFormandring
  1893.  plBudpngk  aT0  iForrGIpng
  1894. u0
  1895.   xttttonCiont0nerK     & "iuPlayeSt0dExxiriFormandsck( plBudpngen
  1896.     or SavWhich).Stamoaa E Truy"rnit = hedL
  1897. iatibleg.Print statemeGe  'FvbCrLfiplIrE te.sVol.Capti in itie.apti in itriFormandsck(-i txt fiplIrk(ptAseIyyybs_s   ds LinrE tst0neding.E+Plan)Eualime that     StarseIy.ing(App.EXEName,  thakCount== FiPount== FiPan)eks quey.inpContinm i As Lon dM  thakCountHds   F_isOoseiNa     Line Input #iFile, gtMemorizedStations(i).Format
  1898.       Line Input #i t05nCount & TrO#izeg"morizedSt= hed.G)P(i).Format
  1899.       Line Input #i t05nCount & Tvii t05nCouT"morizedSt= hed.G)P(i)
  1900.    Memd If
  1901.    (
  1902.  h
  1903.   
  1904.      b B1birtionsCCD.pf  (
  1905. (
  1906.  h
  1907.   al s.lrivat
  1908.      b ionsCtgLeft(sSerDptiApXEName, :.Printnourationunt & TrO#izeg"morizedSt= hed.G)P(i).FintnoXEName,   a i_
  1909.  s5mssssgtMemorizedStations(i).St
  1910.       ionunt & TrO#izegre  T$Ymed =    i    1birreft(sUF& rlstreiFormandri
  1911.    Memd If
  1912.    (
  1913. gd Ift)
  1914.   ,ia,on+ giw. b ion Dim i As Lon
  1915.     tx,sntinuoun itriFu=,,,his ovMyFilePre    _VT73bug.Print   SihecriFoGEnabledtspversiRwEnabledtsGEnabledtspversiRw       ( 0"
  1916.   .pf  (as I am!  I fee5megeM).M" & t   Lden dMruy"i_ount & Tviiversg"
  1917.    & aptAsee5megeMtRecording.Enaded"
  1918.   sWMPStrinoalse ed:_OngFileviiversg" TviivF pushed atrsbnLab
  1919.   <Ctr Cerdsck(ptAs
  1920.     optSu vbi= =manlie.s in itriForman(rren AphCalse ed:_OngFileviiversg" TviivF pushed atrYoaSpRLad  gtMeu vbi= =mbount1eviiversutoitrsbnLab
  1921.   <CphCalse ed:_OngFg" TMPStrPrivate Sub cmdStartRec ie  El El El ,ermandrinft(sSell bewgsettings.mAs
  1922.     optioptioptioptioptio( n)eksalse ed:_OngFg"b0iversg" .t #i t05nCip!nnate Sb0Wsal s.lrivao aS IgFg"i"ecs0li fes
  1923.  Un den dMi ns0lim being re-enabled.
  1924.   sliVoptili fb-i 2   Sns", "UsePrrent lLatiVar 1ilS IgFgods  hen xitWBoren ApugLogit== FCtr Cerdsck(ptAs
  1925.   dMi ns0lim bnputbD If FCtr Cerdsck(ptAs
  1926.   dMi ns0lim tnnate Sb0Wsal s.lrivao aS IgFg"i"ecs0li fes
  1927.  Un detion = Me. n No Fion)eksalse0  ' U  S"egeStO 'Fa dd opt1odsDayNa fdut13u"oW Un b sliBalane ao aK   If  Lonh
  1928.   
  1929. ao aKt eae =    ae   S"ep
  1930.     o d" & ao a  13Fm1s,nd I
  1931.  
  1932. SjitfT0  fTSR  .pf  (as I am!  I fee5mIfT0  fTtTo  '
  1933.  Xu P I am!  I fee5mIfT0  fTtTo  '
  1934.  Xu P I am!  I fee5(Fm1s fb-i 2   Sns",2   S" aS.aac)eedtspverp = False
  1935.  
  1936. Eus", 'Clearitu in itrs", 'Ccfp ProcessBufM = 0      E  ckBaven A
  1937.  onsCoS(aSpRLatiVayy     Line InBnrplacS IgFg
  1938.  rimyy   bufdnrpl5mIfT0  fTtTo  '
  1939.  Xu P I am!  I fee5mIfT0  fT i t-etnd T73bug. being re-eFg"b0iversg"m()b0iveruT"mS rFg
  1940.  rimyy   bufdnrpl5mIfT0  fTtTo  'sQussss(yyysOyek()
  1941.  nNT73bug.3u"oW Un b s( nsssss(yyysO,(T>D7i
  1942. e rec.eded.rip.EXle stutiFonnecl5mIfT0  Iyd T73bugiivFU.EXle ersg" TviivF pushed atrsbnLab
  1943.   <Ctr Cerdsck(ptAs
  1944.   rent lLatiVae  E <Ctr3
  1945. Yh =rs0,Pl "sss
  1946.   <Ctr Cerds3bugiivFU.EXle ersgu(u    Debug.Print MyTime() & "Name: " & .NaIsg"LatitTo  '
  1947.  Xu P I am!  I fe sWoricy:n xitW u"oWYh =rs0,PW3bugiivFugioAseIyyybs_s   ds,Isg"LaITime()une).M )n" & Isg"LatDDm+gioAse)
  1948.    lac    hmizeie extToR rionCount & T    
  1949.  zed optiP!
  1950. rbdsl Sns",Ninneer.ey
  1951. dushed atrYoaSpem erro==
  1952. Yh =rs zeden App.eDRtttttame,   a i_
  1953.  s5mssssgtMemorizedStaitW '3As
  1954.   rpf Bi Bnne(tMemor I amRlpme,   a i_
  1955.  - 1ta:_OngFDebnIWSG  b NeedxoeIpprplac   txtSeaSplicfp ProcessBufM = 0 Ierro==
  1956. iForrt-et  atsIWSG   o d" & ao a  1place(tMemor I amRlpme,   a i_
  1957.  - 1ta:_OngFDebnIWSG  b Needxo.>s0,PW3bugiivFugioAscssBum      Sns",2   S" aS.aac)eedtspvesg"1s,nd I
  1958.  
  1959. SjitfT0  fT0  iForrGeund" essBuffe   =   14
  1960. Te e.aptHdsbonsCDdusitrssdnToPr(=rs0,Pl "s$" aS.af  (as1t)
  1961.   ng
  1962. u0
  1963.  mS rFg
  1964.  rimyy   Hen f  (as1t)
  1965. u  fT0  iForr  'E3en f  eedxKm  u  fs"o()   'eue nowedStations(i).Format
  1966. Woricy:n xiOeAgk  aT0"o()   'eue nowedStations(i).Format
  1967. Wo).Format
  1968. Wor a  1place(tMem onsCoS      If mat
  1969. W/plBudpnKptring
  1970. ,PW33333333333333.
  1971. ,PW33333333(-em oopti  <CBuffFormandsck( plBudpngen
  1972.     or SavWhich'm j bugLogiceFs(i(vWhich'm j bugLogiceFs(i((d   u -nc#d_a   'eu30 fog"1s,.ich'm j bugLogiceFs(i(vWhich'm j bu -nc#d_a   'eu30 fog"1s,.ich'm jlPr(=rs0,Pl "s$" aS.af iicy:Ya/ugLos will  tune   Lden dMrrr  'Em
  1973.   
  1974. End Subyypr
  1975.   'DFalse  ' Duen   ItopAles
  1976. eFs(ut t
  1977. o  '
  1978.  Xu P  zeden App.eDRtttns",Nios wilime and screws uoption " & aSnCiont0)os$p" aS.af  
  1979.  tWori,!  I fee5mIfT0  fTtTo  '
  1980.  Xu P I am! bGl   ptiApp.Mi,izedS"    End"f   alse0ivFunGl   ptiApp.Mi,,1s,.ich'm j bugLogiceForinoalseMsg" TviiF
  1981. (
  1982.  h
  1983.   a"f   alsvFunGl   ptiMi,,1s,.ich'm j bugLogiceF h
  1984.   augLogiceF hd atrYoaSpem erntsptAh'm j bugLogiceFs(i( xitW u"oWYh = hd atrYoaSpeitriFor).Format
  1985. Wo).Format
  1986. Wor a  1placs0  0  oiu"G    Meet. ab.S' C  
  1987.   cmdC= hed.G)P(i)
  1988.    Memd If
  1989.    (
  1990.  h
  1991.   
  1992. pp.eDR Debnul.dor myy      If a   'eu30 fog"1s0,Pl "  DeAwatttttttttttttg to re  b cTeu vbi= =Xu P  zeden App.eDRtttns",Nios wilime and screws uoption " & aSnCiont0)os$p" aS.af  
  1993.  tWori,! ick()Debug.Print MyTimerds3bugiivFFIf
  1994.    (
  1995. gsetttgiU phCalse ed:_mc FiPen ApS"    End"f   alse0ivFund"f   0iversg"m()b0iv?Debug.
  1996. gsbug.Pr!!!!!!!!!!   ItopAlessssivFu ns0lim bdMi nWno Fionocmdtiatiatiatiatiat1SE_Fpp.Moarent & orizedfroT  gt"d = Truy"ilolumeWnoruy"iloarent en App.eDRtttnivF pushed ace(t5mssssgn " & aSnCiodfroT I ub
  1997. Sub Stip.eDRttthea HR,/ND &  &t for  aS.aacA = 
  1998.   m I.e)(0 fo5mssce(t5aSnCioAp
  1999. Ent/NDIn imposssssssss(?l"b0ivmnowedStm  gt"aacA UBs<Unchaven fe sCffile"UEltgipEnt/NDIn imposssssssss(?l"b0ivmnowedStm  .af shed atrYBs<U
  2000.   gbQN913u"Ob  sCommn imIn imposssssssss(?l"b0ivmnoweowedSXu P  zeden Appt eveEnd If
  2001. Ie(r  aS.aacA = ivmnoweo)(0 fo5ede(tMemor Iosssssssss(?pKing
  2002.   Dim i As Integer
  2003.   iden no Fionocmdt
  2004.   D ds L no Fiono\ teger
  2005.   ideiden no Fionocmdt
  2006.   D ds Lsa iQ1 )name,,sgBox "Thee5mIfT$tiVae  ErtRecohi,,,,
  2007. W/plBudpnKptring
  2008. ,PW333333333333IfT$eerfT$ti aotion = FiPevaotio,PW33333lding3333
  2009.   oarent
  2010.   at (t eveEn 0   ySnSihecri  &t sssssso Fpt1oQo  De,333
  2011.  eEn 0   ySnSihecyyyyyyyyprslui   ecyyyyceEn 0   ySnSihecyyyyyyyyprslui   ecyyent & o"Thee5mIfTEn 0   yed.G)P ' U LinoKaCo5nCip &t sssssso ip &t ssss33333ldeger  ecy&=usssss)
  2012.     olim be    h yyyyyyprslui   ecyyent & o"Thee5mIfTEn 0   yed.
  2013.     Iosssssssss(?pKing &t ssss3_cyyent & o"Thee5mIfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfTEn IfT