Author Topic: Anoying beep each time looping command  (Read 2366 times)

gorgo

  • Guest
Anoying beep each time looping command
« on: June 22, 2019, 03:58:15 AM »
hi.

When looping through a command number of times/infinity, each loop responds with a short beep (approx 300-500Hz). This sounds scary :)
Any settings that can be done to avoid those beep's?
(I need my headphones cause command runs in a game.)

Code: [Select]
Start VoiceAttack listening

Move mouse cursor to screen coordinates (582, 1100)
Pause 0.1 seconds

// Obtain mouse cursor's X-coordinate
Set integer [~~mouseX] value to the converted value of {MOUSESCREENX}

// Obtain mouse cursor's Y-coordinate

Set integer [~~mouseY] value to the converted value of {MOUSESCREENY}

// C# inline function to obtain RGB and hexadecimal color values for screen pixel at (X, Y) coordinate of interest
Inline C# Function: Retrieve pixel color data at (X, Y) screen coordinate, wait until execution finishes


// compare hex with 1F1117. Click1 if false
Begin Text Compare : [~~HexValue] Does Not Equal '1F1117'
    Press 1 key and hold for 0.05 seconds and release
    Pause 1.2 seconds
End Condition

Stop VoiceAttack listening

regards


Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4782
  • RTFM
Re: Anoying beep each time looping command
« Reply #1 on: June 22, 2019, 05:18:13 AM »
Are you referring the the "Feature On Sound" and "Feature Off Sound" that play when the "Start VoiceAttack Listening" and "Stop VoiceAttack Listening" action run?

If you're not using those actions you could just remove them (VoiceAttack does not need to be listening while the command is already executing, so unless you're using the "Start VoiceAttack Listening" action to override the listening status they aren't required).

Otherwise, you could try muting VoiceAttack's sound output when those actions run:
Code: [Select]
Mute application [VoiceAttack] audio
Start VoiceAttack listening
Stop VoiceAttack listening
Pause 0,5 seconds
Unmute application [VoiceAttack] audio


However, if you do require those actions, the better choice here would be to have the loop limited to the actions that require it by using loop actions, rather than the command's "Repeating" option:
Code: [Select]
Start VoiceAttack listening

Start Loop While : [1] Equals [1]
    Move mouse cursor to screen coordinates (582, 1100)
    Pause 0.1 seconds
   
    // Obtain mouse cursor's X-coordinate
    Set integer [~~mouseX] value to the converted value of {MOUSESCREENX}
   
    // Obtain mouse cursor's Y-coordinate
   
    Set integer [~~mouseY] value to the converted value of {MOUSESCREENY}
   
    // C# inline function to obtain RGB and hexadecimal color values for screen pixel at (X, Y) coordinate of interest
    Inline C# Function: Retrieve pixel color data at (X, Y) screen coordinate, wait until execution finishes
   
   
    // compare hex with 1F1117. Click1 if false
    Begin Text Compare : [~~HexValue] Does Not Equal '1F1117'
        Press 1 key and hold for 0.05 seconds and release
        Pause 1.2 seconds
    End Condition
End Loop

Stop VoiceAttack listening

That just compares a boolean value named "1" to itself, with "Evaluate 'Not Set' as false" checked, for an infinite loop.


Or you can use a "Loop Start - Repeat a Certain Number of Times" action instead:

Code: [Select]
Start VoiceAttack listening

Start Loop : Repeat 3 Times
    Move mouse cursor to screen coordinates (582, 1100)
    Pause 0.1 seconds
   
    // Obtain mouse cursor's X-coordinate
    Set integer [~~mouseX] value to the converted value of {MOUSESCREENX}
   
    // Obtain mouse cursor's Y-coordinate
   
    Set integer [~~mouseY] value to the converted value of {MOUSESCREENY}
   
    // C# inline function to obtain RGB and hexadecimal color values for screen pixel at (X, Y) coordinate of interest
    Inline C# Function: Retrieve pixel color data at (X, Y) screen coordinate, wait until execution finishes
   
   
    // compare hex with 1F1117. Click1 if false
    Begin Text Compare : [~~HexValue] Does Not Equal '1F1117'
        Press 1 key and hold for 0.05 seconds and release
        Pause 1.2 seconds
    End Condition
