Jump to content

Colyn1337

Active Members
  • Posts

    132
  • Joined

  • Last visited

  • Days Won

    1

Colyn1337 last won the day on July 3 2013

Colyn1337 had the most liked content!

Colyn1337's Achievements

Adventurer

Adventurer (3/7)

10

Reputation

  1. Try putting the ControlClick function to a variable and print it like this: $Value = ControlClick(clickstuffhere) consolewrite($value & @lf) The value will either be 1 or 0. If it's 1, then autoit clicked, but nothing happened. If it's 0, then the controlclick function failed. EDIT: Here's the online help for ControlClick if you haven't seen it yet. http://www.autoitscript.com/autoit3/docs/functions/ControlClick.htm
  2. This is the error info from the error handler. --> COM Error Encountered in asdf.au3 ----> $IEComErrorScriptline = 3633 ----> $IEComErrorNumberHex = 80020009 ----> $IEComErrorNumber = -2147352567 ----> $IEComErrorWinDescription = Access is denied. ----> $IEComErrorDescription = Access is denied. ----> $IEComErrorSource = ----> $IEComErrorHelpFile = C:WindowsSysWOW64mshtml.hlp ----> $IEComErrorHelpContext = 0 ----> $IEComErrorLastDllError = 0 Does anyone know if the error is from oleacc.dll or from the application?
  3. Ha Ha, if you guys wanna troll this thread, fine. I'll wait patiently for someone with compassion and understanding. And if that person doesn't come, oh well. Have fun with yourselves.
  4. I get all the other examples, except that one. If someone could explain it, I'd appreciate it.
  5. Because it doesn't make sense. I'm in need of an explanation, not blind links. If someone is willing to explain it, great and thank you, if not, don't post.
  6. Both. I kept getting that error I referenced with using the _IExxx udf which led me to investigate.
  7. I've been working on a problem using the IE udf and have delved into its code. Part of what I'm trying to do is get an object from an embedded IE control using it's handle. In the IE udf there's an internal function which does this: Func __IEControlGetObjFromHWND(ByRef $hWin) ; The code assumes CoInitialize() succeeded due to the number of different ; yet successful return values it has. DllCall("ole32.dll", "long", "CoInitialize", "ptr", 0) If @error Then Return SetError(2, @error, 0) Local Const $WM_HTML_GETOBJECT = __IERegisterWindowMessage("WM_HTML_GETOBJECT") Local Const $SMTO_ABORTIFHUNG = 0x0002 Local $lResult __IESendMessageTimeout($hWin, $WM_HTML_GETOBJECT, 0, 0, $SMTO_ABORTIFHUNG, 1000, $lResult) Local $typUUID = DllStructCreate("int;short;short;byte[8]") DllStructSetData($typUUID, 1, 0x626FC520) DllStructSetData($typUUID, 2, 0xA41E) DllStructSetData($typUUID, 3, 0x11CF) DllStructSetData($typUUID, 4, 0xA7, 1) DllStructSetData($typUUID, 4, 0x31, 2) DllStructSetData($typUUID, 4, 0x0, 3) DllStructSetData($typUUID, 4, 0xA0, 4) DllStructSetData($typUUID, 4, 0xC9, 5) DllStructSetData($typUUID, 4, 0x8, 6) DllStructSetData($typUUID, 4, 0x26, 7) DllStructSetData($typUUID, 4, 0x37, 8) Local $aRet = DllCall("oleacc.dll", "long", "ObjectFromLresult", "lresult", $lResult, "struct*", $typUUID, _ "wparam", 0, "idispatch*", 0) If @error Then Return SetError(3, @error, 0) If IsObj($aRet[4]) Then _arraydisplay($aRet) Local $oIE = $aRet[4] .Script() ; $oIE is now a valid IDispatch object Return $oIE.Document.parentwindow Else Return SetError(1, $aRet[0], 0) EndIf EndFunc The problem I'm experiencing with the UDF is that I get this error: Return $oIE.Document.parentwindow Return $oIE.Document^ ERROR Which I tracked down to that section of code up above. Since the script values the data in $aRet[4] I decided to see what that array has in it. After the DllCall I added an _arraydisplay($aRet) so I could see what was there. Much to my chagrin it was blank. No zero or any kind of data, just white space. This led me to the DllCall itself and I wanted to see the values being passed to oleacc.dll. I added a console write to the code just before the DllCall like this: ConsoleWrite("oleacc.dll " & " long " & " ObjectFromLresult " & " lresult " & $lResult & " struct* " & $typUUID & " wparam " & " 0 " & " idispatch* " & " 0 ") And got the following output: oleacc.dll long ObjectFromLresult lresult 49267 struct* wparam 0 idispatch* 0 49267 $1Result is populated with 49267 $typUUID is null The contents of the $aRet array are as follows: [0] 0 [1] 49267 [2] [3] 0 [4] Position 4 in the array is what's valued to create the $oIE.Document.parentwindow object to return. As noted above, position 4 is empty. This leads me to investigate the $typUUID variable as it is empty as well, after the DllStructCreate(). This leads me to believe that something is wrong with that part of the code, I just don't know what. Any suggestions?
  8. Could you please explain a bit about what this is doing: $oIE = _IEAttach('[REGEXPTITLE:(?i).*control.*test.*]','Embedded')
  9. I've tried all of those except for: _IEAttach($hWnd, "embedded") In my case it's expressed as: _IEAttach($AppWindow, "embedded") Which also fails due to : Return $oIE.Document.parentwindow Return $oIE.Document^ ERROR EDIT: I was able to finally get an output of the handle for the control with: $oIE = ControlGetHandle($AppWindow, "", "Internet Explorer_Server3") ConsoleWrite("$oIE = " & $oIE & @LF)
  10. If you're suggesting to try like these: $oIE = _IEAttach("Find A Case", "Embedded", 3) $oIE = _IEAttach($AppWindow, "Embedded", 3) The error returned for these is : Return $oIE.Document.parentwindow Return $oIE.Document^ ERROR Do you have a code example I should try? I've already read the help data over and over.
  11. Is it that the browser is switching into compatibility mode, or that the website thinks you're running in an earlier version than you are?
  12. I'm trying to read the HTML of an embedded IE control and can't seem to get a hold of it. Here is the Window Info Summary: >>>> Window <<<< Title: Find A Case - TEST Class: MeridianShellFrameWindow Position: 106, 29 Size: 1015, 806 Style: 0x16CF0000 ExStyle: 0x00000100 Handle: 0x000303E0 >>>> Control <<<< Class: Internet Explorer_Server Instance: 3 ClassnameNN: Internet Explorer_Server3 Name: Advanced (Class): [CLASS:Internet Explorer_Server; INSTANCE:3] ID: Text: Position: 195, 28 Size: 804, 699 ControlClick Coords: 506, 602 Style: 0x56000000 ExStyle: 0x00000000 Handle: 0x000B03F8 >>>> Mouse <<<< Position: 815, 709 Cursor ID: 0 Color: 0xDDE0E7 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< >>>> Hidden Text <<<< I've been trying to use _IEAttach with the embedded option and it reflects "_IEStatus_NoMatch". If anyone's got a solution, I'd greatly appreciate it. I've attempted many iterations, but this is the one I'm using now: $oIE = _IEAttach("[CLASS:Internet Explorer_Server; INSTANCE:3]", "Embedded", 3)
×
×
  • Create New...