Author Topic: Auto profile switching, can you make a default profile.  (Read 12503 times)

iceblast

  • Sr. Member
  • ****
  • Posts: 372
Auto profile switching, can you make a default profile.
« on: July 30, 2016, 04:04:52 PM »
I just figured out what Auto profile switching is, and it's a great feature.

My problem is, I'm trying to get Auto to switch between Opera, and a tab in Opera.

Here's a Typical title for Opera: Start a new topic - Opera

The tab I want Auto to be triggered by is: Edit Style blah blah - Opera

Edit Style or * Edit Style is always at the beginning of the title.

I've tried the suggested things to do in the Help PDF, but I'm having no luck.

I've tried for my Default profile: *Opera, and for my Editor: *Edit*, or *Edit*;Opera or Opera;*Edit* . Auto won't see the Editor Profile, it will only see my Default one. I've many other ways as well, with no luck. I don't know, maybe you know the correct command to use. If so, that would be great.

If not, how about a option to choose a Default Profile. This Profile, Voice Attack would always switch back to if none of the Auto Switch commands are triggered. Controlling Opera is part of my global profile/main profile. So, if it Defaulted back to it, every time I switch between my CSS editor that would help a great deal.

I'm now using Windows 10. You really have VA working good now. I'm no longer using the old stable version of VA. I have been using the Beta for bit now, but switched to 1.5.12 and everything is running great, Good work!



Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: Auto profile switching, can you make a default profile.
« Reply #1 on: July 30, 2016, 04:18:59 PM »
how about a option to choose a Default Profile. This Profile, Voice Attack would always switch back to if none of the Auto Switch commands are triggered.

Quote from: VoiceAttack Documentation
a single asterisk (‘*’) indicates that the profile is to be switched to if no other matches have been made



For Gary:
Quote from: VoiceAttack Documentation Typo
‘Enable Auot Profile Switching’

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: Auto profile switching, can you make a default profile.
« Reply #2 on: July 30, 2016, 04:25:49 PM »
Thank you!

For both helping and finding the typo ;)
« Last Edit: July 30, 2016, 04:29:48 PM by Gary »

iceblast

  • Sr. Member
  • ****
  • Posts: 372
Re: Auto profile switching, can you make a default profile.
« Reply #3 on: July 30, 2016, 04:52:00 PM »
Jeez, I actually remember reading that line, but it didn't register with me for some reason.

OK, tried it out, it does work, but sometimes, I can switch, and it doesn't. I have to switch back and forth once again to get it to register the change.

Thanks for getting back to me so fast. :)

iceblast

  • Sr. Member
  • ****
  • Posts: 372
Re: Auto profile switching, can you make a default profile.
« Reply #4 on: July 30, 2016, 05:13:11 PM »
Hmm, looks like I spoke to soon. Now, it's not working at all. I can trigger it to switch for different programs, but if it's the editor tab in Opera, the Default profile overrules it.

I can fully type out the title for the window, and the switching works, but I have many different titles for my editor, and I would have to try to make one for each, if I can't use a wildcard.

Can you think of a better way to write the command than what I'm using.

All Opera windows Titles end with: "- Opera", and all Editor windows Titles start with "Edit" or "* Edit".

Thanks for the help.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: Auto profile switching, can you make a default profile.
« Reply #5 on: July 30, 2016, 06:07:28 PM »
I can see why you're having trouble, the switching seems inconsistent.

The first observation is that it triggers on focus change, which does not occur when changing tabs(as window focus is maintained).

Aside from that, the window title matching doesn't appear to work as expected; E.G. "Untitled - Notepad" requires "*Notepad*" to be matched, rather than "*Notepad", and "*Untitled* doesn't work at all, nor does "Untitled*".

The "Show window titles" option from the CTRL + Shift dialogue appears to be broken entirely, as it just creates blank log entries, rather than displaying the active window title.

At times the default profile would not be switched from when changing focus to notepad, but restarting VoiceAttack appears to solve that.

While the documentation does state the options for matching are "starts with", "ends with", and "contains", could it be clarified whether this means something like "Unt*pad" or "*led*ote*" would not work? I.E. matching multiple fragments?

Lastly, profile switching will interfere with the start menu; If I click the start menu button or press the windows key, the start menu will close when VoiceAttack switches profiles. It may be that the VoiceAttack window is stealing focus momentarily while switching.

iceblast

  • Sr. Member
  • ****
  • Posts: 372
