更新文件夹路径 - AutoHotKey

Updating Folder Path - AutoHotKey

我正在尝试弄清楚如何更新路径,但我不确定该怎么做,而且我不断收到一些错误。

我需要更新显示在 EV 输出上的示例输出。任何帮助都会很棒。

如图所示,输出示例正在更新选定的输入文件夹。我需要它是 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

这是我的 EV 代码

OutputEV:
FileSelectFolder,OutputEV,, 3, Select EV Output Directory For Logs
if OutputEV =
   {
   MsgBox, You didn't select a log folder. Try again!
   return
   }
else
Guicontrol,1:,DisplayEV,%OutputEV%

    return

我尝试添加类似 Guicontrol,1:,DisplayOutPutEV,%DisplayOutPutEV% 的内容,但出现错误。我只需要样本输出来匹配 EV 输出,但我无法弄清楚。

任何帮助都会很棒。

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

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%