×

UIBOT停车助手源码v2.2及更新日志

luoxianyuan luoxianyuan 发表于2022-02-06 13:47:53 欧宝体育app下载安装475 评论13

13人参与发表评论

用uibot写的停车助手源码,欢迎uibot爱好者帮助与指点


Dim VAR_Message_WXH_ADMIN = "***"  

Dim VAR_Time_Loop_Minute_01 = 14*60*1000  
Dim VAR_Time_Message_Time_01 = 20*1000 
Dim VAR_Time_BigLoop_Delay = 20*60*1000     
Dim VAR_Version = "停车助手V2.2.2"      

Dim VAR_Time_Temp_02 = VAR_Time_Loop_Minute_01/60/1000
Dim VAR_Loop_CS_01 = 1
Dim VAR_JF_CS_01 = 0 
Dim VAR_LC_CS_01 = 0    
Dim VAR_JL_PDSB_CS = 0  

Dim VAR_PD_SF_TTCP = "" 
Dim VAR_PD_SF_KP = ""  
Dim VAR_PD_SF_JF = ""    
Dim VAR_PD_SF_JF_YES = ""    
Dim VAR_PD_SF_JF_NO = ""    
Dim VAR_PD_SF_QF_YES = False   
Dim VAR_PD_SF_QF_NO =  True    
Dim VAR_PD_YWBS_XNY = ""       
Dim VAR_PD_CPWS_TEMP = "" 


Dim VAR_Message_WXH_TEMP = "***" 

Dim VAR_Message_WX_TEMP =""

Dim i = 0

Dim VAR_Loop_CPWS = "1"  
Dim VAR_CP_HM_TEMP = ""  

Dim VAR_DTime_Hour_Temp = ""    
Dim VAR_DTime_Minute_Temp = "" 
Dim VAR_DTime_Second_Temp = ""  
Dim VAR_DTime_Timer_01 = 0  
Dim VAR_DTime_Timer_02 = 0  
Dim VAR_DTime_Timer_02J01 = 0   

DIM VAR_CS_OPEN_GO = 0 
Dim VAR_CS_OPEN_END =0  

Dim ZD_ZB_01={"第一个空格的X坐标":"527","第一个空格的Y坐标":"333", 
"川的X坐标":"563","川的Y坐标":"633",   
"0的X坐标":"866","0的Y坐标":"491",   
"1的X坐标":"503","1的Y坐标":"491",   
"2的X坐标":"543","2的Y坐标":"491",   
"3的X坐标":"582","3的Y坐标":"491",    
"4的X坐标":"625","4的Y坐标":"491",    
"5的X坐标":"663","5的Y坐标":"491",  
"6的X坐标":"704","6的Y坐标":"491",    //6
"7的X坐标":"745","7的Y坐标":"491",    //7
"8的X坐标":"787","8的Y坐标":"491",    //8
"9的X坐标":"825","9的Y坐标":"491",    //9
"A的X坐标":"522","A的Y坐标":"586",    //A  
"B的X坐标":"724","B的Y坐标":"633",    //B  //C
"D的X坐标":"605","D的Y坐标":"586",    //D
"E的X坐标":"584","E的Y坐标":"538",   //E //F 
"G的X坐标":"684","G的Y坐标":"586",   //G
"H的X坐标":"725","H的Y坐标":"584",   ///H //J //K 
"L的X坐标":"842","L的Y坐标":"586",   //L 
"M的X坐标":"808","M的Y坐标":"631",   //M
"N的X坐标":"764","N的Y坐标":"634",    //N   //O //P
"Q的X坐标":"502","Q的Y坐标":"541",   //Q //R
"S的X坐标":"563","S的Y坐标":"584", //S 
"T的X坐标":"664","T的Y坐标":"538",    //T
"U的X坐标":"746","U的Y坐标":"537",    //U //V //W //X //Y //Z
"退格的X坐标":"855","退格的Y坐标":"634",    //DEL
"查询的X坐标":"685","查询的Y坐标":"446"}          //查询


