fatalvn Posted June 3, 2010 Share Posted June 3, 2010 I got a problem here, can you guys help me out? I got 1 app, example: D\study\english.exe, and its shortcut: D:\eng.lnk Every time I use FileOpenDialog to choose eng.lnk, and use guictrlsetdata to get its path to input1, the result always be: D\study\english.exe Is there a way to get only shortcut path D:\eng.lnk to input1? because i will use shellexecute later Link to comment Share on other sites More sharing options...
BitByteBit Posted June 3, 2010 Share Posted June 3, 2010 (edited) Look in the helpfile for:FileGetShortcut() Edited June 3, 2010 by BitByteBit Link to comment Share on other sites More sharing options...
fatalvn Posted June 4, 2010 Author Share Posted June 4, 2010 Got that, I used the wrong file extension thank you bbb GUICreate("My GUI Button") $Button3 = GUICtrlCreateButton("path", 10, 80,100) $input1 = GUICtrlCreateInput("path", 10,120,250) GUISetState(@SW_SHOW) While 1 $nmsg = GUIGetMsg() Select Case $nmsg = $GUI_EVENT_CLOSE ExitLoop Case $nmsg = $Button3 path() EndSelect WEnd Func path() local $Folder = "@WorkingDir" $file = FileOpenDialog("Load Setting", $Folder, "Shortcut (*.lnk)", 1 + 2, "") if @error Then GUICtrlSetData($input1,"You haven't select yet") Else GUICtrlSetData($input1,$file) EndIf EndFunc 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