WollyD Posted May 15, 2020 Posted May 15, 2020 Hello all. I had been very excited to use tableau and autoit together to speed up some production work but i have run into a wall. Here is the code: Opt("WinTitleMatchMode", 3); Opt("SendKeyDelay", 300) $workbookname = "Sales Entire"; $ControlNameTableau = ("Tableau - " & $workbookname); $Locker="C:\Windows\System32\rundll32.exe user32.dll,LockWorkStation"; Run($Locker); Sleep(2000); ControlFocus($ControlNameTableau,"",""); Sleep(1000);ControlSend($ControlNameTableau,"","","!dx"); This code is supposed to refresh extracts in tableau automatically, which is the bold portion. It works perfectly well when I comment out the Locker portion, but fails to do anything with that left in. The reason it is there is to test how it runs with it locked, because I want this to run while the computer is locked, overnight. Any help or advice appreciated. The spy tool does not work well for Tableau. Pretty much everything but the title is blank. I have tried all versions of WinTitleMatchMode as well.
faustf Posted May 16, 2020 Posted May 16, 2020 i dont understund this tabloue is web program or you install somthing and work with GUI windows ?
WollyD Posted May 18, 2020 Author Posted May 18, 2020 Tableau is a desktop application, similar to Qliksense or PowerBI, or old school Business Objects. It has a lot of data visualization/reporting analytics capabilities.
WollyD Posted May 19, 2020 Author Posted May 19, 2020 Very much still open to ideas and suggestions. Thanks.
Danp2 Posted May 19, 2020 Posted May 19, 2020 From the wiki -- Why doesn't my script work on a locked workstation? Maybe this will help -- https://help.tableau.com/current/pro/desktop/en-us/extracting_TDE.htm Latest Webdriver UDF Release Webdriver Wiki FAQs
WollyD Posted May 19, 2020 Author Posted May 19, 2020 Hi Danp. Thank you for responding. For the first, I reviewed it previously and in my code, I only used controlsend instead of send, sleep instead of winwaitactive etc. For the second, this refreshes on a tableau server which isn't being used in this case.
Danp2 Posted May 19, 2020 Posted May 19, 2020 7 minutes ago, WollyD said: this refreshes on a tableau server I didn't get that impression from the page, but I'll take your word for it Have you tried adding some debug code, like checking the value of @error following the Control* commands? Latest Webdriver UDF Release Webdriver Wiki FAQs
WollyD Posted May 19, 2020 Author Posted May 19, 2020 I have not but will try. I don't think there is an error as it works while the computer isn't locked. I feel like there is some parameter or option value I am missing that should make it work. If I drop a controlclick with the same syntax in there, it selects a random cell in the middle of the tableau table rather than the menu at the top for some reason. Like it isn't finding the title correctly when locked.
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