Function FUNC_DJ_AJ_ZB_KG_01() 
    Mouse.Move(CInt(ZD_ZB_01["第一个空格的X坐标"]),CInt(ZD_ZB_01["第一个空格的Y坐标"]), False,{"iDelayAfter":300,"iDelayBefore":200})
    TracePrint(CInt(ZD_ZB_01["第一个空格的X坐标"]),CInt(ZD_ZB_01["第一个空格的Y坐标"]))
    Mouse.Click("left", "click", [],{"iDelayAfter":300,"iDelayBefore":200})
    TracePrint("第一个空格所在位置的坐标:",ZD_ZB_01["第一个空格的X坐标"],ZD_ZB_01["第一个空格的Y坐标"])
End Function
Function FUNC_DJ_AJ_ZB_KG_08() 
    Mouse.Move(CInt(ZD_ZB_01["第八个空格的X坐标"]),CInt(ZD_ZB_01["第八个空格的Y坐标"]), False,{"iDelayAfter":300,"iDelayBefore":200})
    Mouse.Click("left", "click", [],{"iDelayAfter":300,"iDelayBefore":200})
    TracePrint("第八个空格所在位置的坐标:",ZD_ZB_01["第八个空格的X坐标"],ZD_ZB_01["第八个空格的Y坐标"])
End Function
Function FUNC_DJ_CX_ZB()   
    Mouse.Move(CInt(ZD_ZB_01["查询的X坐标"]),CInt(ZD_ZB_01["查询的Y坐标"]), False,{"iDelayAfter":300,"iDelayBefore":200})
    Mouse.Click("left", "click", [],{"iDelayAfter":300,"iDelayBefore":200})
    TracePrint("查询所在位置的坐标:",ZD_ZB_01["查询的X坐标"],ZD_ZB_01["查询的Y坐标"])
End Function
Function FUNC_DJ_TG_ZB()   
    Mouse.Move(CInt(ZD_ZB_01["退格的X坐标"]),CInt(ZD_ZB_01["退格的Y坐标"]), False,{"iDelayAfter":300,"iDelayBefore":200})
    Mouse.Click("left", "click", [],{"iDelayAfter":300,"iDelayBefore":200})
    TracePrint("退格所在位置的坐标:",ZD_ZB_01["退格的X坐标"],ZD_ZB_01["退格的Y坐标"])
End Function



Function FUNC_BACK_DESKTOP()
    TracePrint("返回桌面")
    Keyboard.Press("M", "press", ["Win"],{"iDelayAfter":300,"iDelayBefore":200,"sSimulate":"simulate"})
End Function


Function FUNC_CLOSE_WX() 
    #icon("@res:83qklh4q-1r9c-v4qe-ssia-9ts51d62e5iv.png")
    Mouse.Action({"wnd":[{"app":"WeChat","cls":"WeChatMainWndForPC","title":"微信*"}],"ctrl":[{"role":"ROLE_SYSTEM_CLIENT","name":"微信*"},{"role":"ROLE_SYSTEM_PUSHBUTTON","name":"关闭"}]},"left","click",10000,{"bContinueOnError":False,"iDelayAfter":300,"iDelayBefore":200,"bSetForeground":True,"sCursorPosition":"Center","iCursorOffsetX":0,"iCursorOffsetY":0,"sKeyModifiers":[],"sSimulate":"simulate","bMoveSmoothly":False})
End Function


