title: write a batch script to press "tab" and "Enter" key
body: <p>I need to press "TAB" and "Enter" key using either a batch script or VB script.</p>
  
  <p>OK, I'm writing the vb file in notepad. I run it by double clicking icon testVB.vbs in C:. 
  This is what I have:
  testVB.vbs</p>
  
  <pre><code>Set WshShell = CreateObject("WScript.Shell")
  WshShell.Run "test.bat"
  WScript.Sleep 1000 
  WshShell.SendKeys (TAB) //to tab from the cancel button to open button
  WScript.Sleep 1000
  WshShell.SendKeys "~"  //clicks open button
  </code></pre>
  
  <p>test.bat</p>
  
  <pre><code>@ECHO OFF
  START  MSAccess "C:\path\file.mdb"
  </code></pre>
  
  <p>I want to open Access and the DB, but a pop up window appears which is what I'm trying to get around. After I figure that out I will need to figure out how to write code to import a .txt file to the DB.</p>
  
  <p>The TAB is what is not working, I have tried {TAB}, "TAB", (TAB), and different combos. I get an error with the first one and the others have no action. The enter works though ("~").</p>