Author Topic: Variable hotkey only work after edit any command  (Read 1230 times)

AngusDLX

  • Newbie
  • *
  • Posts: 1
Variable hotkey only work after edit any command
« on: November 08, 2022, 06:05:26 AM »
I'm making a profile where a voice command sets a hotkey variable to be used as soon as I press these two keys at the same time (23).

Voice Command: Landing Checklist

Set Boolean [landingcompleted] to True
Set text [idle] to 23.

Then comes the command triggered via variable hotkey [idle] which, when checking if idle contains 23, plays an audio file.

When i press variable hotkey: idle

Begin Text Compare : [idle] Contains '23'
    Begin Boolean Compare : [landingcompleted] Equals True
        pause 6 seconds
        Play sound, 'C:\Users\ANGUSGAMING\Desktop\A320 NEW CHECKLIST\A320 CHECKLISTS\spoilers, reverse green decel green.mp3'
    End Condition
End Condition

The problem is that when pressing the idle hotkey, it does nothing. It's just like it hasn't been set! Nothing appears in the log either

I've tried different ways also using "has been set" to check the variable but with no success.

I even created a command to check if 23 is being created at idle and it is!

Now comes the weird part: If I simply edit any command in the profile and simply save any changes, if I press keys 2 and 3 at the same time the command fires correctly!

I'm completely lost on this, where's the mistake? I'm using the latest beta version of Steam.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4781
  • RTFM
Re: Variable hotkey only work after edit any command
« Reply #1 on: November 08, 2022, 12:42:21 PM »
Quote from: VoiceAttackHelp.pdf
Something to understand is that the value in your text variable can change at any time, and the hotkey monitoring process that VoiceAttack uses is optimized so that you must explicitly refresh the hotkeys when a variable value is changed.
In order to refresh the hotkeys that VoiceAttack is monitoring, you simply execute a, ‘Refresh Variable Hotkeys’ action (see the section about this action later in this document).

Editing the profile also forces such a refresh when the profile is reloaded to apply the changes.


Press F1 while VoiceAttack has focus to open VoiceAttackHelp.pdf in your default PDF viewer.