Function FUNC_OPEN_WX_Message_TEMP()   
    #icon("@res:c5j0jdon-1tp4-h8ca-5hhb-bdfgl6q7hgcv.png")
    Mouse.Action({"wnd":[{"app":"explorer","cls":"Progman","title":"Program Manager"},{"cls":"SHELLDLL_DefView"},{"cls":"SysListView32","title":"FolderView","ctrlid":1,"aaname":"桌面"}],"ctrl":[{"role":"ROLE_SYSTEM_LIST","name":"桌面"},{"role":"ROLE_SYSTEM_LISTITEM","name":"微信"}]},"left","dbclick",10000,{"bContinueOnError":False,"iDelayAfter":300,"iDelayBefore":200,"bSetForeground":True,"sCursorPosition":"Center","iCursorOffsetX":0,"iCursorOffsetY":0,"sKeyModifiers":[],"sSimulate":"simulate","bMoveSmoothly":False})
    #icon("@res:6l74oc0g-9h4e-rmkh-slvn-3b3er4fjk0qm.png")
    Keyboard.InputText({"wnd":[{"app":"WeChat","cls":"WeChatMainWndForPC","title":"微信*"}],"ctrl":[{"role":"ROLE_SYSTEM_CLIENT","name":"微信*"},{"role":"ROLE_SYSTEM_TEXT","name":"搜索"}]},VAR_Message_WXH_TEMP,True,20,10000,{"bContinueOnError":False,"iDelayAfter":1000,"iDelayBefore":500,"bSetForeground":True,"sSimulate":"message","bValidate":False,"bClickBeforeInput":False})
    Keyboard.Press("Enter", "press", [],{"iDelayAfter":300,"iDelayBefore":200,"sSimulate":"simulate"})
    #icon("@res:i9tl2p5t-c6ts-1jtg-8tuh-6lek654rsin7.png")
    Keyboard.InputText({"wnd":[{"app":"WeChat","cls":"WeChatMainWndForPC","title":"微信*"}],"ctrl":[{"role":"ROLE_SYSTEM_CLIENT","name":"微信*"},{"role":"ROLE_SYSTEM_TEXT","name":"输入"}]},"[机器人消息]"&VAR_Message_WX_TEMP,True,20,10000,{"bContinueOnError":False,"iDelayAfter":300,"iDelayBefore":500,"bSetForeground":True,"sSimulate":"message","bValidate":False,"bClickBeforeInput":False})
    Keyboard.Press("Enter", "press", ["Ctrl"],{"iDelayAfter":300,"iDelayBefore":200,"sSimulate":"simulate"})
    FUNC_CLOSE_WX()
End Function



Function FUNC_OPEN_WX_XCX_TC()  
    #icon("@res:tebh7svv-55oq-dnf8-s7dr-nrmg778hcnnk.png")
    Mouse.Action({"wnd":[{"app":"explorer","cls":"Progman","title":"Program Manager"},{"cls":"SHELLDLL_DefView"},{"cls":"SysListView32","title":"FolderView","ctrlid":1,"aaname":"桌面"}],"ctrl":[{"role":"ROLE_SYSTEM_LIST","name":"桌面"},{"role":"ROLE_SYSTEM_LISTITEM","name":"E停管家"}]},"left","dbclick",5000,{"bContinueOnError":False,"iDelayAfter":15000,"iDelayBefore":200,"bSetForeground":True,"sCursorPosition":"Center","iCursorOffsetX":0,"iCursorOffsetY":0,"sKeyModifiers":[],"sSimulate":"simulate","bMoveSmoothly":False})
End Function

Function FUNC_CLOSE_WXXCX_TC()  
    Dim VAR_AN_XCX_CLOSE
VAR_AN_XCX_CLOSE = UiElement.Exists(@ui"按钮_关闭",{"bContinueOnError":false,"iDelayAfter":300,"iDelayBefore":200})
If VAR_AN_XCX_CLOSE = True
    #icon("@res:94nd1drn-r2nb-nv4i-0m96-nqf7tilvtkeq.png")
    Mouse.Action({"wnd":[{"app":"WeChatApp","cls":"Chrome_WidgetWin_0","title":"E停管家"}],"ctrl":[{"role":"ROLE_SYSTEM_PUSHBUTTON","name":"关闭","idx":1}]},"left","click",10000,{"bContinueOnError":False,"iDelayAfter":300,"iDelayBefore":200,"bSetForeground":True,"sCursorPosition":"Center","iCursorOffsetX":0,"iCursorOffsetY":0,"sKeyModifiers":[],"sSimulate":"simulate","bMoveSmoothly":False})
        
End If

End Function

