I have been using Kix for some time, though I have not done a tremendous amount of coding with it, I thought that it was about time I started looking at optimising the code I was creating. Now being a greenhorn and certainly not a programmer/scripter I was wondering how best to do this.
Should I be using an array, DO - UNTIL or WHILE - LOOP commands, or is there another method which is better suited to the task at hand.

Here is an example of the code at hand, all it does is check for the existence of some shortcuts within a folder on the client desktop & if they don't exist create them using the WSHshortcut UDF from the UDF's board which works perfectly fine.
Code:

$dfl = "%userprofile%\desktop\Company Procedures Manuals"
$tgl1 = "\\server_name\Procedures_Forms"
$tgl2 = "\\server_name\public"

If Exist ("$dfl\Environmental Procedures") = 0
$=wshShortcut("$dfl\Environmental Procedures","$tgl1\Environmental Procedures\current")
EndIf
If Exist ("$dfl\Health & Safety Procedures") = 0
$=wshShortcut("$dfl\Health & Safety Procedures","$tgl1\Health & Safety Procedures")
EndIf
If Exist ("$dfl\Company Form Control I INDEX.xls") = 0
$=wshShortcut("$dfl\Company Form Control I INDEX.xls","$tgl1\Company Forms & Manuals\Company Form Control I Index.xls")
EndIf
If Exist ("$dfl\Quality Manual") = 0
$=wshShortcut("$dfl\Quality Manual","$tgl1\QA Procedures Manual\TS Quality Manual")
EndIf
If Exist ("$dfl\Quality Procedures") = 0
$=wshShortcut("$dfl\Quality Procedures","$tgl1\QA Procedures Manual\Procedures Manual")
EndIf
If Exist ("$dfl\Concession Log") = 0
$=wshShortcut("$dfl\Concession Log","$tgl2\Concession Log\Concession Log.xls")
EndIf
If Exist ("$dfl\SOP Register") = 0
$=wshShortcut("$dfl\SOP Register","$tgl2\SOP Folder\SOP Register.xls")
EndIf

If InGroup("Quality","Quality Concerns_gbl","Quality RO")
If Exist ("$dfl\Customer Concerns Register.lnk") = 0 ;File NOT found, creating shortcut
$=wshShortcut("$dfl\Customer Concerns Register","\\eltnts04\Quality\Concerns\CUSTOMER CONCERNS")
EndIf
Else
If Exist ("$dfl\Customer Concerns Register.lnk") = 1 ;User not member of group, delete File if exists
DEL "$dfl\Customer Concerns Register.lnk" /c
EndIf
EndIf



If I need to create and use an array, how the hell do I create it and pass variables/commands into a circulary process until all the shortcuts are created if they don't exist