While 1
If WinExists("成交提示","") Then
WinGetText("成交提示","") ;检测到成交提示窗口
$text1 = WinGetText("成交提示","") ;获得"成交提示"文本
;$text= StringReplace($text1,"确定","") ;以上为替换弹出信使服务的字符串内容为中文
ClipPut($text1)
;MsgBox(0, "获得的文本:", $text)
Sleep(2000)
send("!.") ;打开2008版飞信
Sleep(1000)
WinActive("Fetion 2008 ","")
Sleep(2000)
send("!A") ;打开飞信菜单
Sleep(1000)
Send("+{TAB 8}")
Sleep(1000)
send("{ENTER}")
Sleep(1000)
Send("+{TAB 5}")
Sleep(2000)
send("{ENTER}")
Sleep(2000)
;ControlClick("群发短信","", "WindowsForms10.EDIT.app.0.297b0651", "left", 1, 225, 50) ;激活短信文字输入窗口
;ControlSetText("群发短信","", "WindowsForms10.EDIT.app.0.297b0651", $text) ;填写短信内容
send("^v")
Sleep(2000)
send("{ENTER}") ;按回车发送
Sleep(2000)
WinActivate("成交提示","")
Sleep(2000)
$kejian=ControlCommand ( "成交提示", "", 2084, "IsVisible" )
If $kejian=1 Then
ControlClick ( "成交提示", "", 2084)
Sleep(2000)
WinGetText("成交提示","") ;检测到成交提示窗口
$text1 = WinGetText("成交提示","") ;获得"成交提示"文本
;$text= StringReplace($text1,"确定","") ;以上为替换弹出信使服务的字符串内容为中文
ClipPut($text1)
;MsgBox(0, "获得的文本:", $text)
Sleep(2000)
send("!.") ;打开2008版飞信
Sleep(1000)
WinActive("Fetion 2008 ","")
Sleep(2000)
send("!A") ;打开飞信菜单
Sleep(1000)
Send("+{TAB 8}")
Sleep(1000)
send("{ENTER}")
Sleep(1000)
Send("+{TAB 5}")
Sleep(2000)
send("{ENTER}")
Sleep(2000)
;ControlClick("群发短信","", "WindowsForms10.EDIT.app.0.297b0651", "left", 1, 225, 50) ;激活短信文字输入窗口
;ControlSetText("群发短信","", "WindowsForms10.EDIT.app.0.297b0651", $text) ;填写短信内容
send("^v")
Sleep(2000)
send("{ENTER}") ;按回车发送
Sleep(2000)
WinActivate("成交提示","")
Sleep(2000)
ControlClick ( "成交提示", "", 2084)
Else
ControlClick ( "成交提示", "", 2088)
EndIf
Endif
Wend ;循环检测
这是我写的,循环有个问题。请高手修改一下。我希望每一条用飞信给我手机发短信,发完点确定退出。 |