Sign in to follow this  
Followers 0
Sparrowlord

Getting File Target

6 posts in this topic

When you right click a shortcut and go to properties there is a line that says "Taget: "

How would I be able to find the target? I look in the help file but I don't know if it is under something different that I don't know about.

Share this post


Link to post
Share on other sites



Look at the FileGetShortcut() function in the helpfile. The example even gives the target you are requesting.

- The Kandie Man ;-)


"So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire

Share this post


Link to post
Share on other sites

If you mean finding control id, class, classname etc of the "target" control. Then use AU3Info, available from the tools drop down menu in SciTE.

Share this post


Link to post
Share on other sites

I was actually talking about getting this:

Posted Image

Share this post


Link to post
Share on other sites

Wow...must be a run on Windows Lnk's today...better get 'ur order in early...

See this...(someone else had a question about links so this is still in clip...talk about lazy... ^_^

http://mediasrv.ns.ac.yu/extra/fileformat/...nk/shortcut.pdf

Looking at that, you can see how to get the specific info your looking for...but as for specifics, I'd defer to someone who has more experiance with IShellLink than I. :)


Good intentions will always be pleaded for every assumption of authority. It is hardly too strong to say that the Constitution was made to guard the people against the dangers of good intentions. There are men in all ages who mean to govern well, but they mean to govern. They promise to be good masters, but they mean to be masters.-Daniel Webster

Share this post


Link to post
Share on other sites

The Kandie Man was right, as per the AutoIt help files examples slightly modified

FileCreateShortcut(@WindowsDir & "\Explorer.exe",@DesktopDir & "\Shortcut Test.lnk",@WindowsDir,"/e,c:\", "This is an Explorer link;-)", @SystemDir & "\shell32.dll", "^!t", "15", @SW_MINIMIZE)

; Read in the path of a shortcut
$array = FileGetShortcut(@DesktopDir & "\Shortcut Test.lnk")

$j = ""
$j &= "Shortcut target path: " & $array[0] & @CRLF
$j &= "Working directory: " & $array[1] & @CRLF
$j &= "Arguments: " & $array[2] & @CRLF
$j &= "Description: " & $array[3] & @CRLF
$j &= "Icon filename: " & $array[4] & @CRLF
$j &= "Icon index: " & $array[5] & @CRLF
$j &= "The shortcut state: " & $array[6] & @CRLF & @CRLF
$j &= "Target = " & $array[0] & " " & $array[2]

MsgBox(0, "Path:", $j)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0