title: SAP GUI VBScript scripting not running
body: <p>Perhaps someone with experience in SAP GUI and VBScripts can help me.</p>
  
  <p>I am trying to run the following VBScript in SAP GUI</p>
  
  <pre><code>If Not IsObject(application) Then
      Set SapGuiAuto = GetObject("SAPGUI")
      Set application = SapGuiAuto.GetScriptingEngine
  End If
  If Not IsObject(connection) Then
      Set connection= application.Children(0)
  End If
  If Not IsObject(session) Then
      Set session = connection.Children(0)
  End If
  If IsObject(WScript) Then
      WScript.ConnectObject session,"on"
      WScript.ConnectObject application, "on"
  End If
  session.findById("wnd[0]").maximize
  session.findById("wnd[0]/tbar[0]/okcd").text="cv04n"
  session.findById("wnd[0]").sendVkey 0
  </code></pre>
  
  <p>I keep getting the 
  error: The server threw an exception.
  Code: 80010105</p>
  
  <p>This error is in this line: session.findById("wnd[0]").maximize</p>
  
  <p>Can the server block my scripts?</p>
  
  <p>The SAPGUI scripts are enable in the SAP GUI configuration, but when i try to record one it doesn't record and the symbol down in the window always says that script is running but nothing happens and doesn't record anything to the .vbs file.
  When i try to run my script inside the GUI the same happens and it will stay running but nothing happens.</p>
  
  <p>Thank you very much.</p>