Scripting 正在更新文件夹路径-自动热键

Scripting 正在更新文件夹路径-自动热键,scripting,autohotkey,Scripting,Autohotkey,我试图找出如何更新路径,但我不确定如何更新,并且不断出现一些错误 我需要更新EV输出上显示的样本输出。任何帮助都会很好 正如您在图像输出示例中看到的,正在更新选定的输入文件夹。我需要它是在电动汽车输出的信息 这是我的菜单代码 ;; MENU ; Left Side Menu Gui, Add, Button, x7 y7 w110 h30 gInput, Select Input Folder Gui, Add, Checkbox, x7 y47 w730 h20 checked vCheck

我试图找出如何更新路径,但我不确定如何更新,并且不断出现一些错误

我需要更新EV输出上显示的样本输出。任何帮助都会很好

正如您在图像输出示例中看到的,正在更新选定的输入文件夹。我需要它是在电动汽车输出的信息

这是我的菜单代码

;; MENU 
; Left Side Menu
Gui, Add, Button, x7 y7 w110 h30 gInput, Select Input Folder
Gui, Add, Checkbox, x7 y47 w730 h20 checked vCheck1,Include the last folder of the input folder in  the output?
Gui, Add, Text, x22 y82 w600 h20 , Output Sample:
Gui, Add, Text, x132 y82 w610 h20 vDisplayPath, %DisplayPath%  ;--Line needs to match EV Output
Gui, Add, Button, x12 y122 w110 h30 gOutputEV, Select EV Output
Gui, Add, Button, x12 y162 w110 h30 gOutputWC, Select WC Output
Gui, Add, Text, x127 y17 w275 h20 vDisplayInput, ;display selected folder - input
Gui, Add, Text, x132 y132 w250 h20 vDisplayEV, ;display selected folder -ev  <--- Selected to update Display Path
Gui, Add, Text, x132 y172 w250 h20 vDisplayWC, ;display selected folder - wc
Gui, Add, Text, x12 y215 w190 h20 , Last Name, First Name: ; Name Field
Gui, Add, Edit, x171 y215 w170 h30 vName, DoeJohn     ; Editable Name Type
Gui, Add, Text, x12 y250 w190 h30 , Collection Date (YYYYMMDD):
Gui, Add, Edit, x171 y250 w100 h30 r1 vtime,%TimeString%
Gui, Add, Button, x12 y280 w110 h30 gSubmit, Submit
; Right Side Menu
Gui, Add, Text, x757 y7 w130 h20 , Helpful Buttons:
Gui, Add, Button, x757 y77 w160 h30 gOpenTC, List Mounted TrueCrypt Devices
Gui, Add, Button, x757 y37 w160 h30 gMountTC, Auto-Mount TC Devices
Gui, Add, Button, x757 y217 w160 h30 gDismountTC, Dismount ALL TC Devices
; Version Info
Gui, Show, w936 h350, Mobile Robocopy Script v2.5,NoHide
GUI, Add, Picture, x550 y270 w350 h60, %MyPic%
Return
我尝试添加Guicontrol、1:、DisplayOutPutEV、%DisplayOutPutEV%等,但出现了错误。我只需要样本输出匹配电动汽车的输出,我不能弄清楚


任何帮助都会很好

乍一看,您的问题似乎在于这一行

Guicontrol,1:,DisplayEV,%OutputEV%
您已经构建了没有标识符的GUI,但是您正在尝试与GUI 1上不存在的控件对话。删除GUI标识符

GuiControl,, DisplayEV, %OutputEV%
在GUI中,为控件提供不同的变量

Gui, Add, Text, x22 y82 w600 h20 vlblOutputSample, Output Sample:
Gui, Add, Text, x132 y82 w610 h20 vDisplayPath, %DisplayPath%
然后,在您的子例程中,只需将两个控件的文本设置为OutputEV变量

GuiControl,, DisplayEV, %OutputEV%
GuiControl,, lblOutputSample, %OutputEV%

每当我再次添加vDisplayEV时,它都会显示错误:同一变量不能用于多个控件。那么,我可以添加到您修复的GUI控件、DisplayOutPutEV、%DisplayOutPutEV%的新行下,并将其添加到vDisplayPath、%DisplayPath%所在的位置吗?我删除了除OutputEV之外的所有g标签,运行了代码,选择了一个文件夹,它出现在按钮旁边的文本中。所以,它起作用了。你的错误是由其他原因引起的。重复错误是由于多个控件具有相同的变量声明。仔细检查你的密码,我明白。它确实有效。我想说的是,我希望样本输出与电动汽车输出相同。所以在两个地方展示。因此,就像在示例图片中一样,我希望输出示例:显示与EV输出相同的内容。我在答案中添加了这些内容。@fischgeek我也不认为进行向下投票的原因。但在大多数情况下,向下投票是常见的。
GuiControl,, DisplayEV, %OutputEV%
GuiControl,, lblOutputSample, %OutputEV%