Jump to content
Sign in to follow this  

Problems with ObjGet

Recommended Posts


Before upgrading to AutoIt v., I had no problems using ObjGet, but now I get a "0x80020006 Unknown name" COM error.  I'm running Windows 7 and the object to which I'm trying to attach is PowerTermPro.Document, which worked fine previously, but not so much now.

1.  Does anyone know why this error would occur and how to fix it?

2.  Also, are there any tools available to see which objects are available in the running object table (ROT) and possibly see their ProgID and/or CLSID?

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  

  • Similar Content

    • MrCheese
      By MrCheese
      Hi guys,
      without including everything (unless you want it)
      I am copying data from a table in chrome and wanting to paste it into excel.
      Copying in Chrome works.
      I can paste it into the field i want by emulating goto -> ctrl V:
      WinActivate($dataload) WinWaitActive($dataload) Sleep(500) $oWorkbook1.Sheets("ItemReturn").Activate Sleep(500) $msg = "Measuring Sheet" conwrite() ttips2() Local Const $xlUp = -4162 With $oWorkbook1.ActiveSheet ; process active sheet $oRangeLast = .UsedRange.SpecialCells($xlCellTypeLastCell) ; get a Range that contains the last used cells $iRowCount = .Range(.Cells(1, 1), .Cells($oRangeLast.Row, "B")).Rows.Count ; get the the row count for the range starting in row/column 1 and ending at the last used row/column $iLastCell = .Cells($iRowCount + 1, "B").End($xlUp).Row ; start in the row following the last used row and move up to the first used cell in column "B" and grab this row number EndWith $NewStartCell = $iLastCell + 2 $msg = "moving to location" conwrite() ttips2() Sleep(250) Send("^g") WinWait("Go To") Sleep(100) Send("B" & $NewStartCell) Sleep(100) Send("{ENTER}") Sleep(500) Send("^v")  
      But, I want to use _excel_rangecopypaste, pasting from the clipboard
      _Excel_RangeCopyPaste($oWorkbook1.ActiveSheet, default, "B" & $NewStartCell,default,$xlPasteValuesAndNumberFormats) If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeCopy Example 2", "Error pasting cells." & @CRLF & "@error = " & @error & ", @extended = " & @extended) however, this gives me error 4 , extended@:  -2147352567
      How can i fix this or find out how to debug this error?
    • WoodGrain
      By WoodGrain
      Hi All,
      I've coded the small script below, but it can't seem to get the instance of Windows Media player as it keeps going to @error, I've not used com objects before so any assistance would be appreciate. I already have WMP open and minimised. I retrieved "WMPlayerApp" from the AutoIT info tool, I've included a copy below.
      I'm using these sources:
      $oWMP = ObjGet("", "WMPlayerApp") If @error Then MsgBox(0, "Can't get WMP", "Couldn't connect to the WMP instance") Exit EndIf $wmpPlayState = $oWMP.playState MsgBox(0, "Play State", $wmpPlayState) $wmpSongName = $oWMP.currentMedia.name MsgBox(0, "Play State", $wmpSongName) I've also seen references to the below, but I want to get an existing open WMP:
      ObjCreate("wmplayer.OCX") and have looked at the WMP.udf but can't see how it will do either of the functions I've coded above.
    • kingjacob90
      By kingjacob90
      I am wanting to know what my CPU temp is but don't know what object to use. I don't relay know how objget works so would not know where to start. I have seen people integrate things like windows speech to text into their scripts but don't know how they know what object to use! How do I find the right object? And how dose it work?
      Thanks Jacob
    • jaja714
      By jaja714
      For years, I have been running a script using ObjGet to open an Excel workbook but, after upgrading from Win7 to Win10, ObjGet is now returning with an error.  The only way I can get it to work on Win10 is to actually open the workbook manually myself and then run the script.
    • Tjalve
      By Tjalve
      Hi Everyone.
      Im currently coding script for a BI Tool called Qlikview. Qlikview has a COM API that i use to get data and to manipulate the tool in verius ways. The script in itself is an compiled EXE that can do diffrent tasks depending on what input is put into a txt file. And when this input is entered in the wrong way, the script throws a COM errror. This usually is easy fixed with a COM error handler. But for some reason it wont work im my partucilur case.
      I have put the most frequently used QV functions into a UDF witch i call upon in the main script. And when there is a COM error in the main scipt, it works. But when the error is in the UDF (an included au3 file) the COM error handler wont catch the error and the script crashes.
      I run this. It works and i get a MSGbox from the COM error handler. The reason for the failiure is that the field "Formfaktor2" does not exists.
      $object_qv = _qv_open(1) $o_document = _qv_opendocument($object_qv,"C:\Users\xxxxxx\Documents\Qlikview\xxxxxxx.qvw") ;~ $loop = _qv_field_GetPossibleValues($o_document,"Formfaktor2",$nr_of_returns) $values = $o_document.Fields("Formfaktor2").GetPossibleValues(300) local $array[$values.count + 1] $array[0] = $values.count for $i = 0 to $values.count - 1 $array[$i+1] = $values.Item($i).Text Next _ArrayDisplay($array) Exit But if i run this:
      $object_qv = _qv_open(1) $o_document = _qv_opendocument($object_qv,"C:\Users\xxxxxx\Documents\Qlikview\xxxxxxxxx.qvw") $loop = _qv_field_GetPossibleValues($o_document,"Formfaktor2",$nr_of_returns) Exit And in the UDF i have this function (same code as above). But then i get  "The requested action with this object has failed.:" on the first row in the function.
      func _qv_field_GetPossibleValues($qv_documentobject,$field,$numberofreturns=100) $values = $qv_documentobject.Fields($field).GetPossibleValues($numberofreturns) local $array[$values.count + 1] $array[0] = $values.count for $i = 0 to $values.count - 1 $array[$i+1] = $values.Item($i).Text Next return $array EndFunc The Only difference is that the secound code runs in my UDF isnterad of the main script. But the COM error handler should pick it up anyway. Does anyone jhave any idees? Thansk for your time