Author Topic: Voice attack is resizing windows when told just to move them.  (Read 1504 times)

Malic

  • Full Member
  • ***
  • Posts: 105
Just built a brand new PC, moved everything over from old computer to new, everything else is working.

I made myself a command, if X game is running, and user says "start streaming software" it starts X programs.

One of these programs is Chatty, it lets me krrp track of chat, users, and title/tags on Twitch.


The command looks like this:

Quote
Set text [~ProcessToCheck] to 'Chatty'
Inline C# Function: Checks to see if process is running, wait until execution finishes
Begin Boolean Compare : [ProcessCheckResult] Equals True
    Write [B lue] '{TXT:~ProcessToCheck} is running' to log
    Move window '*Chatty*' to (2698,26)
    Move window '*Channel: Malic_VR*' to (3700,26)
    Move window '*Channel Admin - Malic_VR*' to (3700,464)
Else
    Write [B lue] '{TXT:~ProcessToCheck} is not running' to log
    Run application 'C:\Program Files (x86)\Chatty\Chatty.exe'
End Condition

The C function looks like this:

Quote
using System.Diagnostics;

public class VAInline
{
    public void main()
    {
        string processName = VA.GetText("~ProcessToCheck");

        Process[] pname = Process.GetProcessesByName(processName);

        if (pname.Length == 0)
            VA.SetBoolean("ProcessCheckResult", false);
        else
            VA.SetBoolean("ProcessCheckResult", true);

        //if (pname.Length == 0)
            //VA.WriteToLog("Process doesn't exist", "red");
        //else
            //VA.WriteToLog("Process is running", "green");
    }
}

// References:
  // https://stackoverflow.com/questions/262280/how-can-i-know-if-a-process-is-running

As you can see, Chatty is made up of three windows.  The command starts everything up, and with all of them, you will see that if it sees it running, will move it to the proper location on the screen.  The issue is that every time the command is used, all of the windows just shrink a little bit.  Their X/Y in the upper left corner does not change, they just get smaller

Video of behavior:

https://youtu.be/pKx4fU45WzU



Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Voice attack is resizing windows when told just to move them.
« Reply #1 on: June 03, 2023, 12:32:22 PM »
Have you tried the latest version (v1.10.4) Malic? 

SemlerPDX

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 291
  • Upstanding Lunatic
    • My AVCS Homepage
Re: Voice attack is resizing windows when told just to move them.
« Reply #2 on: June 03, 2023, 12:55:05 PM »
I copied your inline and created a command with the same actions (using a different application as the target), and was unable to reproduce this behavior.  If it matters, I'm on Windows 10, and I have not yet updated my VoiceAttack to latest - still running v1.10.3 (for the record).

Malic

  • Full Member
  • ***
  • Posts: 105
Re: Voice attack is resizing windows when told just to move them.
« Reply #3 on: June 05, 2023, 10:27:16 PM »
The video was made with 1.10.3 64 bit

I am also on Windows 10

I updated to 1.10.4, it did it twice, I rebooted, and it is no longer doing it, so looks like it is fixed.

I've been rebooting this PC several times as it is maybe a week old, it has been doing it since I installed VA then, until this last reboot