Skip navigation

Escape key to close calculated fields

score 2
You have not voted. By Design

Update:

Open = Alt + C + A

Close = Alt + F4

 

alt+f4 closes the calculated field! Wish I knew about this before I typed the rest! haha

-------------------------------------------------------------------------------------------------------------------------

 

The escape key to close a window, is the most common key/function, in most software applications and websites. Here to check ETA on escape key closing calculated field; ?

 

Macroing this seems to be the only option.

Decently complex scripts with pixel search functionality appears to break on each datasource (not re-usable..), and even workbooks that has re-opened since the creation of the pixel search macro. Rarely I was able to re-use "mark" .pngs to move my mouse and click programmatically (for example).

 

Pixel scraping solution:autohotkey

#NoEnv

SetWorkingDir %A_ScriptDir%

CoordMode, Mouse, Window

SendMode Input

#SingleInstance Force

SetTitleMatchMode 2

#WinActivateForce

SetControlDelay 1

SetWinDelay 0

SetKeyDelay 1

SetMouseDelay 1

SetBatchLines -1

F4::

Macro1:

WinWaitActive, Tableau - Dashboardnamegoeshere

Sleep, 333

Sleep, 1000

Loop

{

    CoordMode, Pixel, Window

    ImageSearch, FoundX, FoundY, -100, -100, 2390, 574, C:\Users\Tyler\Desktop\ahk\IdeaTbaluea\screenshotgoeshere.png

    CenterImgSrchCoords("C:\Users\Tyler\Desktop\ahk\IdeaTbaluea\screenshotgoeshere", FoundX, FoundY)

    If ErrorLevel = 0

    Click, %FoundX%, %FoundY% Left, 1

    Sleep, 333

}

Until ErrorLevel = 0

Return

CenterImgSrchCoords(File, ByRef CoordX, ByRef CoordY)

{

  static LoadedPic

  LastEL := ErrorLevel

  Gui, Pict:Add, Pic, vLoadedPic, %File%

  GuiControlGet, LoadedPic, Pict:Pos

  Gui, Pict:Destroy

  CoordX += LoadedPicW // 2

  CoordY += LoadedPicH // 2

  ErrorLevel := LastEL

}

Problems: pixel search in tableau only appears to function "on open, and on creation" as soon as the workbook closes, most screenshots need to be replaced completely. It's not repeatable between sources (in my use case), each source required an entirely new .png.

 

Alternative:autohotkey

#NoEnv

SetWorkingDir %A_ScriptDir%

CoordMode, Mouse, Window

SendMode Input

#SingleInstance Force

SetTitleMatchMode 2

#WinActivateForce

SetControlDelay 1

SetWinDelay 0

SetKeyDelay 1

SetMouseDelay 1

SetBatchLines -1

F4::

Macro1:

WinWaitActive, Tableau - dashboardnamehere

Sleep, 333

Sleep, 1000

Click, 850, 24 Left, 1

Sleep, 10

Return

Problems: it's static and not re-usable. Delegating this to a non-technical owner is now more difficult because they need to understand they can't move the calculated field box. I will need to generate a prompt that lets end users set where they intend for the "X" button to be.

Thanks to all the devs and product managers for implementing all of my previous requests. Thank you for all the time you put into your work.

 

Cheers!

TylerG

Dev3lop

 

Workaround published in response below:

 

Open = Alt + C + A

Close = Alt + F4

Comments

Vote history