Author Topic: Targeting the command list itself in a command  (Read 97 times)

Astan

  • Newbie
  • *
  • Posts: 22
Targeting the command list itself in a command
« on: October 07, 2024, 08:16:35 AM »
I am trying to target the command list (“Edit a Profile” window) in VoiceAttack itself with "Perform a Window Function", to have that list moved to my other screen.

However, the command fails to acquire that window. Here's the command:

Code: [Select]
Display window '^Edit a Profile' As [Show] (pause up to 5 Seconds for availability)
Move window '^Edit a Profile' to (2560,0)
Pause 0.025 seconds
Resize window '^Edit a Profile' to Width: 400, Height: 800

Having run the command, the error message in the log says: “Unable to acquire window or process to perform a window function”.

As you can see, I prefixed the window title with "^" to have VoiceAttack search by window title only; normal search (without a prefix) targets and moves the main VoiceAttack window instead.

It seems to me this is because the command list is technically not a separate window, but, rather, a part of VoiceAttack (process-wise). Is there any way I can work around this to have the command list recognized in that command?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4767
  • RTFM
Re: Targeting the command list itself in a command
« Reply #1 on: October 07, 2024, 08:37:30 AM »
Technically it could likely be done, but you'd need to write custom (C#) code for that, using unmanaged Windows API functions.

It is not a targetable window from the perspective of the "Perform a Window Function" action (not even as the active window).

Astan

  • Newbie
  • *
  • Posts: 22
Re: Targeting the command list itself in a command
« Reply #2 on: October 07, 2024, 08:47:09 AM »
I understand. I'll see what I can do. Thanks a lot for your reply.