Function FUNC_DJ_CP_temp()   

    FUNC_PD_XCX_CPWS()  
    If VAR_Loop_CPWS = 7-1 And  VAR_PD_CPWS_TEMP = 7-1
        FUNC_DJ_AJ_ZB_KG_01() 

    Elseif VAR_Loop_CPWS = 7-1 And  VAR_PD_CPWS_TEMP = 8-1
        FUNC_DJ_AJ_ZB_KG_08() 
        FUNC_DJ_TG_ZB()  
        FUNC_DJ_AJ_ZB_KG_01() 
    ElseIf VAR_Loop_CPWS = 8-1 And  VAR_PD_CPWS_TEMP = 7-1
        FUNC_DJ_AJ_ZB_KG_08() 
        FUNC_DJ_AJ_ZB_KG_01() 

    ElseIf VAR_Loop_CPWS = 8-1 And  VAR_PD_CPWS_TEMP = 8-1
        FUNC_DJ_AJ_ZB_KG_01() 

    Else 
        TracePrint("判断车牌位数有误")
    
    End If
    
    For I=0 To VAR_Loop_CPWS 
        TracePrint(ARR_CP_TEMP[I])
        Mouse.Move(CINT(ZD_ZB_01[ARR_CP_TEMP[I]&"的X坐标"]), CINT(ZD_ZB_01[ARR_CP_TEMP[I]&"的Y坐标"]), False,{"iDelayAfter":300,"iDelayBefore":200})
        Mouse.Click("left", "click", [],{"iDelayAfter":300,"iDelayBefore":200})
        TracePrint(ARR_CP_TEMP[I]&"所在位置的坐标:",ZD_ZB_01[ARR_CP_TEMP[I]&"的X坐标"], ZD_ZB_01[ARR_CP_TEMP[I]&"的Y坐标"])
    Next
    
    FUNC_DJ_CX_ZB()  
End Function

Function FUNC_Dtime()   
    dTime = Time.Now()
    VAR_DTime_Hour_Temp = Time.Hour(dTime)
    VAR_DTime_Minute_Temp = Time.Minute(dTime)
    VAR_DTime_Second_Temp = Time.Second(dTime)

    TracePrint(VAR_DTime_Hour_Temp)
    TracePrint(VAR_DTime_Minute_Temp )
    TracePrint(VAR_DTime_Second_Temp)

End Function


Function FUNC_PD_XCX_CPWS() 
    VAR_PD_YWBS_XNY = UiElement.Exists(@ui"文字_新能源",{"bContinueOnError":false,"iDelayAfter":300,"iDelayBefore":200})
    If VAR_PD_YWBS_XNY = True 
        TracePrint("非新能源查询")
        VAR_PD_CPWS_TEMP = 7-1
    Else 
        TracePrint("新能源查询")
        VAR_PD_CPWS_TEMP = 8-1
    End If
End Function

Function FUNC_CXJF_01()        
    VAR_Loop_CPWS = 7-1
    VAR_CP_HM_TEMP=ARR_CP_TEMP[0]&ARR_CP_TEMP[1]&ARR_CP_TEMP[2]&ARR_CP_TEMP[3]&ARR_CP_TEMP[4]&ARR_CP_TEMP[5]&ARR_CP_TEMP[6]
    FUNC_BACK_DESKTOP()
    FUNC_OPEN_WX_XCX_TC() 
    FUNC_DJ_CP_temp() 
    FUNC_PD_SF_TTCP()
    FUNC_CLOSE_WXXCX_TC()    
    
End Function
Function FUNC_CXJF_02()         
    
    VAR_Loop_CPWS = 8-1
    VAR_CP_HM_TEMP=ARR_CP_TEMP[0]&ARR_CP_TEMP[1]&ARR_CP_TEMP[2]&ARR_CP_TEMP[3]&ARR_CP_TEMP[4]&ARR_CP_TEMP[5]&ARR_CP_TEMP[6]&ARR_CP_TEMP[7]
    FUNC_BACK_DESKTOP()
    FUNC_OPEN_WX_XCX_TC() 
    FUNC_DJ_AJ_ZB_KG_08() 
    FUNC_DJ_CP_temp() 
    FUNC_PD_SF_TTCP() 
    FUNC_CLOSE_WXXCX_TC()    
    
End Function

Function FUNC_pd_SF_QF()    
    Dim VAR_PD_SF_QF_YES = False
    Dim VAR_PD_SF_QF_NO =  True

    VAR_PD_SF_QF_YES = UiElement.Exists(@ui"文字_立即支付3",{"bContinueOnError":false,"iDelayAfter":300,"iDelayBefore":200})
    VAR_PD_SF_QF_NO = UiElement.Exists(@ui"客户端_确定",{"bContinueOnError":false,"iDelayAfter":300,"iDelayBefore":200})

    If VAR_PD_SF_QF_YES=True 
        VAR_Message_WX_TEMP = VAR_CP_HM_TEMP&":有欠费信息,机器人无法正常为你扫码,请结清欠费。[XX]"
        FUNC_OPEN_WX_Message_TEMP()
        Delay(1000)

    End If

