atzoref Posted December 4, 2012 Share Posted December 4, 2012 Hi, I have this code for connection with Phidgets Device: ;Phidget initialization code goes here Global $oPhid1, $oPhidEvents $oPhid1 = ObjCreate("Phidget21COM.PhidgetInterfacekit") $oPhid1.Open() $oPhid1.WaitForAttachment(3000) If NOT $oPhid1.IsAttached Then MsgBox(0, "Error", "Phidget Device not attached") GUICtrlSetState($cbWithoutMux, $GUI_CHECKED) ;Exit EndIf $oPhidEvents = ObjEvent($oPhid1, "phid1_") It works good for me on 2 computer (Win 7_64, Win XP_32) But for some reason the AutoIt crush on other computer with Win 7_64. C:\Users\user\Desktop\ManagerTester\includes\ConnectionControllerFunctions.au3 (78) : ==> Variable must be of type "Object".: $oPhid1.Open() $oPhid1^ ERROR It get error on this command: $oPhid1.Open() Because probably it doesn;t make an object on this line: $oPhid1 = ObjCreate("Phidget21COM.PhidgetInterfacekit") Why it may happens just on this PC? Thanks Link to comment Share on other sites More sharing options...
water Posted December 4, 2012 Share Posted December 4, 2012 I assume the required software isn't installed on this machine. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
atzoref Posted December 5, 2012 Author Share Posted December 5, 2012 Google is your best friend I found the solution here:It was finally something with the " Phidget21COM.dll " which for some reason wasn't registered on the PC.So for using the COM interface, Before you can use the COM interface to Phidget21COM it needs to be "registered" This is maybe should be done automatically when you install the Phidget drivers but I done it manually.To register the COM interface:1. Open a command prompt (As administrator)2. Change directory (using CD) to the directory that contains Phidget21COM.dll in the program files3. Type "regsvr32.exe Phidget21COM.dll" and press enterAnd then the problem doesn't happen and he success to run the ObjCreate. Link to comment Share on other sites More sharing options...
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