title: VBScript to call JavaScript
body: <p>Going out on a limb here. Is there a way for a Photoshop VBScript to call a JavaScript file?</p>
  
  <p>Or at least pass some user input (variable or return from function) from one script to another.</p>
  
  <p>My reason for this? I've been having similar issues asked in this <a href="https://stackoverflow.com/questions/41877179/dialog-box-does-not-have-a-constructor">question</a> and considered a VBScript UI to drive a photoshop-script. Re-writing the existing jsx into VBS isn't really an option.</p>
  
  <p>Here's what I have. This simple VBScript asks for the user to type in their name which is then created as text in the second script. </p>
  
  <p><strong>VBScript</strong></p>
  
  <pre><code>' Ask User for input
  Dim appRef
  Set appRef = CreateObject( "Photoshop.Application" )
  
  Dim askName : askName = InputBox("Enter name: ")
  </code></pre>
  
  <p><strong>JavaScript</strong>  </p>
  
  <pre><code>// create a document to work with
  var docRef = app.documents.add(200, 100, 72, "Hello");
  
  // Create a new art layer containing text
  var artLayerRef = docRef.artLayers.add();
  artLayerRef.kind = LayerKind.TEXT;
  
  // Set the contents of the text layer.
  var textItemRef = artLayerRef.textItem
  textItemRef.contents = "Hello " + askName
  </code></pre>
  
  <p>What do I need to connect the two up?</p>