Sign in to follow this  
Followers 0
Chimaera

Add file ending to array elements?

4 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Missing the obvious is something I also have experience in. ;) Glad I could help.

Edited by czardas

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