Is it possible to pass variable to Key property in "Send hotkey" activity?

studio
variable
hotkey

#1

Hi,

Is it possible to pass variable to Key property in “Send hotkey” activity?

For instance : If i pass F8 as variable, my workflow should hit F8 in that window.

Please help.

Thanks


#2

Hello there,
I’m bit confused.:thinking:

  • First thing first you can’t pass variable in sendHotKey activity(you can use TypeInto or SetText or clipboard)
  • If your talking about function key f8 then SendHotKey do support all the function key
  • If your looking to just pass F8 as the value via SendHotKey yes you can do it just uncheck “special Key” property

Cheers :slightly_smiling_face:


#3

Hi,

Thanks for your clarification.

Unfortunately, I was actually looking to pass variable in sendHotKey.

My workflow will actually gets the steps and data from an excel and invoke corresponding xaml file with respective data sheet. That’s where i needed this.

No issues. I accomplished that through switch activity. :slight_smile:


#4

For future reference, this could work.

Eg 1: Send F3 as a variable

image

image

Eg 2: Send Ctrl + a as a variable

image

image


#5

TypeInto activity can perform hotkeys exactly the same as Send Hotkey.

Examples:
"[d(ctrl)]c[u(ctrl)"

“[d(shift)][k(end)][u(shift)]”

“[k(f8)]” or maybe with variable “[k(”+key+")]"

Regards.