DerekL Posted March 18, 2010 Share Posted March 18, 2010 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 More sharing options...
FinalVersion Posted March 18, 2010 Share Posted March 18, 2010 Post this in the General Support Forum, not in the example scripts. [center][+] Steam GUI [+][+] Clipboard Tool [+][+] System :: Uptime [+][+] StarCraft II Mouse Trap [+][/center] Link to comment Share on other sites More sharing options...
DerekL Posted March 18, 2010 Author Share Posted March 18, 2010 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 More sharing options...
MrCreatoR Posted March 18, 2010 Share Posted March 18, 2010 I was already fully aware of thatThen 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.au3You could send him PM.I had already tried posting in the General Support ForumThen 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 Russian Community My Work... Spoiler Projects: 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 ProgramUDFs: 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 Examples: 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 ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
Developers Jos Posted March 18, 2010 Developers Share Posted March 18, 2010 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 More sharing options...
Recommended Posts