aiuse Posted July 15, 2013 Share Posted July 15, 2013 Hi How do I use customized icon in the following example. I have an icon file call Wexplorer.ico and I believe I just need to replace it with the "^!t". I have the script and icon file in the same folder but the icon does not change. Please help. Thanks ; Create a shortcut on the desktop to explorer.exe and set the hotkey combination Ctrl+Alt+T or in AutoIt ^!t.FileCreateShortcut(@WindowsDir & "explorer.exe", @DesktopDir & "Shortcut Example.lnk", @WindowsDir, "/e,c:", "Tooltip description of the shortcut.", @SystemDir & "shell32.dll", "^!t", "15", @SW_MINIMIZE); Retrieve the details of the shortcut.Local $aDetails = FileGetShortcut(@DesktopDir & "Shortcut Example.lnk")If Not @error Then MsgBox(0, "FileGetShortcut", "Path: " & $aDetails[0] & @CRLF & _ "Working directory: " & $aDetails[1] & @CRLF & _ "Arguments: " & $aDetails[2] & @CRLF & _ "Description: " & $aDetails[3] & @CRLF & _ "Icon filename: " & $aDetails[4] & @CRLF & _ "Icon index: " & $aDetails[5] & @CRLF & _ "Shortcut state: " & $aDetails[6] & @CRLF)EndIf Link to comment Share on other sites More sharing options...
0xdefea7 Posted July 15, 2013 Share Posted July 15, 2013 (edited) The function is used like this for custom icon: FileCreateShortcut(@WindowsDir & "\explorer.exe", @DesktopDir & "\Shortcut Example.lnk", @WindowsDir, "/e,c:\", "Tooltip description of the shortcut.", "PATH TO YOUR ICON HERE", "^!t") Edited July 15, 2013 by 0xdefea7 Link to comment Share on other sites More sharing options...
aiuse Posted July 15, 2013 Author Share Posted July 15, 2013 I added #AutoIt3Wrapper_Icon=Wexplorer.ico and also replaced Wexplorer.ico with ^!t. Everything is in the same folder but still not working though. Thanks Link to comment Share on other sites More sharing options...
0xdefea7 Posted July 15, 2013 Share Posted July 15, 2013 (edited) Look in the post I made, and copy the line of code. Paste it in your editor. Replace the part that says "PATH TO YOUR ICON HERE" with the full path to your icon. So if your icon is "C:Wexplorer.ico" then it would look like this: FileCreateShortcut(@WindowsDir & "\explorer.exe", @DesktopDir & "\Shortcut Example.lnk", @WindowsDir, "/e,c:\", "Tooltip description of the shortcut.", "C:\Wexplorer.ico", "^!t") Edited July 15, 2013 by 0xdefea7 Link to comment Share on other sites More sharing options...
aiuse Posted July 17, 2013 Author Share Posted July 17, 2013 Thanks I tried with full path and now it is working! Link to comment Share on other sites More sharing options...
0xdefea7 Posted July 17, 2013 Share Posted July 17, 2013 Glad you got it working 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