Author Topic: Can I disable profile switching while certain commands are in action?  (Read 2204 times)

librarian

  • Newbie
  • *
  • Posts: 15
I have a few commands that switch between applications, and one that switches to notepad, copies some data then switches back and does something with that data.

As I program more commands the profile switching is very useful to keep things organised and to have the same voice command do different things in different apllications.

Since I setup profile switching for notepad today my command that switches between it and back stops as soon as the profile switches. How do I get around this?

Thanks

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4790
  • RTFM
Re: Can I disable profile switching while certain commands are in action?
« Reply #1 on: March 03, 2022, 09:25:05 AM »
Commands are stopped when profiles are switched, as resources that command depends on may not be available in the profile(s) being switched to.


If your workflow uses multiple applications, keeping the commands in the same profile would likely be the more efficient configuration.
The "{ACTIVEWINDOWTITLE}" token can be used to have a command perform different tasks based on which window has focus.

Should that not be feasible, you'll need to pass along whichever values you want to keep between your profiles, E.G. using globally-scoped variables.
You could use the "Execute a command each time this profile is loaded" option to have a command executed when the profile being switched to has been loaded, so that can check those variables and execute followup commands if necessary.