https://www.dropbox.com/s/noqf9sgr8llnm ... e.JPG?dl=0
i want to be able to select a file and have the 'n/a' be replaced by the filename. must be having a brain f**t because i can't seem to get it working. can someone show me what i'm doing wrong?
Code: Select all
Link = n/a
Gui, Add, Button, gLink, File_Link
Gui, Add, Text,, %Link%
Gui, Show, w150 h220, QuickAdd ; was 190
GuiControl,, %Link%, %Link%
return
Link:
msgbox, %Link%
repl .= "%20"
FileSelectFile, Link
msgbox, %Link%
IfInString, Link, %A_Space%
{
StringReplace, newlink, Link, %A_Space%, %repl%, All
}
else
{
msgbox, %newlink%
newlink = %Link%
}
msgbox, %Link%
return
exitapp