NO IMAGE

If Wscript.Arguments.Count = 1 Then
 
 Dim i_pernr
 i_pernr = Wscript.Arguments(0)
 
 WScript.Echo i_pernr
 
     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 = “/nzhrphoto”
     session.findById(“wnd[0]”).sendVKey 0
     session.findById(“wnd[0]/usr/ctxtP_PERNR”).text = i_pernr
     session.findById(“wnd[0]/usr/ctxtP_PERNR”).caretPosition = 0
     session.findById(“wnd[0]/tbar[1]/btn[8]”).press
     session.findById(“wnd[0]/usr/lbl[0,2]”).setFocus
     session.findById(“wnd[0]/usr/lbl[0,2]”).caretPosition = 0
    
     Dim msg01
    
     msg01 = session.findById(“wnd[0]/sbar”).text
    
     If msg01 = “OK”  Then
      WScript.Quit 1
     End if
    
     If msg01 = “!” Then
      WScript.Quit 0
     End If
  Else
         Rem 沒有輸入引數
         WScript.Quit 2
End If