Jump to content

CrisRobin

Members
  • Posts

    7
  • Joined

  • Last visited

CrisRobin's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. How do I read the , lets say the second parameter in my text file 22 row? It give me error no matter what I write
  2. In the beginning I forgot to post my code. Have you seen it? Can you tell me what is wrong there?
  3. I am using V3.3.12.0 Yes. I want to do search and replace later and recreate the text file. You think I need to update me Autoit
  4. The same thing happened. I read it but it does not works.
  5. I read a txt file (attached) with _FileReadToArray. I am trying to understand how to use this. If I use _ArrayDisplay($aRecords[$x]) it will saw me the 2d array but when I ask for $aRecords[$x][0] or any [3][3] or any else it give me the error "Array variable has incorrect number of subscripts or subscript dimension range exceeded." What do I do wrong? My code #include <file.au3> #include <Array.au3> Global $aRecords Dim $WinSt Dim $WinEn ;~ FileOpenDialog ( "title", @scriptdir& "\", "EnergiUI (*.dbk"),1) $File = FileOpenDialog ( "title", @scriptdir& "\", "EnergiUI (*.DBK)",1) $fName = StringRegExpReplace($File, "^.*\\", "") If Not _FileReadToArray($File, $aRecords,2,"|") Then ;~ If Not _FileReadToArray($File, $aRecords) Then MsgBox(4096, @ScriptName, "There was an error reading file!") Exit EndIf For $x = 0 To UBound ($aRecords)-1 if Mod ($x , 10) = 0 Then _ArrayDisplay($aRecords[$x]) MsgBox(0, "Window", $aRecords[$x]) EndIf ;~ MsgBox(0, "Window", $aRecords[2][4]) ;~ If $aRecords[$x][1] = ">matGlassLib" Then ;~ $WinSt = $x ;~ for $y=$x To UBound ($aRecords)-1 ;~ If $aRecords[$x][0] = ">" Then ;~ $WinEn = $y ;~ ExitLoop ;~ EndIf ;~ Next ;~ EndIf ;~ MsgBox(0, @ScriptName, $Replaced) Next ;~ _ArrayDisplay ($aRecords[0]) MsgBox(0, "Window", $WinSt&"-"&$WinEn)Please addvice Materials.dbk
  6. Thank you AndyG It took me a while but i Made it working. Thank you so much
  7. I am quite new in Autoit, so maybe this question is not very smart. I created an array of buttons like this according to a number of parameters that the user choose in a combo box. Dim $MyArr[$xy[1]][$xy[1]] For $d_2 = 0 To $xy[1] -1 For $d_1 = 0 To $xy[1] -1 $MyArr[$d_2][$d_2] = GUICtrlCreateButton("", 10+($d_1*22), 184+($d_2*22), 20, 20 ) GUICtrlSetBkColor($MyArr[$d_2][$d_2], 0x604311) Next Next My question is how do i check and start a function according to what button was pressed? I couldn't find a way to use the $gui_msg[0] because it does not know $MyArr[$d_2][$d_2]. Please advice Chris
×
×
  • Create New...