I don't want the path name to show.
Selecting the item in listbox will display the text contained in the file in the box below.
Save will save any edits in the text box to the same filename file.
Entering a new filename will save as new file with whatever text is in text box.
The Ok will be a function like copy the text contained to clipboard then send to an app with paste.
If it had an ini to remember last folder would be good if not too much of a problem.
Any help would be much appreciated.
Something like this code but with text edit box below:
https://autohotkey.com/board/topic/6766-loading-listbox-with-file-names/
Code: Select all
;To cancel, press ESCAPE or close this window.
Gui, Add, ListBox, vListBox_pdf x16 y10 w370 h125,
Gui, Add, ListBox, vListBox_ini x16 y145 w370 h125,
Gui, Add, Button, Default, OK
;----------------------------- Start Fill Listboxs
Loop, C:\temp\*.pdf
{
GuiControl,, ListBox_pdf, %A_LoopFileFullPath%
}
Loop, C:\*.ini
{
GuiControl,, ListBox_ini, %A_LoopFileFullPath%
}
Gui, Show
return
;----------------------------- End Fill Listboxs
;------------------------------Start OK Button
ButtonOK:
GuiControlGet, ListBox_pdf ; Retrieve pdf selection.
GuiControlGet, ListBox_ini ; Retrieve ini selection.
MsgBox, 4,, Open Current Selections:`n`n%ListBox_pdf% & `n%ListBox_ini%
IfMsgBox, No
return
; ---(Example of how to handle the logic in a Yes/No Msgbox)
; Run, %ListBox_pdf%,, UseErrorLevel
; Run, %ListBox_ini%,, UseErrorLevel
; if ErrorLevel = ERROR
; MsgBox Could not launch the specified file.
; return
;----------------------------- End OK Button
GuiClose:
GuiEscape:
ExitApp