Sign in to follow this  
Followers 0
Verdut

Error, supose compatibility issue

6 posts in this topic

Hello everyone. Im new to programming and stuff and i had to made a program for a friend that collects OS and hardware data from a PC and shows them in a GUI list. Now the program work fine on the computer that i've coded it. And it worked on other computers too. Now it works only on my main PC and when i try to run it on another Computer i get :

"Line 14840 (File "F:\PCInfo.exe"):

Error: Subscript used on non-accessible variable. "

Im using AutoIt compiler to make an .exe from the au3 file. 

I'll attach the code. Now what i've found is that if i delete line 190 that uses that  " $netAdapter.IPAddress[0] " the program start working on another computer. But i really need this part to work. Please help me ! If any info needed i will be here . 

pcinfo.au3

Share this post


Link to post
Share on other sites



Can't test your script:

+>         SciTEDir => C:\Program Files\AutoIt3\SciTE   UserDir => C:\Users\Bert\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\Bert\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.14.2)  from:C:\Program Files\AutoIt3  input:C:\Users\Bert\AutoIt3.My\Downloads\pcinfo.au3
"C:\Users\Bert\AutoIt3.My\Downloads\pcinfo.au3"(1,10) : error: can't open include file <CompInfo.au3>.
#include <CompInfo.au3>
~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Downloads\pcinfo.au3"(6,10) : error: can't open include file <DriveInfo.au3>.
#include <DriveInfo.au3>
~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Downloads\pcinfo.au3"(96,31) : error: _DriveGetDiskDrive(): undefined function.
_DriveGetDiskDrive($aDiskDrive)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Downloads\pcinfo.au3"(97,39) : error: _ComputerGetProcessors(): undefined function.
_ComputerGetProcessors($aProcessorInfo)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Downloads\pcinfo.au3"(98,35) : error: _ComputerGetVideoCards(): undefined function.
_ComputerGetVideoCards($aVideoInfo)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Downloads\pcinfo.au3"(99,35) : error: _ComputerGetNetworkCards(): undefined function.
_ComputerGetNetworkCards($aMACInfo)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\Bert\AutoIt3.My\Downloads\pcinfo.au3 - 6 error(s), 0 warning(s)
!>15:56:40 AU3Check ended. Press F4 to jump to next error.rc:2
+>15:56:40 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 2.159

at least 2 include files are missing.

Share this post


Link to post
Share on other sites

The first include you are missing "CompInfo.au3" is from here 

Second include file DriveInfo.au3 is from here 

 I hope you can help me !

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Change line 189 in your script as below and see if that's what you're trying to do.

; from this
        If $netAdapter.IPAddress[0] Then
; to this
        If $netAdapter.IPAddress Then
Edited by BrewManNH

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites
7 hours ago, BrewManNH said:

Change line 189 in your script as below and see if that's what you're trying to do.

; from this
        If $netAdapter.IPAddress[0] Then
; to this
        If $netAdapter.IPAddress Then

 

I tried this. The error goes off but it gives no IP address now .

Share this post


Link to post
Share on other sites

You can always use the @IPAddress1/2/3/4 macro instead.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

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