GodlessSinner Posted April 24, 2009 Share Posted April 24, 2009 #Include <File.au3> #Include <Array.au3> $FileList=_FileListToArray(@StartupCommonDir) For $i = 1 To $FileList[0] Step 1 $link = FileGetShortcut(@StartupCommonDir & "\" & $FileList[$i]) FileWriteLine(@ScriptDir & "\info.txt", $FileList[$i] & "=" & $link[0] & @CRLF) Next If @Error=1 Then MsgBox (0,"","No Files\Folders Found.") Exit EndIf --------- Script write to "info.txt" only first 2 items and then in console I see: C:\Documents and Settings\Vitaliy\??????? ????\AutoIt v3 Script (4).au3 (7) : ==> Subscript used with non-Array variable.: FileWriteLine(@ScriptDir & "\info.txt", $FileList[$i] & "=" & $link[0] & @CRLF) FileWriteLine(@ScriptDir & "\info.txt", $FileList[$i] & "=" & $link^ ERROR _____________________________________________________________________________ Link to comment Share on other sites More sharing options...
Developers Jos Posted April 24, 2009 Developers Share Posted April 24, 2009 Test the @error returned by FileGetShortcut() to ensure it was able to retrieve information. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
GodlessSinner Posted April 24, 2009 Author Share Posted April 24, 2009 Thanks. Fixed. The topic can be closed. _____________________________________________________________________________ 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