【问题标题】:AutoHotKey - MsgBox (Else/If)AutoHotKey - MsgBox (Else/If)
【发布时间】:2014-09-30 07:32:32
【问题描述】:

如果按下示例“是”,我如何在消息框中继续编写脚本?

 ;Print FIA Forside.
 MsgBox, 4, Print Forside?, Vil du printe en forside til denne sending? (press Yes or No
IfMsgBox Yes

 ;Find the shipment in EDI - Open the excel file and print it!
  Click 2206,581
  Click 1435,326
  Send {Ctrl Down}c{Ctrl Up}
  Click 1886,1044


else
    MsgBox You pressed No.

我收到以下错误:

Error: ELSE with no matching IF

【问题讨论】:

    标签: scripting autohotkey


    【解决方案1】:

    您使用花括号来包装您的代码。像这样:

    ;Print FIA Forside.
    MsgBox, 4, Print Forside?, Vil du printe en forside til denne sending? (press Yes or No)
    IfMsgBox Yes
    {
        msgBox, You pressed yes!
        ; Put more code here
    } 
    else 
    {
        msgBox, You pressed no!
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-16
      • 1970-01-01
      • 2020-07-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多