End Loop

Stop VoiceAttack listening

gorgo

  • Guest
Re: Anoying beep each time looping command
« Reply #2 on: June 22, 2019, 08:10:04 AM »
Are you referring the the "Feature On Sound" and "Feature Off Sound" that play when the "Start VoiceAttack Listening" and "Stop VoiceAttack Listening" action run?

If you're not using those actions you could just remove them (VoiceAttack does not need to be listening while the command is already executing, so unless you're using the "Start VoiceAttack Listening" action to override the listening status they aren't required).

Otherwise, you could try muting VoiceAttack's sound output when those actions run:
Code: [Select]
Mute application [VoiceAttack] audio
Start VoiceAttack listening
Stop VoiceAttack listening
Pause 0,5 seconds
Unmute application [VoiceAttack] audio


However, if you do require those actions, the better choice here would be to have the loop limited to the actions that require it by using loop actions, rather than the command's "Repeating" option:
Code: [Select]
Start VoiceAttack listening

Start Loop While : [1] Equals [1]
    Move mouse cursor to screen coordinates (582, 1100)
    Pause 0.1 seconds
   
    // Obtain mouse cursor's X-coordinate
    Set integer [~~mouseX] value to the converted value of {MOUSESCREENX}
   
    // Obtain mouse cursor's Y-coordinate
   
    Set integer [~~mouseY] value to the converted value of {MOUSESCREENY}
   
    // C# inline function to obtain RGB and hexadecimal color values for screen pixel at (X, Y) coordinate of interest
    Inline C# Function: Retrieve pixel color data at (X, Y) screen coordinate, wait until execution finishes
   
   
    // compare hex with 1F1117. Click1 if false
    Begin Text Compare : [~~HexValue] Does Not Equal '1F1117'
        Press 1 key and hold for 0.05 seconds and release
        Pause 1.2 seconds
    End Condition
End Loop

Stop VoiceAttack listening

That just compares a boolean value named "1" to itself, with "Evaluate 'Not Set' as false" checked, for an infinite loop.


Or you can use a "Loop Start - Repeat a Certain Number of Times" action instead:

Code: [Select]
Start VoiceAttack listening

Start Loop : Repeat 3 Times
    Move mouse cursor to screen coordinates (582, 1100)
    Pause 0.1 seconds
   
    // Obtain mouse cursor's X-coordinate
    Set integer [~~mouseX] value to the converted value of {MOUSESCREENX}
   
    // Obtain mouse cursor's Y-coordinate
   
    Set integer [~~mouseY] value to the converted value of {MOUSESCREENY}
   
    // C# inline function to obtain RGB and hexadecimal color values for screen pixel at (X, Y) coordinate of interest
    Inline C# Function: Retrieve pixel color data at (X, Y) screen coordinate, wait until execution finishes
   
   
    // compare hex with 1F1117. Click1 if false
    Begin Text Compare : [~~HexValue] Does Not Equal '1F1117'
        Press 1 key and hold for 0.05 seconds and release
        Pause 1.2 seconds
    End Condition
End Loop

Stop VoiceAttack listening

Thanks for answer.. Doing the above just to prepare for some conditions regarding spellcasts. Checking color in 8 positions to see if spell within reach and active(ready to cast) (by using boolean variables). Thereafter from theese boleans, use some conditions to activate(click) on keys.

Perhaps making 4 countdown timers, running at same time,setting booleans for ready to cast spells? Then I  would avoid 4 cursor movements. Donno what would be most effective.

I think Ill handle the cursor and color checks in C# and just push out status to VA
« Last Edit: June 22, 2019, 11:35:49 AM by gorgo »