Jump to content

Why its does not work?


Recommended Posts

#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

  • Developers

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...