Jump to content

Recommended Posts

Posted

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.

Posted

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.

Posted

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. 

Posted

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.

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...