fuldho 发表于 2011-10-8 16:19:44

怎样编写出现错误提示而返回

怎样编写出现错误提示而返回不继续执行

If GUICtrlRead($x) = 1 Then
          If $xx = "" Then
             MsgBox(64, "错误", "xx不存在")
                  EndIf
            EndIf
            If GUICtrlRead($y) = 1 Then
                If $yy = "" Then
                   MsgBox(64, "错误", "yy不存在")
                EndIf
            EndIf
      RunWait(xx)
      RunWait(yy)

yeqing880 发表于 2011-10-8 16:33:53

While1
if check() = 1 then exitloop
wend
      RunWait(xx)
      RunWait(yy)

func check()
If GUICtrlRead($x) = 1 Then
          If $xx = "" Then
             MsgBox(64, "错误", "xx不存在")
            return -1
                  EndIf
            EndIf
            If GUICtrlRead($y) = 1 Then
                If $yy = "" Then
                   MsgBox(64, "错误", "yy不存在")
                  return -1
                EndIf
            EndIf
return 1
endfunc

yeqing880 发表于 2011-10-8 16:35:39

想问下。你判断的XX和YY是控件的值还是只是一个应用程序的运行情况

fuldho 发表于 2011-10-9 13:35:48

控件   路径

netegg 发表于 2011-10-9 14:32:40

返回到什么地方还是直接退出

魔导 发表于 2011-10-14 17:20:40

好东西 顶{:1_498:}
页: [1]
查看完整版本: 怎样编写出现错误提示而返回