NELyon Posted July 31, 2006 Share Posted July 31, 2006 #include <GUIConstants.au3> ; == GUI generated with Koda == $Form1 = GUICreate("AForm1", 622, 441, 192, 125) $List1 = GUICtrlCreateList("", 16, 16, 193, 396, -1, $WS_EX_CLIENTEDGE) $Button1 = GUICtrlCreateButton("Add", 264, 40, 137, 25) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 GUICtrlSetData($List1,FileGetShortName(FileOpenDialog("Select a file to open",@ScriptDir, "All Files (*.*)"))) EndSelect WEnd Exit Is there a way to only display the file name, and not the whole file in the list? I used FileGetShortName, but it's still too long. Thanks, Codemyster Link to comment Share on other sites More sharing options...
evilertoaster Posted July 31, 2006 Share Posted July 31, 2006 Use StringInStr to find the position of the last "\" and then stringmid everything after it. Link to comment Share on other sites More sharing options...
/dev/null Posted July 31, 2006 Share Posted July 31, 2006 Is there a way to only display the file name, and not the whole file in the list? I used FileGetShortName, but it's still too long. Thanks,use _PathSplit().CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now