Re: Auto profile switching, can you make a default profile.
« Reply #6 on: July 30, 2016, 06:19:44 PM »
I use this command line with VA -ignorechildwindows -alwaysontopoff This usually keeps VA from becoming the active window. Without -alwaysontopoff, every command seems to make VA active for a split second, ok maybe not every, but it does it a lot otherwise.

Yeah, I've tried many different ways, you can't just click on the tab for the switch, but I usually move the Edit tab to it's own window, and use ALT+TAB to switch back and forth. This usually works about 80% of the time. But only if I use the full name, no wildcards.

Is there a way to add, more then one title to that slot? I might have to add each and every title I might be using. Pita, but better then not having the option at all.

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4761
  • RTFM
Re: Auto profile switching, can you make a default profile.
« Reply #7 on: July 30, 2016, 06:32:40 PM »
I use this command line with VA -ignorechildwindows -alwaysontopoff This usually keeps VA from becoming the active window. Without -alwaysontopoff, every command seems to make VA active for a split second, ok maybe not every, but it does it a lot otherwise.
I don't have "Always on top" enabled(through the main window's context menu), and "-alwaysontopoff" doesn't appear to fix it either("-ignorechildwindows" doesn't make a difference).


Is there a way to add, more then one title to that slot?
Quote from: VoiceAttack Documentation
The input for this box is semicolon-delimited so
you can associate your profile with more than one application.
E.G. "*Notepad*;*Untitled*", just like command aliases.

iceblast

  • Sr. Member
  • ****
  • Posts: 372
Re: Auto profile switching, can you make a default profile.
« Reply #8 on: July 30, 2016, 06:46:20 PM »
Those two commands worked for me, they solved the problem I was having, different problem then this though. The old stable VA didn't have the issue with VA trying to be active all the time. It was one of the reasons, I've had to keep it installed. But that command fixed my issue, and I'm using the newest stable version now.

Thanks, I thought ; would do the trick, just didn't have a chance to try it.

iceblast

  • Sr. Member
  • ****
  • Posts: 372
Re: Auto profile switching, can you make a default profile.
« Reply #9 on: August 03, 2016, 11:12:52 AM »
I figured out a way to do what I want. I'm using AutoHotKey to rename the windows, Removing Opera from the title, and taking the * and changing it to Editing. AutoHotKey does it instantly.

Voice Attack seems to be a bit slow on window changes though. You can switch between windows, and VA doesn't notice, so you might have to swap back and forth a couple of times, before it actually auto switches the profile. I even upped the CPU Priority to High, in the hopes it would react faster, but didn't change anything. I think VA needs to poll for changes more often.

So, I made the profile announce when it switches, and what it switched to, so I know I'm on the right profile. I use the Logitech g600 mouse. It has 20 buttons. It does have 3 mouse buttons, and VA doesn't support a 3rd mouse button. Auto Switching is great, and with this mouse, I have 20 keys I can easily control with one hand blind.

This auto profile switching is great, just has some bugs to work out.

I think a Default profile option, if it only had the list of other profiles setup for auto switching in it, instead of just using a * which seems to be ineffective in certain cases.

If each Profile for Auto Switching, was automatically added to a list for the Default profile option, then any title that's not on that list, would cause VA to switch to the Default profile. I think it would be a lot more precise if it was done that way.


Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2826
Re: Auto profile switching, can you make a default profile.
« Reply #10 on: August 03, 2016, 08:49:56 PM »
Quote
Voice Attack seems to be a bit slow on window changes though. You can switch between windows, and VA doesn't notice, so you might have to swap back and forth a couple of times, before it actually auto switches the profile. I even upped the CPU Priority to High, in the hopes it would react faster, but didn't change anything. I think VA needs to poll for changes more often.
VoiceAttack polls the active window four times a second... I was thinking that was a little aggressive.  I can add a command line parameter as a test to see if that helps any.  Something to remember is that VoiceAttack is swapping profiles any time you make a change.  Your switching performance will rely heavily on how large your profiles are.

Quote
I'm using AutoHotKey to rename the windows, Removing Opera from the title, and taking the * and changing it to Editing. AutoHotKey does it instantly.
VoiceAttack will also change window titles for you if you need it to (Other > Windows > Perform a window function > Change title). 

Quote
VA doesn't support a 3rd mouse button
VoiceAttack supports the standard 5-button mouse (left, middle, right, back, forward)... anything outside of that is handled by your Logitech software.

Quote
I think a Default profile option, if it only had the list of other profiles setup for auto switching in it, instead of just using a * which seems to be ineffective in certain cases.

