From /help $sdir:
$sdir(dir,title)Displays the select folder dialog and returns the selected folder. Title is optional.
From that, it would seem logical that you could probably use /run $$sdir(%varname, Message goes here), like this:
on *:DIALOG:dname:sclick:EditID: run $$sdir(%varname, Folder: %varname)
The problem is that an edit control does not react to :sclick: or :dclick:, so you'll have to give it a button to kick it off.
alias bergle dialog -m bergle bergle
dialog bergle {
option dbu
size -1 -1 100 100
title Testing editbox sclick event
edit "" , 1, 5 5 90 13
button "Open", 2, 40 80 20 15, ok
}
on *:DIALOG:bergle:*:*:{
var %varname = $getdir(jpg)
if $devent != mouse echo -s * Event: $devent for ID: $did
if $devent == init did -a $dname 1 %varname
if $devent == sclick && $did == 2 run $sdir(%varname, Pick your poison $+ $chr(3) pardner)
}
You can use this sample code to show how clicking like a fiend in the editbox generates no events, then click on the Open button and see how everything works from there. (I filtered out the mouse event to keep you from going insane; however, be aware that anytime you move your mouse over the dialog, a mouse event is generated...LOTS of them.)