Hello Community,
I use AutoIT quite a while now and somehow I seem to be mentally blocked![:ermm:]()
I am facing the following problem:
I have 2 script files:
"Func PaketInstaller($InstSprache, $LogFileHandle, $Software, $Pfad, $WinVersion, $Architektur)"
From the script in test1 I want to call the function which is defined in test2.
The big problem which I am confronted with is transmitting the array "$Software" successfully without getting an array fault with the following code:
When I call my function I always get the following error:
"Error Subscript used with non-Array variable"
Can somebody please help me how to use / define a function in AutoIT with an array as a parameter!?
Somehow I am not that experienced with Basic but with other languages I would have solved it easily but here I am totally mentally blocked at the moment![:(]()
Many thanks in advance!
Greetings
Toco1982
I use AutoIT quite a while now and somehow I seem to be mentally blocked
![:ermm:](http://aut1.autoit-cdn.com/forum/public/style_emoticons/default/ermm.gif)
I am facing the following problem:
I have 2 script files:
- test1
- test2
"Func PaketInstaller($InstSprache, $LogFileHandle, $Software, $Pfad, $WinVersion, $Architektur)"
- $InstSprache, $Pfad, $WinVersion, $Architektur= String
- $LogFileHandle = Handle to a txt file
- $Software = Array[8]
From the script in test1 I want to call the function which is defined in test2.
The big problem which I am confronted with is transmitting the array "$Software" successfully without getting an array fault with the following code:
Local $avPakete[8] = [0,0,0,0,0,0,0,0]
$avPakete[0] = GUICtrlRead($cbx_1)
$avPakete[1] = GUICtrlRead($cbx_2)
$avPakete[2] = GUICtrlRead($cbx_3)
$avPakete[3] = GUICtrlRead($cbx_4)
$avPakete[4] = GUICtrlRead($cbx_5)
$avPakete[5] = GUICtrlRead($cbx_6)
$avPakete[6] = GUICtrlRead($cbx_7)
$avPakete[7] = GUICtrlRead($cbx_8)
PaketInstaller($SelSprache, $file, $avPakete, $InstPfad, $win, $arc)
When I call my function I always get the following error:
"Error Subscript used with non-Array variable"
Can somebody please help me how to use / define a function in AutoIT with an array as a parameter!?
Somehow I am not that experienced with Basic but with other languages I would have solved it easily but here I am totally mentally blocked at the moment
![:(](http://aut1.autoit-cdn.com/forum/public/style_emoticons/default/sad.png)
Many thanks in advance!
Greetings
Toco1982