If each Profile for Auto Switching, was automatically added to a list for the Default profile option, then any title that's not on that list, would cause VA to switch to the Default profile. I think it would be a lot more precise if it was done that way.

Maybe we are not connecting on what is meant by, 'Default' profile in regards to auto switching of profiles.  My understanding is that the default profile is the profile that VA switches to when a window becomes active and the title of that window is not indicated by any other profile's auto-switch list.

You indicate which profile is the default profile by just including a single asterisk in the box: 

Profile A : *dangerous*;*citizen*
Profile B : *need for speed*;*iracing*
Profile C : *  <---- default

This was implemented in this way to avoid having to add yet another check box to the profile options screen (and made delivering the feature rather fast because there was no UI).  Maybe at some point a check box would make it more evident, but this way to me seems very straight-forward if you know about it (other than the fact that you can indicate a default profile for any and all profiles at the same time (in which the first one that is found is selected...  this is why a checkbox would be good)).  I'm not sure what you mean in regards to your last paragraph... are you talking about an exception list?  Could you elaborate a little more? 
« Last Edit: August 03, 2016, 09:11:34 PM by Gary »

iceblast

  • Sr. Member
  • ****
  • Posts: 372
Re: Auto profile switching, can you make a default profile.
« Reply #11 on: August 04, 2016, 01:07:17 AM »
Hmm, let's see if I can explain this.

Example:
Window Title:
Post reply - Opera     *Opera,  will handle this just fine.

My problem is: Edit Style Facebook for dark rooms - Opera      *Edit* This works fine, But *Opera also overrides this. And the * for Default, also overrides it.

It just can't tell the difference between the two.

I was double checking everything I said, and VA started doing everything right. Then after a few mins, it stopped working. Other programs switched just fine, at least when VA notices the change. For a minute there, I thought I was going nuts. But I remember trying this after you posted the first time, and I thought that did the trick, and then I posted back, that it's not working right.

Anyway, to try and solve my problem, I tried using VA to change the title names, but VA doesn't remember the changes, if you happen to close and reopen the same window, which is something I do a lot through out a day. I would have to manually trigger the change, for every new window, because they all have to have separate names. At least, as far as I can tell, unless I'm overlooking something.

Anyway, so, I made a AutoHotKey script to change each window automatically, removing the conflict of *Opera. I just removed the - Opera from the end of all my Edit windows. I had to write out each window title though, because I suck at scripting, the AHK Doc just doesn't explain enough for me. I tried using Wildcards, and no matter what I did, it never worked. It's basically a miracle from God, that I made something that Accomplished what I wanted. I spent most of the day, building it.

It was fun fooling around with it. Wish there was a better book on how to use AHK. You try to find the answer online, but so many guys just answer with, read the AHK Doc, I did, didn't help, that's why I'm here. It's pretty irritating, not everyone picks up programs easily.

If I understood programming better, maybe I could have built a way around my problem using VA, but some of the really advance features, are still bit out of my reach. Maybe in the future. You're probably going to tell me, I could have just done this, and it will be so obvious to me, after you point it out.

Anyway, about a different Style Default idea.

Here was my idea.

Personally, I don't have that many profiles I want to switch around, so, the list should be small.

Every time you activate a new profile for switching, it gets added to the Default check list.

Default Check List:
Default profile is: Main Profile

1. *Edit Style*
2. *Notepad
3. *Video Player
4. *Word
and so on.

Opera is part of my Main Profile.

So, VA goes through the list, and if no title matches, it Default's back to Main Profile.

Sorry, now that I laid it out, it just looks like it would just help me. No idea how helpful it might be to others though.

With my problem being Opera, inside of Opera, this would remove the conflict. I imagine, if others are having a similar issue, it might help. Just don't know how many people are trying to do something like this.

About VA not always noticing the windows switch. My Main profile has around 250 commands, my other profiles have less then 20. I have VA set to Realtime Priority for the CPU. VA still misses some switches, maybe 25% fail rate. Usually, just ALT+TAB back and forth once is enough to get the switch, sometimes twice. I'm not going super fast or anything. I try to give it plenty of time to switch. I added audio, to let me know if the switch was made or not.

You would think 4 polls a second would be good. Not sure why the hit and miss. Only thing I have to compare it to is AHK, and it instants changes the title names, when I open the windows.

I'm running:

Windows 10 Pro
Intel 3770K 3.9Ghz Quadcore
32megs of ram
SSD Hard drive.

Usually 4% CPU used while doing the switches.

Sorry about the wall of text.

Thanks for trying to help!
« Last Edit: August 06, 2016, 03:47:44 AM by iceblast »