UserDC Posted February 26, 2019 Posted February 26, 2019 Hello, I am trying to do something very simple. I want to open QuickBooks Database Manager and click Start Scan. Alternatively, TAB then ENTER. But I cannot seem to get this to work. I have two scripts. The first one here, is supposed to check if it's open, if not open it and run the above commands. Well, it runs them all at the same time: #include <MsgBoxConstants.au3> Main() ; Main Function Func Main() ; Run DB Manager ShellExecute ("C:\Program Files (x86)\Common Files\Intuit\QuickBooks\QBServerUtilityMgr.exe") AutoItSetOption("WinTitleMatchMode",2) Scan() EndFunc Func Scan() ; send the tab key to move to [Start Scan] button Send("{TAB}") ; send the enter key to start the scan Send("{ENTER}") EndFunc So it hits TAB and ENTER at the same time it runs the Database Manager. I added WinWait ('QuickBooks Database Server Manager') but then it does nothing afterwards. The second one I have, does wait until it's open, but doesn't insert the keys: AutoItSetOption("WinTitleMatchMode",2) ShellExecute ("C:\Program Files (x86)\Common Files\Intuit\QuickBooks\QBServerUtilityMgr.exe") AutoItSetOption("WinTitleMatchMode",2) WinWait ('QuickBooks Database Server Manager') ; send the tab key to move to [Start Scan] button Send("{TAB}") ; send the enter key to start the scan Send("{ENTER}") It doesn't do them at the same time with the second one, but it doesn't input it into the QB window. It successfully launches no issue. I really don't care how I have to do it, but nothing seems to work for such a simple task and I am thinking it's because this is my first time coding with AutoIT. Any help would be appreciated.
faustf Posted February 26, 2019 Posted February 26, 2019 (edited) ty to use a function control + somthing like controlsend i think is much better look in F1 Edited February 26, 2019 by faustf
stevenlee Posted April 27, 2019 Posted April 27, 2019 I saw a good answer in another forum post: However another warning dialog box pops up: I used the script referenced in the post, above, to open the QuickBooks Database Server Manager and then press Start Scan. Then a Warning pop-up window appears each time, "Folders containing QuickBooks files will be shared with all users on your network. If you have sensitive information in these folders, we recommend you move them to another location before your run the scan. Are you sure you want to continue?" Here is the summary of the AutoIt Window Info (32bit): >>>> Window <<<< Title: Warning Class: #32770 Position: 419, 263 Size: 497, 200 Style: 0x94C801C5 ExStyle: 0x00010101 Handle: 0x00000000001505EC >>>> Control <<<< Class: Button Instance: 1 ClassnameNN: Button1 Name: Advanced (Class): [CLASS:Button; INSTANCE:1] ID: 1 Text: OK Position: 277, 124 Size: 88, 26 ControlClick Coords: 43, 12 Style: 0x50030000 ExStyle: 0x00000004 Handle: 0x000000000021054E >>>> Mouse <<<< Position: 747, 430 Cursor ID: 0 Color: 0x7F3300 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< OK Cancel Folders containing QuickBooks files will be shared with all users on your network. If you have sensitive information in these folders, we recommend you move them to another location before you run the scan. Are you sure you want to continue? >>>> Hidden Text <<<< What code would I add to the script above and where would I place that code in order to press the OK button in the Warning dialog box? Thanks in advance.
KVNIMRLS Posted October 19, 2023 Posted October 19, 2023 UserDC, Did you ever perfect the QB database manager script? Running QB 2021
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