title: UDT in VBScript: "Error: Expected identifier"
body: <p>I'm used to ClassicVB/VB.Net but not VBScript, and I'm getting an error when calling the script below from an application:</p>
  
  <pre><code># $language = "VBScript"
  # $interface = "1.0"
  
  'Microsoft VBScript compilation error
  'Error: Expected identifier
  Public Type MyType
      Caption As String
      Dir As String
  End Type
  
  Sub Main
      'Whatever
  End Sub
  </code></pre>
  
  <p>I've googled for samples, but didn't find what's wrong with the above.</p>
  
  <p>Thank you.</p>
  
  <hr>
  
  <p>Edit: Problem solved by using a hash/dictionary instead:</p>
  
  <pre><code>Set hash = CreateObject ("Scripting.Dictionary")
  
  hash.add "MyDir", "cd /usr/src/mydir"
  hash.add "Linux", "cd /usr/src/linux"
  
  keys = hash.Keys
  for index = 0 to hash.Count - 1
      Set tab = crt.session.ConnectInTab("/s 192.168.0.3")
      tab.Caption = Keys(index)
      Set tabscreen = tab.Screen
      tabscreen.Send hash.item(Keys(index)) &amp; vbcr
  Next
  </code></pre>