Closed GoogleCodeExporter closed 9 years ago
http://submain.eu/AudioSwitch-Debug.zip
Try this latest version and report back any similar errors. Is your taskbar
somehow different from default, like hidden or different size? The API used to
get the location should work fine on Windows 7, so there must be something
different in your system to make it misbehave. Maybe you can also give a
screenshot to get a better view of your taskbar location & size?
Original comment by tanelte...@gmail.com
on 2 Feb 2013 at 8:43
Funny you should mention that - just remembered that on the machine I want to
use it on I've changed the shell from Explorer. Think that could be it.... ;)
Incidentally that does raise an interesting point. I'm looking to use it on my
media center (XBMC) hence the change of shell. I wonder if it would be possible
to include a 'portable' version of the app. I tried copying the AppData folder
from my laptop to the XBMC machine to see if I could transfer the hotkey
setting that way, but that didn't work (probably GUID related).
I know theres a lot of people in the XBMC/media center community that are
looking for something that achieves the same as your app so it could be worth
considering. Something like checking for a config file in the exe path and
using that for the config, together with maybe a 'supress GUI' option (or
ofcourse done through command line options). I can then use EventGhost to
translate button presses on my remote control to easily switch between audio
outputs.
Any thoughts? I haven't had a look at your code properly and would be willing
to help out if its something you think is worth considering (if you don't mind
bits of VB.Net invading your code!).
Original comment by hasanyon...@googlemail.com
on 2 Feb 2013 at 9:10
well I actually try to avoid VB.NET as I'm trying to rid myself from all that's
left from 8 years of VB6 :) But, I see it as a great option to either make a
separate app just for the background purpose, or maybe even to make some XBMC
plugin to do the same. I'm also using XBMC but I don't need this functionality
on this PC myself. I think that I could make a command-line option to run in
stealth mode or something... Currently the hot key is saves according to .NET
app's default user setting, meaning that it's somewhere in
C:\Users\<user>\AppData\Local\AudioSwitch, but the subfolder name changes with
every version number change, so not a constant. I think I could remake the
taskbar location finding also to put the menu in center of the screen in case
the taskbar is not found at all, instead of failing with an exception. Would
you like to try this with a debug version and see how it would work?
Original comment by tanelte...@gmail.com
on 2 Feb 2013 at 9:26
Will run the debug version when I'm back at the PC.
For some background essentially I've got XBMC on a two screen setup, to the
living room TV for day-to-day viewing and to a projector for movies.
Essentially I'm after a way of changing the audio output via a button on the
remote control when I'm going between the two video outs (from the HDMI hooked
up to the TV to the audio out of my sound card thats plugged in to the surround
sound).
I reckon the command line switch would be easiest, would be more flexible then
I guess too. Definitely let me know if you want some testing.
And yes, VB is an absolute **** to get out the habit of!
Original comment by hasanyon...@googlemail.com
on 2 Feb 2013 at 9:35
I will shortly make a debug version (available at the same URL) that would take
-silent as the command line option to run without any user notifications. One
question though, should it still show notifications when the device gets
changed, or should it hide all possible interactions in silent mode? I think
the usage woule then be to first run it in normal mode, set the shortcut and
then run it in silent mode to operate on the hotkey. This would make sense to
me. For this I will first make it to show itself in center of default screen in
case the taskbar is not found, and then the -silent option to hide all messages
and disable the GUI totally.
Original comment by tanelte...@gmail.com
on 2 Feb 2013 at 9:40
Yeah that sounds good. XBMC can be a bit odd when playing with other program
notifications. Perhaps ultimately there could be a -stfu option :D.
What do you think about the possibility of setting the keystrokes at command
line?
Original comment by hasanyon...@googlemail.com
on 2 Feb 2013 at 9:43
This can of course be done, I'll look into it, should be fairly simple. I'll
update this issue when I have something ready for testing :)
Original comment by tanelte...@gmail.com
on 2 Feb 2013 at 9:45
I have updated the debug package. commandline options available:
-s - silent (no notifications, except when applying or removing hot keys)
-m - set modifier hot keys
-k - set regular key for hot key combination
usage: AudioSwitch.exe -mcontrol,alt,shift -kw -s
setting the hot keys overwrites the ones in user config file and remembers them
next time if no new ones were given in command. They must not be set every
time, but can be if needed.
Please give this debug version some testing and report ANY errors you get when
using it, since I have also shifted around a lot of code for a cleanup and I
would like to find any possible bugs before I release it as a new version.
Thanks!
Original comment by tanelte...@gmail.com
on 2 Feb 2013 at 10:16
I added few command line options to the debug version:
-i - index of a device which to set as default
-n - name of the device which to set as default (must be precise)
-l - get a list of names with their indexes, command-line printed response
Sample: AudioSwitch.exe -i1
sets the device as default which is indexed as 1'th in the 0-based list
After these commands AudioSwitch will exit, so it's optimal way to change
device without any other app usage. No Form or anything else gets loaded.
Original comment by tanelte...@gmail.com
on 2 Feb 2013 at 12:51
sorry, removed -n because whitespaces in the name string cause too much of a
hassle and there is no need for it currently, so I'll not invest any time in
this right now.
Original comment by tanelte...@gmail.com
on 2 Feb 2013 at 12:53
That worked an absolute treat! Following your shortcut, XBMC now switches audio
between my TV and surround sound when I hit Blue on my remote control. Awesome!
One thing, I tried setting it to Alt+1 at the command line and it set it to
Alt+LeftButton (I think). But I've got around that.
Excellent stuff sir. Would highly recommend getting a post on to the XBMC
forums, I think you'll get a lot of downloads from this!
Original comment by hasanyon...@googlemail.com
on 2 Feb 2013 at 3:26
Thanks! That would be really cool :) In case there are no more issues to fix
I'll release this version soon in downloads section and update the front page
with new options for using the command-line part. When this is done I'll have a
look in the XBMC forums, maybe I'll find a place for this thread :)
Original comment by tanelte...@gmail.com
on 2 Feb 2013 at 3:52
Top man! This will be the place you want -
http://forum.xbmc.org/forumdisplay.php?fid=116 . Best of luck sir and congrats
on the app!
Original comment by hasanyon...@googlemail.com
on 2 Feb 2013 at 4:12
Original issue reported on code.google.com by
hasanyon...@googlemail.com
on 2 Feb 2013 at 7:46