End Function
Function FUNC_PD_SF_TTCP()    

  
    #icon("@res:jqcc56sg-akim-mme0-gvcn-j23agd6ac8qg.png")
    VAR_PD_SF_TTCP = UiElement.Exists({"wnd":[{"app":"WeChatApp","cls":"Chrome_WidgetWin_0","title":"车牌\"*\"查询失败"}],"ctrl":[{"role":"ROLE_SYSTEM_DIALOG","name":"车牌\"*\"查询失败"},{"role":"ROLE_SYSTEM_STATICTEXT","name":"车牌\"*\"查询失败"}]},{"bContinueOnError":False,"iDelayAfter":300,"iDelayBefore":1000})
    TracePrint("是否还未贴停车票:",VAR_PD_SF_TTCP)
    
    #icon("@res:jqcc56sg-akim-mme0-gvcn-j23agd6ac8qg.png")
    VAR_PD_SF_TTCP = UiElement.Exists({"wnd":[{"app":"WeChatApp","cls":"Chrome_WidgetWin_0","title":"车牌\"*\"查询失败"}],"ctrl":[{"role":"ROLE_SYSTEM_DIALOG","name":"车牌\"*\"查询失败"},{"role":"ROLE_SYSTEM_STATICTEXT","name":"车牌\"*\"查询失败"}]},{"bContinueOnError":False,"iDelayAfter":300,"iDelayBefore":1000})
    TracePrint("是否还未贴停车票:",VAR_PD_SF_TTCP)

 

    If VAR_PD_SF_TTCP = True
        TracePrint("还未贴停车票")
        
        #icon("@res:19e4osg0-bhad-7acm-or2e-2cvf3bode96n.png")
        Mouse.Action({"wnd":[{"app":"WeChatApp","cls":"Chrome_WidgetWin_0","title":"车牌\"*\"查询失败"}],"ctrl":[{"role":"ROLE_SYSTEM_DIALOG","name":"车牌\"*\"查询失败"},{"role":"ROLE_SYSTEM_PUSHBUTTON","name":"确定"},{"role":"ROLE_SYSTEM_CLIENT","name":"确定"}]},"left","click",10000,{"bContinueOnError":False,"iDelayAfter":300,"iDelayBefore":200,"bSetForeground":True,"sCursorPosition":"Center","iCursorOffsetX":0,"iCursorOffsetY":0,"sKeyModifiers":[],"sSimulate":"simulate","bMoveSmoothly":False})
    Else
        TracePrint("已经开具停车票")
        FUNC_PD_SF_JF()
    End If
End Function

