【发布时间】:2018-11-16 12:42:29
【问题描述】:
所以...我已经有一段时间了,但肯定还是很糟糕。
总结一下:
我想在单击某些 gui 中的特定选项后开始循环的下一次迭代。
在我的研究中,我发现循环中不能有任何回报。问题是我不知道如何在没有回报的情况下完成这项工作。
请帮忙!
谢谢,
马克·S
(修剪!)
` 起始线:= 5
Loop, 10
{
CurrentRow := (StartLine - 1) + A_Index ;*****
;----------------***GETTING THE DATA***----------------
ControlFocus,, Proto_Names - Excel
Sleep, 200
oNamesDoc := ComObjActive("Excel.Application")
Global AlertStatus := oNamesDoc.Range("C" CurrentRow).Text
Global AlertQualifier := oNamesDoc.Range("D" CurrentRow).text
Global First := oNamesDoc.Range("H" CurrentRow).text
Global Last := oNamesDoc.Range("I" CurrentRow).text
Global State := oNamesDoc.Range("J" CurrentRow).text
Global Type := oNamesDoc.Range("M" CurrentRow).text
Global HMSStatus := oNamesDoc.Range("P" CurrentRow).text
Global HMSQualifier := oNamesDoc.Range("Q" CurrentRow).text
Global LicenseNo := oNamesDoc.Range("N" CurrentRow).text
Global Scrubbed := oNamesDoc.Range("AB" CurrentRow).value
;----------------***GETTING THE DATA***----------------
;Gui
Gui, 2:Add, Text,x1 y8, Blah Blah
Gui, 2:Add, Button, x1 y40, License
Gui, 2:Add, Button, x80 y40, Name
Gui, 2:Show, , blah blah - Row %CurrentRow% ; Important because it references A_Index
return
2GuiClose:
Gui, 2:Destroy
return
2ButtonLicense:
Gui, 2:Submit
Gui, 2:Destroy
;Another GUI
Gui, 3:Add, Text,x1 y8, Text
Gui, 3:Add, Text,x170 y132, Row %CurrentRow% ;Important because it references A_index
Gui, 3:Add, Button,x1 y125 , blah
Gui, 3:Show, , blah blah
return
3GuiClose:
Gui, 3:Destroy
return
3ButtonAgree:
Gui, 3:Submit
Gui, 3:Destroy
MsgBox, Click OK for Next
continue
}
`
进一步总结:
目标: 循环以下内容: 1. Gui #1:选项a |选项 b 也想显示 A_Index
如果选择了选项 A 或 B,则转到 Gui #2
- GUI #2:选项 c |选项 d 也想显示 A_Index
如果选项 c,从 gui 1 开始循环的下一次迭代。
如果选项 d,转到 Gui #3
- 界面 #3:复选框 E|F|G|H
如果选择了任何选项,我想更新一个 xslx 文件(我可以弄清楚该部分),然后开始循环的下一次迭代。
【问题讨论】:
-
嗨,欢迎来到 Stack Overlfow!尝试将代码墙缩减为简短、易于阅读的 sn-p,以说明您的意思。这可能会让你的问题更清楚。
-
DanM7 - 感谢您的欢迎。我把它修好了。
标签: loops user-interface autohotkey