Jump to content

Add file ending to array elements?


Recommended Posts

Ok brief synopsis

i have 2 arrays and i want to make it just one to simplify things

but one deals with reg keys by name and the other deals with shortcuts by name & file ext

It wont matter if the array elements are added to make one array

they are processed by different commands obviously

this is for the links

Global $aPathKeys[36] = [35, "Acer VCM", "Adobe Gamma Loader", etc]

Global $path = @StartupDir & ""
For $g = 1 To $aPathKeys[0]
  If FileExists($path & $aPathKeys[$g]) Then
   FileDelete($path & $aPathKeys[$g])
   Sleep(100)
  EndIf
Next

if i merge the arrays this set will need to have .lnk added to the elements however many there are

Is it possible?

eg

Acer VCM

becomes

Acer VCM.lnk within the array

Edited by Chimaera
Link to comment
Share on other sites

Perhaps I misunderstood this. Is there any reason why you can't use simple concatenation?

#include <Array.au3>
Local $aArray[9] = ["1","2","3","4","5","6","7","8","9"]

For $i = 0 To UBound($aArray) -1
    $aArray[$i] &= ".lnk"
Next
_ArrayDisplay($aArray)
Edited by czardas
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...