Function FUNC_PD_SF_JF()  
    
    VAR_PD_SF_JF_YES = UiElement.Exists({"wnd":[{"app":"WeChatApp","cls":"Chrome_WidgetWin_0","title":"E停管家"},{"cls":"XWeb_Chrome_WidgetWin_0"},{"cls":"Chrome_RenderWidgetHostHWND","title":"Chrome Legacy Window"}],"ctrl":[{"role":"ROLE_SYSTEM_PUSHBUTTON","name":"立即缴费"},{"role":"ROLE_SYSTEM_STATICTEXT","name":"立即缴费"}]},{"bContinueOnError":False,"iDelayAfter":300,"iDelayBefore":200})
    #icon("@res:cjjo2hv4-ed08-96g7-7l41-km1q9tl7ajic.png")
    VAR_PD_SF_JF_NO = UiElement.Exists({"wnd":[{"app":"WeChatApp","cls":"Chrome_WidgetWin_0","title":"E停管家"},{"cls":"XWeb_Chrome_WidgetWin_0"},{"cls":"Chrome_RenderWidgetHostHWND","title":"Chrome Legacy Window"}],"ctrl":[{"role":"ROLE_SYSTEM_PUSHBUTTON","name":"我要离场"},{"role":"ROLE_SYSTEM_STATICTEXT","name":"我要离场"}]},{"bContinueOnError":False,"iDelayAfter":300,"iDelayBefore":200})
    
    VAR_PD_SF_QF_YES = UiElement.Exists(@ui"文字_立即支付3",{"bContinueOnError":false,"iDelayAfter":300,"iDelayBefore":200})
    VAR_PD_SF_QF_NO = UiElement.Exists(@ui"客户端_确定",{"bContinueOnError":false,"iDelayAfter":300,"iDelayBefore":200})


    If VAR_PD_SF_JF_NO =True       
        TracePrint("还未计费直接离场")
        VAR_LC_CS_01 = VAR_LC_CS_01+1
        
        #icon("@res:i5lq4fau-hdj7-b4ho-94c6-udlmeoir5uun.png")
        Mouse.Action({"wnd":[{"app":"WeChatApp","cls":"Chrome_WidgetWin_0","title":"E停管家"},{"cls":"XWeb_Chrome_WidgetWin_0"},{"cls":"Chrome_RenderWidgetHostHWND","title":"Chrome Legacy Window"}],"ctrl":[{"role":"ROLE_SYSTEM_PUSHBUTTON","name":"我要离场"},{"role":"ROLE_SYSTEM_STATICTEXT","name":"我要离场"}]},"left","click",10000,{"bContinueOnError":False,"iDelayAfter":300,"iDelayBefore":200,"bSetForeground":True,"sCursorPosition":"Center","iCursorOffsetX":0,"iCursorOffsetY":0,"sKeyModifiers":[],"sSimulate":"simulate","bMoveSmoothly":False})
        #icon("@res:1cko5j8q-altq-ucsr-e88d-4bnijha0g9hk.png")
        Mouse.Action({"wnd":[{"app":"WeChatApp","cls":"Chrome_WidgetWin_0","title":"E停管家"},{"cls":"XWeb_Chrome_WidgetWin_0"},{"cls":"Chrome_RenderWidgetHostHWND","title":"Chrome Legacy Window"}],"ctrl":[{"role":"ROLE_SYSTEM_STATICTEXT","name":"确定出场"}]},"left","click",10000,{"bContinueOnError":False,"iDelayAfter":300,"iDelayBefore":200,"bSetForeground":True,"sCursorPosition":"Center","iCursorOffsetX":0,"iCursorOffsetY":0,"sKeyModifiers":[],"sSimulate":"simulate","bMoveSmoothly":False})
        Mouse.Action(@ui"文字_完成出场","left","click",10000,{"bContinueOnError":False,"iDelayAfter":300,"iDelayBefore":200,"bSetForeground":True,"sCursorPosition":"Center","iCursorOffsetX":0,"iCursorOffsetY":0,"sKeyModifiers":[],"sSimulate":"simulate","bMoveSmoothly":False})
        Mouse.Action(@ui"按钮_关闭","left","click",10000,{"bContinueOnError":False,"iDelayAfter":300,"iDelayBefore":200,"bSetForeground":True,"sCursorPosition":"Center","iCursorOffsetX":0,"iCursorOffsetY":0,"sKeyModifiers":[],"sSimulate":"simulate","bMoveSmoothly":False})
        TracePrint("缴费成功")
        Dialog.Notify("缴费成功", "LXYDE机器人", 1)

        VAR_Message_WX_TEMP = VAR_CP_HM_TEMP&":已被贴停车票,机器人已为您自动扫码离场[V]"
        FUNC_OPEN_WX_Message_TEMP()
        Delay(1000)
        VAR_Message_WXH_TEMP = "落仙苑"
        FUNC_OPEN_WX_Message_TEMP()
            
    ElseIf VAR_PD_SF_JF_YES = True     
        TracePrint("已经计费需要手动缴费")
        VAR_JF_CS_01 = VAR_JF_CS_01+1
        
        Dialog.Notify("已经开始计费", "LXYDE停车助手", 1)
        VAR_Message_WX_TEMP = VAR_CP_HM_TEMP&":收费人员已使用您上次的停车记录开始计费,机器人无法完成扫码操作,需要您手动缴费[X]。"
        FUNC_OPEN_WX_Message_TEMP()
        Delay(1000)
        VAR_Message_WXH_TEMP = "落仙苑"
        FUNC_OPEN_WX_Message_TEMP()

    ElseIf VAR_PD_SF_QF_YES=True   
        VAR_Message_WX_TEMP = VAR_CP_HM_TEMP&":有欠费信息,机器人无法正常为你扫码,请结清欠费。[XX]"
        FUNC_OPEN_WX_Message_TEMP()
        Delay(1000)
       

    Else
        TracePrint("程序可能出错")       
        VAR_Message_WXH_TEMP = VAR_Message_WXH_ADMIN    
        VAR_Message_WX_TEMP = "查询车牌"&VAR_CP_HM_TEMP&"时程序发生错误,请检查程序运行情况。"
        FUNC_OPEN_WX_Message_TEMP()
        VAR_JL_PDSB_CS = VAR_JL_PDSB_CS+1
        
    End If
