raven221084 Posted May 17, 2015 Posted May 17, 2015 ok i have run into a common issue by the looks of it but cant seem to find the right resolution for it in my case, the full error message is line 68 (file c.......) for $i = 1 to $Config[0][0], $i = 1 to $Config^Error, subscript used on non-accessible variable.this is the part of the script that is failing on me- GUICtrlCreateLabel("Gold", 285-265, 285-132-35, 70, 17)GUICtrlSetColor(-1, 0x808000)global $gui_status_gold_label = GUICtrlCreateLabel("0", 370-265, 285-132-35, 40, 17, $SS_RIGHT)GUICtrlSetColor(-1, 0x808000)GUICtrlCreateGroup("", -99, -99, 1, 1)GUICtrlCreateGroup("Status: Time", 10, 310 - 90 - 75, 255, 43)GUICtrlCreateLabel("Total:", 20, 330 - 90 - 75, 50, 17)Global $label_stat = GUICtrlCreateLabel("min: 000 sec: 00", 70, 330 - 90 - 75)GUICtrlCreateGroup("", -99, -99, 1, 1)$txtName = GUICtrlCreateCombo($strName, 60, 330 - 90 - 45, 150, 20)$Config = IniReadSection("Name.ini", "Name")For $i = 1 To $Config[0][0] GUICtrlSetData($txtName, $Config[$i][1] )NextGUICtrlCreateGroup("Status: Current Action", 10, 375 - 90 - 65, 255, 45)Global $STATUS = GUICtrlCreateLabel("Script not started yet", 20, 390 - 90 - 65, 235, 25)GUICtrlCreateGroup("", -99, -99, 1, 1)GUISetState(@SW_SHOW)#EndRegion ### END Koda GUI section ### the issue is in red, i have spent about 8 hours trying to resolve this situation with no luck, i am very new to autoit so if you could keep the replies very dumbed down that would be great as i am learning as i go, thanks in advance for any help you can offer.
water Posted May 17, 2015 Posted May 17, 2015 Check the return code of InIReadSection. If there is an error then $Config is not a 2D array. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now