Rem 取得Title的畫面說明
Function Get_title()
SAP_Title = UiElement.GetValue({"wnd":[{"cls":"SAP_FRONTEND_SESSION","title":"*","app":"saplogon"}],"sap":[{"id":"/app/con[0]/ses[0]/wnd[0]/titl"}]},{"bContinueOnError":False,"iDelayAfter":300,"iDelayBefore":200})
return SAP_Title
End Function
Function Confirm_Picture_FrontEnd(picture)
respath=Sys.GetHomePath()&'''\desktop\uibot\res\'''
bRet = Image.Exists({"wnd":[{"cls":"SAP_FRONTEND_SESSION","title":"*","app":"saplogon"}]},{"x":0,"y":0,"width":0,"height":0},respath&picture,0.9,10000,{"bContinueOnError":False,"iDelayAfter":300,"iDelayBefore":200,"bSetForeground":True,"sMatchType":"GrayMatch"})
return bret
end function
Rem 確認圖型
Function Confirm_Picture(picture)
respath=Sys.GetHomePath()&'''\desktop\uibot\res\'''
bRet = Image.Exists({"wnd":[{"cls":"#32770","title":"*","app":"saplogon"}]},{"x":0,"y":0,"width":0,"height":0},respath&picture,0.9,10000,{"bContinueOnError":False,"iDelayAfter":300,"iDelayBefore":200,"bSetForeground":True,"sMatchType":"GrayMatch"})
return bret
end function
Function Confirm_picture_allow(picture)
respath=Sys.GetHomePath()&'''\desktop\uibot\res\'''
bret=Image.Exists({"wnd":[{"cls":"#32770","title":"SAP GUI Security","app":"saplogon"}]},{"x":0,"y":0,"width":0,"height":0},respath&picture,0.9,10000,{"bContinueOnError":False,"iDelayAfter":300,"iDelayBefore":200,"bSetForeground":True,"sMatchType":"GrayMatch"})
return bret
end function
Rem 取得message說明
Function Get_message()
Try
SAP_message = UiElement.GetValue({"wnd":[{"cls":"SAP_FRONTEND_SESSION","title":"*","app":"saplogon"}],"sap":[{"id":"/app/con[0]/ses[0]/wnd[0]/sbar"}]},{"bContinueOnError":False,"iDelayAfter":300,"iDelayBefore":200})
Catch 变量名
End Try
return SAP_message
End Function