End Function


VAR_Loop_CS_01 = cint(INI.Read(@res"data\\index.ini", "loop", "LOOP_CS_01", ""))
VAR_LC_CS_01 = cint(INI.Read(@res"data\\index.ini", "loop", "LC_CS_01", ""))
VAR_JF_CS_01 = cint(INI.Read(@res"data\\index.ini", "loop", "JF_CS_01", ""))
VAR_JL_PDSB_CS = cint(INI.Read(@res"data\\index.ini", "loop", "JL_PDSB_CS", ""))


Do While 1=1
    dTime = Time.Now()
    VAR_DTime_Hour_Temp = Time.Hour(dTime)
    VAR_DTime_Minute_Temp = Time.Minute(dTime)
    
    Do While (VAR_DTime_Hour_Temp >=8 And VAR_DTime_Hour_Temp <=19Or (VAR_DTime_Hour_Temp = 20 And    VAR_DTime_Minute_Temp <= 15)
        If VAR_CS_OPEN_GO = 0       
            FUNC_BACK_DESKTOP()
            //-----------------------------------------------------
            VAR_Message_WXH_TEMP = VAR_Message_WXH_ADMIN  
            VAR_Message_WX_TEMP = "BOSS:"&VAR_Version&"已开启巡逻。程序每"&CStr(VAR_Time_Temp_02)&"分钟会执行一次。若按时未收到消息,说明程序出错,需重启。" //微信消息参数-微信内容
            FUNC_OPEN_WX_Message_TEMP()   
            //-------------------------------------------------------
            VAR_CS_OPEN_GO = 1     
        End If  


      
        VAR_DTime_Timer_01 = Time.Timer() 
        TracePrint("第一个时间戳为:",$PrevResult)

        //------------------------------------------------  
        ARR_CP_TEMP = ["川","T","*","*","*","*","*"]
        VAR_Message_WXH_TEMP = "***"
        FUNC_CXJF_01()   
       
        //********************************************************
        VAR_DTime_Timer_02 = Time.Timer()  
            TracePrint("第一个时间戳为:",$PrevResult)
        VAR_DTime_Timer_02J01=VAR_DTime_Timer_02-VAR_DTime_Timer_01 
            TracePrint("时间差为:",$PrevResult)
        VAR_Time_Loop_Minute_DELAY_01 = VAR_Time_Loop_Minute_01 - cint(VAR_DTime_Timer_02J01*1000- VAR_Time_Message_Time_01   //计算下一次循环的延迟时间
            TracePrint("需要延迟时间为:",$PrevResult)
        If VAR_Time_Loop_Minute_DELAY_01 <=0    
            FUNC_BACK_DESKTOP()
            VAR_Message_WXH_TEMP = VAR_Message_WXH_ADMIN    
            VAR_Message_WX_TEMP = "程序延迟时间不足,可能车牌过多,或程序执行时间过长,需要优化程序。"   //微信消息参数-微信内容
            FUNC_OPEN_WX_Message_TEMP()    
        End If
        
   
        VAR_Message_WXH_TEMP = VAR_Message_WXH_ADMIN   
        VAR_Message_WX_TEMP = "停车助手已经成功巡逻"&CStr(VAR_Loop_CS_01)&"次,其中免费离场"&CSTR(VAR_LC_CS_01)&"次;提醒缴费"&CSTR(VAR_JF_CS_01)&"次,判断出错"&CSTR(VAR_JL_PDSB_CS)&"个。程序将在"&CStr(VAR_Time_Temp_02)&"分钟后再次执行。"  //微信消息参数-微信内容
        FUNC_OPEN_WX_Message_TEMP()
        VAR_Loop_CS_01 = VAR_Loop_CS_01+1

       
        INI.Write(@res"data\\index.ini", "loop", "LOOP_CS_01", cstr(VAR_Loop_CS_01))
        INI.Write(@res"data\\index.ini", "loop", "LC_CS_01", cstr(VAR_LC_CS_01))
        INI.Write(@res"data\\index.ini", "loop", "JF_CS_01", cstr(VAR_JF_CS_01))
        INI.Write(@res"data\\index.ini", "loop", "JL_PDSB_CS", cstr(VAR_JL_PDSB_CS))

        
        Delay(VAR_Time_Loop_Minute_DELAY_01)

        dTime = Time.Now()
        VAR_DTime_Hour_Temp = Time.Hour(dTime)
        VAR_DTime_Minute_Temp = Time.Minute(dTime)
      
        
        VAR_CS_OPEN_END =0  
    Loop
    
    TracePrint("开始执行非工作日程序")

    VAR_CS_OPEN_GO = 0  

    If VAR_CS_OPEN_END = 0 
        FUNC_BACK_DESKTOP()

        VAR_Message_WXH_TEMP = VAR_Message_WXH_ADMIN    
        VAR_Message_WX_TEMP = "现在是非工作时间,程序暂停执行" 
        FUNC_OPEN_WX_Message_TEMP()    
      
        VAR_CS_OPEN_END =1
    End If
    
    Delay(VAR_Time_BigLoop_Delay)


Loop


群贤毕至

访客
luoxianyuan luoxianyuan2022-02-06 13:49:21 | 回复 V1.4 优化微信发消息逻辑,添加微信管理员账户,和各车牌车主微信账户。
luoxianyuan luoxianyuan2022-02-06 13:49:35 | 回复 V1.4.xinnengyua您che失败,报错程序终止的问题。添加代码,查找微信小程序关闭的窗口是否存在,如果存在就点击,不存在就不再点击。添加后,没有报相同错误。
luoxianyuan luoxianyuan2022-02-06 13:49:45 | 回复 V1.4.2 修复点击查询车牌后,实际为未贴票状态,但判断为非(贴票、未计费和计费)三种状态而报错的情况。增加未贴票状态的2次判断(即多一次判断)。
luoxianyuan luoxianyuan2022-02-06 13:49:55 | 回复 V1.5 增加代码,在输入车牌之前判断小程序现在是否为查询车牌,免去了每次查询新能源车牌后都需要删除新能源再查询一次。
luoxianyuan luoxianyuan2022-02-06 13:50:01 | 回复 V1.5.1 增加记录判断失败的次数,方便计算成功率。(判断失败是由于uibot本身缺陷)
luoxianyuan luoxianyuan2022-02-06 13:50:09 | 回复 V1.5.3 修改了车主信息的带入方式,不再单独计入变量保存车主信息,而是在录入车牌时一起输入。原因是因为不知道怎么比较数组是否相等。等弄明白后,回修改过来。
V1.5.2 修复错误“流程块.task 第311行:类型错误:'0' 不是数值类型”
luoxianyuan luoxianyuan2022-02-06 13:50:21 | 回复 V1.5.3.1 将经常修改的变量集中在一起,当作程序参数做调整。
luoxianyuan luoxianyuan2022-02-06 13:50:29 | 回复 V1.6 添加时间参数,让程序一直运行不用每日手动开启关闭程序
luoxianyuan luoxianyuan2022-02-06 13:50:40 | 回复 v1.7.1 优化程序自动运行的时间区间
luoxianyuan luoxianyuan2022-02-06 13:50:49 | 回复 v1.7.2 新增计算小循环的时间;新增变量延迟时间;将小循环时间+延迟时间=14分钟;
luoxianyuan luoxianyuan2022-02-06 13:50:57 | 回复 v1.7.3 调整大循环时间为50分钟检查一次,配合优化后的自动运行时间区间,检查获取时间次数
luoxianyuan luoxianyuan2022-02-06 13:51:02 | 回复 v2.0 加入ini文件记录数据
luoxianyuan luoxianyuan2022-02-06 13:51:06 | 回复 V2.2 增加欠费判断