作者cilihuala (嘻哩花拉)
站內EzHotKey
標題[AHK-] 請問如何抓取GUI內edit的值
時間Tue Jun 21 21:11:05 2011
我要執行的一些動作,因為每次變數不一樣
所以想在GUI的每個edit內輸入值,按下button後就將這些值存入各別變數內
當成後續動作所需的參數,可是edit內的值一直無法取出
請問哪邊需要修改,謝謝!
例如:
預設變數vdir = D:\Program Files
當vdir在edit欄位改成C:\Program Files後
跳出的magbox就是已經修改過的vdir
以下為我的程式:
vdir = D:\Program Files
Gui, Add, Edit, x16 y20 w250 h30 , %vdir%
Gui, Add, Button, x16 y60 w100 h30 , OK
Gui, Show, , 資料夾路徑、檔案名稱
return
ButtonOK:
vdir = %vdir%
Msgbox, %vdir%
return
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 122.121.25.223
1F:→ frank38:GuiControlGet, path,,Edit1 MsgBox, %path% 06/22 08:37
2F:推 love228224:謝謝樓上這位大大,你解決了我也有的疑惑! 08/23 20:16