【问题标题】:Autohotkey - Saving an input field as a variable and pulling the valueAutohotkey - 将输入字段保存为变量并提取值
【发布时间】:2022-10-14 13:15:00
【问题描述】:

本质上,我有一个应用程序可以循环创建多个输入字段,用户可以在其中输入数字。我需要一个循环,因为有时根据情况会有 10-15 个输入字段。

我循环和创建它们没有问题,但是我无法将它们保存到一个变量中,因此它们可以在循环之外访问。

我希望它们可访问的原因,以便我可以提取输入字段的值。每当我尝试提取数据时,它都会返回空白/无数据。

我有很强的面向对象编程技能,但我对自动热键脚本很陌生,想知道是否有解决这种情况的方法。

感谢您在此提供任何建议或帮助,谢谢!

【问题讨论】:

    标签: variables autohotkey input-field


    【解决方案1】:

    您可以只使用视觉 gui

        Gui, Add, Text,, Please Enter First Input:
        Gui, Add, Text,, Please Enter Second Input
        Gui, Add, Text,, Please Enter Third Input:
        Gui, Add, Edit, v1 ym, Enter Text Here
        Gui, Add, Edit, v2, Enter Text Here
        Gui, Add, Edit, v3, Enter Text Here
        Gui, Add, Button, default, OK
        Gui, Show,, GUI for %A_UserName%
        return
        ButtonOK:
        Gui, Submit
        MsgBox,48,Values:,First: %1%`nSecond: %2%`nThird: %3%
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-04-21
      • 2023-03-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多