How to get gui edit box value from a drap and drop ui

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
takayo97
Posts: 63
Joined: 09 Jun 2018, 16:30

How to get gui edit box value from a drap and drop ui

31 Dec 2019, 17:47

Here is a sample code of demonstrate drag and drop edit box ui. The code I was found somewhere in the forum

Code: Select all

Gui, Add, Edit, x5 y108 w358 h24 vMyEdit, 
Gui, Add, Button, x68 y137 w54 h24 , OK
Gui, Add, Button, x247 y137 w54 h24 , Cancel
Gui, Add, Text, x5 y5 w358 h98 , What is your file name?
; Generated using SmartGUI Creator 4.0
Gui, Show, x652 y408 h168 w370, GuiTitle
Return

GuiClose:
msgbox % MyEdit
ExitApp

GuiDropFiles:
 GuiControl,, MyEdit, %A_GuiEvent% ;This will only work properly if one file is dropped on the GUI. To handle several files being dropped, see help file on GuiDropFiles.
return
I tried to display the MyEdit value before existing the app. The value was shown just blank even i was dragged a file in the field
User avatar
flyingDman
Posts: 2817
Joined: 29 Sep 2013, 19:01

Re: How to get gui edit box value from a drap and drop ui

31 Dec 2019, 18:37

either:

Code: Select all

ControlGetText,MyEdit,Edit1,A
msgbox % MyEdit
or

Code: Select all

gui, submit, nohide
msgbox % MyEdit
14.3 & 1.3.7

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: ArkuS, Google [Bot], mikeyww and 331 guests