Jump to content

Recommended Posts

Posted

I have an automated sync which pulls data from QuickBooks.  However several dialog boxes will prevent the sync from occurring.  Quickbooks has no quiet mode and is generally hostile towards any efforts to extract information from it (poor API - dropped features, slow to return results).

I have this script:

WinActivate("Bank Feeds In Use")
sleep(1000)
$iSendresult = ControlSend("Bank Feeds In Use","OK","[CLASS:MauiPushButton; INSTANCE:1]","{ENTER}",1)
$iClickresult = ControlClick( "Bank Feeds In Use", "OK", "[CLASS:MauiPushButton; INSTANCE:1]")
MsgBox(4096, "", "Sendresult: " & $iSendresult & " Clickresult: " & $iClickresult)

Control returns 1 for both Send and Click yet the QB error remains.  WinActivate works as expected.  I have tried both x32 and x64 compilers.  I have tried plain Send ("{ENTER}") and Send("{SPACE}") both of which work when manually interacting with the error message.

For some reason I am unable to send anything to this dialog box.  I have tried run as administrator as well.  The OS is Server 2019, QuickBooks version 20 Enterprise Accountant. AutoITV3.3.14.5

BankFeedsButton.jpg.f180efefe0a893c479a1348051513a0b.jpg

Posted

Thanks.  I have tried without the OK.  But OK is detected as the valid button text so I left it in.  We are getting the '1' result so it thinks it is clicking/sending enter.  It just has no effect on the window for some reason.  Send did nothing either.

BankFeedsButton2.jpg.2254a383bacb8d9980bf96b5f87bedb6.jpg

  • 1 month later...
Posted

Thanks for the tip.  Had a little time today to look into it.  Got this far but does not seem to do anything:

;~ *** Standard code Flexible***
#include "UIAWrappers.au3"
AutoItSetOption("MustDeclareVars", 1)

Local $oP1=_UIA_getObjectByFindAll($UIA_oDesktop, "Title:=Company  - Intuit QuickBooks Enterprise Solutions: Accountant 20.0(multi-user)(OpenSync);controltype:=UIA_WindowControlTypeId;class:=MauiFrame", $treescope_children)
_UIA_Action($oP1,"setfocus")
Local $oP0=_UIA_getObjectByFindAll($oP1, "Title:=Bank Feeds In Use;controltype:=UIA_WindowControlTypeId;class:=MauuiMessage", $treescope_children)
_UIA_Action($oP0,"setfocus")
_UIA_setVar("OK.mainwindow","title:=OK;classname:=MauiPushButton")
_UIA_action("OK.mainwindow","setfocus")

Looked at the tutorial docs.  Attached is the full spy output. I removed the doublequotes in the standard code output to get it to run. I also tried the code cleanup. Need to play a bit more with it to find out how to make it click.

;~ *** Standard code Flexible***
#include "UIAWrappers.au3"
AutoItSetOption("MustDeclareVars", 1)

Local $oP1
$oP1=_UIA_action("Title:=Company  - Intuit QuickBooks Enterprise Solutions: Accountant 20.0(multi-user)(OpenSync);controltype:=UIA_WindowControlTypeId;class:=MauiFrame", "getobject")
_UIA_Action($oP1,"move")
Local $oP0
$oP0=_UIA_action("Title:=Bank Feeds In Use;controltype:=UIA_WindowControlTypeId;class:=MauuiMessage", "getobject")
_UIA_Action($oP0,"move")
_UIA_setVar("OK.mainwindow","title:=OK;classname:=MauiPushButton","move")
_UIA_action("OK.mainwindow","setfocus","invoke")

 

QBBankFeedsSpy.txt

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
  • Recently Browsing   0 members

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