Jump to content

Help needed


DerekL
 Share

Recommended Posts

Hi Folks,

I know this is'nt a general forum for help, but I am using _ComputerGetSystem in the snippet of code below, which works with out any problems when run from the editor, but if I compile it and run another machine I get the following error:

'AutoIt Error' box come up that say's 'Line -1:' and then 'Error: Variable must be of type "Object"

Func GetSystemInfo()
    Msgbox(0,"Got to GetSystemInfo","GetSystemInfo")
    ; use a library to quickly grab some entries from the systeminfo information
    ;$test = _ComputerGetSystem($cinfo)
    _ComputerGetSystem($cinfo)
    For $i = 1 To $cinfo[0][0] Step 1
    Next

    Msgbox(0,"Got to _ComputerGetSystem",$cinfo)
    $ginfomake = $cinfo[1][21]
    $ginfomodel = $cinfo[1][22]

    ;Msgbox(0,"Model is:",$ginfomake & " " & $ginfomodel)
    ; read the list of images from the inifile for the corresponding model we've discovered
    $dghostimage = IniRead("k:\imagelist.ini", "ImageRef2", $ginfomodel, "Image not found")
    ; update the form field to show the select image file
    GUICtrlSetData($wimfile,"k:\" & $dghostimage)

    ; do the same for the model
    $rno = IniRead("k:\imagelist.ini", "ImageNumber", $ginfomodel, "Image not found")
    GUICtrlSetData($model, $rno)

    GUICtrlSetData($SuggestModelLabel, "Suggested Model: " & $rno)

EndFunc

It seems to be the _ComputerGetSystem($cinfo) line that is causing the problem, and I assume that it's because the $cI_Compname variable isn't set anywhere in the code, I want to use this on systems that are sysprep'ed for deploying images via a WinPE environment using ImageX, any idea's on how stop the script from falling over when run as an .exe

Cheers

Derek

Link to comment
Share on other sites

Hi FinalVersion,

I was already fully aware of that, I did appologise from the out set, I was rather hoping to catch the attention of the author of CompInfo.au3, I had already tried posting in the General Support Forum.

But thank you for your kind words of wisdom.

Cheers.

Post this in the General Support Forum, not in the example scripts.

Link to comment
Share on other sites

I was already fully aware of that

Then it even worse, knowing that you are violating the rules makes you twice irresponsible.

I was rather hoping to catch the attention of the author of CompInfo.au3

You could send him PM.

I had already tried posting in the General Support Forum

Then wait patiently, if there is no answers for last few days, then bump the topic gently :(

 

Spoiler

Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1

AutoIt_Rus_Community.png AutoIt Russian Community

My Work...

Spoiler

AutoIt_Icon_small.pngProjects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize Program

AutoIt_Icon_small.pngUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF
 
AutoIt_Icon_small.pngExamples: 
ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo

Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating AutoIt_Rating.gif)

* === My topics === *

==================================================
My_Userbar.gif
==================================================

 

 

 

AutoIt is simple, subtle, elegant. © AutoIt Team

Link to comment
Share on other sites

  • Developers

Hi FinalVersion,

I was already fully aware of that, I did appologise from the out set, I was rather hoping to catch the attention of the author of CompInfo.au3, I had already tried posting in the General Support Forum.

But thank you for your kind words of wisdom.

Cheers.

Wrong assumptions and disturbing you intentionally post here.

*click*

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...