Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
OSD Volume display w/ current level? + ALT+TAB!?
OSD Volume display w/ current level? + ALT+TAB!?
QUESTION 1:
I love the fact that the OSD can display that I hit the "volume down" button on my Firefly. However, is there any way one can add the variable of WHAT the current volume is?
For example, "Volume Down (35%)" "Volume Up (38%)", and so on.
NOTE: I'm not talking about just for programs like Winamp. I'm talking systemwide.
QUESTION 2:
This is the situation. I use several media players. Here they are by rank:
1) zoomplayer
2) Winamp
3)MPC
4) VLC
When I press "FF" or "RR" button, I don't want to have to go back into EG and enable/disable each one individually. Also, I don't want to HAVE to do it by remote. I want it to be automated.
Is there any script or someting that basically figures out what program(s) (OR PROGRAMS!!!) are open and enables the script when pressing a button such as "next track" or something like that?
First case scenario: Let's say MPC is open, everything is closed. I press Fast FOrward button. EG detects MPC is open, and disables the rest of the programs.
Second case scenario: Let's say Winamp and VLC are open. I press Fast FOrward button. EG detects VLC & winamp is open, enables BOTH, and disables the rest of the programs. It sends the function "FF" to BOTH programs!
There's got to be a way to do this.
I love the fact that the OSD can display that I hit the "volume down" button on my Firefly. However, is there any way one can add the variable of WHAT the current volume is?
For example, "Volume Down (35%)" "Volume Up (38%)", and so on.
NOTE: I'm not talking about just for programs like Winamp. I'm talking systemwide.
QUESTION 2:
This is the situation. I use several media players. Here they are by rank:
1) zoomplayer
2) Winamp
3)MPC
4) VLC
When I press "FF" or "RR" button, I don't want to have to go back into EG and enable/disable each one individually. Also, I don't want to HAVE to do it by remote. I want it to be automated.
Is there any script or someting that basically figures out what program(s) (OR PROGRAMS!!!) are open and enables the script when pressing a button such as "next track" or something like that?
First case scenario: Let's say MPC is open, everything is closed. I press Fast FOrward button. EG detects MPC is open, and disables the rest of the programs.
Second case scenario: Let's say Winamp and VLC are open. I press Fast FOrward button. EG detects VLC & winamp is open, enables BOTH, and disables the rest of the programs. It sends the function "FF" to BOTH programs!
There's got to be a way to do this.
Last edited by stisev on Thu Jan 10, 2008 6:07 am, edited 1 time in total.
Re: OSD Volume display w/ current level? + advanced Question!
for the volume part check this thread in the german part of the forum.
You can and should use the task plugin to switch between players as it triggers events, whenever a program is started, closed, gets or loses focus.
You can and should use the task plugin to switch between players as it triggers events, whenever a program is started, closed, gets or loses focus.
Re: OSD Volume display w/ current level? + advanced Question!
Hi Bartman,
I couldn't figure out how to use that script. I don't know German, but I did translate yet still couldn't figure it out. I tried adding a "python script" and adding that line:
Volume: {int(eg.result)} {"|" *int(round(eg.result) * 0.5) + "-" *int(round(100-(eg.result)) * 0.5)}
but nothing happens. Can you specifically tell me what to add in EG?
Also, I didn't understand what you meant for the second issue. Can you give me specific directions? I don't see a "task plugin" but I do see a "Task Create/Switch Events"
Sorry for being so high maintenance.
I couldn't figure out how to use that script. I don't know German, but I did translate yet still couldn't figure it out. I tried adding a "python script" and adding that line:
Volume: {int(eg.result)} {"|" *int(round(eg.result) * 0.5) + "-" *int(round(100-(eg.result)) * 0.5)}
but nothing happens. Can you specifically tell me what to add in EG?
Also, I didn't understand what you meant for the second issue. Can you give me specific directions? I don't see a "task plugin" but I do see a "Task Create/Switch Events"
Sorry for being so high maintenance.
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: OSD Volume display w/ current level? + advanced Question!
Try this:
Python Command
Pako
Python Command
Code: Select all
eg.WinAPI.SoundMixer.GetMasterVolume()- Attachments
-
- VolumeDown.jpg (6.17 KiB) Viewed 16128 times
Re: OSD Volume display w/ current level? + advanced Question!
OMG Paco, that's so freakin' awesome! It worked perfectly! Thanks!
If anyone has an explanation for the second question, I'd be much obliged [/old western talk]

EDIT: Paco, is there any way to do this with the current song title in winamp as well?
I have the "Winamp: Get Currently Playing Song Title" in my script already, but I don't know how to pull that info to my existing OSD. Basically, I want to
AH, what the hell, I might as well ask.
I also use a plugin called "AlbumList" (if you haven't tried it already, OMG, go get it now. Is there any way to get a name of the album as well (not holding my breathe for this one
)
If anyone has an explanation for the second question, I'd be much obliged [/old western talk]
EDIT: Paco, is there any way to do this with the current song title in winamp as well?
I have the "Winamp: Get Currently Playing Song Title" in my script already, but I don't know how to pull that info to my existing OSD. Basically, I want to
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1262">
<Action>
Winamp.GetPlayingSongTitle()
</Action>
</EventGhost>
AH, what the hell, I might as well ask.
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: OSD Volume display w/ current level? + advanced Question!
Solving is very simple - see picture.stisev wrote: Paco, is there any way to do this with the current song title in winamp as well?
Solving for Winamp I don't know. You can convert to cleverer player - MediaMonkey.stisev wrote:Is there any way to get a name of the album as well ... ?
His plugin in EG can make required function.
In addition MM is able to trigger also events !
- Attachments
-
- TrackTitle.jpg (20.08 KiB) Viewed 16084 times
Re: OSD Volume display w/ current level? + advanced Question!
Awesome, Pako! The naming thing worked beautifully.
Some of my songs are in Japanese, the titles came out as "???? - ????". I tried running EventGhost with AppLOcale (microsoft's "unicoder" program), but I got the following error:
Meanwhile, if anyone has an answer to #2, I'm all ears.
Man, you guys are awesome!
Some of my songs are in Japanese, the titles came out as "???? - ????". I tried running EventGhost with AppLOcale (microsoft's "unicoder" program), but I got the following error:
Code: Select all
Firefly.Play
Error in Action: "Show OSD: {eg.result}"
Traceback (most recent call last) (1262):
File "D:\Applications\EventGhost\eg\Classes\ActionClass.py", line 150, in CallWrapper
File "D:\Applications\EventGhost\plugins\EventGhost\ShowOSD.py", line 289, in __call__
File "D:\Applications\EventGhost\eg\Utils.py", line 207, in ParseString
UnicodeDecodeError: 'ascii' codec can't decode byte 0x93 in position 0: ordinal not in range(128)
Meanwhile, if anyone has an answer to #2, I'm all ears.
Man, you guys are awesome!
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: OSD Volume display w/ current level? + advanced Question!
This is probable bug.stisev wrote:Some of my songs are in Japanese, the titles came out as "???? - ????". I tried running EventGhost with AppLOcale (microsoft's "unicoder" program), but I got the following error ...
Try python command:
Code: Select all
eg.result=unicode(eg.result.decode(eg.systemEncoding))- Attachments
-
- TrackTitle2.jpg (5.58 KiB) Viewed 16099 times
-
- TrackTitle.jpg (6.72 KiB) Viewed 16074 times
Re: OSD Volume display w/ current level? + advanced Question!
Thanks for the tip! It's very useful, but now i'm trying to show the Mute status and i get an error in the log. I'm using this Python command:
but when i execute it, i get this result in the log window:
however, eg.result returns true or false so it seems to be working. Another question that i have is, how can i translate the result into a customized string? for example "ON" when the result is True and "OFF" when it's false.
regards,
Code: Select all
eg.WinAPI.SoundMixer.GetMasterMute()Code: Select all
Error en la acci├│n: "eg.WinAPI.SoundMixer.GetMasterMute()"
Traceback (most recent call last) (1262):
File "C:\Archivos de programa\EventGhost\eg\Classes\ActionClass.py", line 150, in CallWrapper
File "C:\Archivos de programa\EventGhost\plugins\EventGhost\__init__.py", line 81, in __call__
File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'GetMasterMute'regards,
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: OSD Volume display w/ current level? + advanced Question!
Solution by Bitmonster is in this thread. Here is:fidoboy wrote: Another question that i have is, how can i translate the result into a customized string? for example "ON" when the result is True and "OFF" when it's false.
Code: Select all
{("Mute Off", "Mute On")[int(eg.result)]}- Attachments
-
- ToggleMute.jpg (4.76 KiB) Viewed 16068 times
Re: OSD Volume display w/ current level? + advanced Question!
Pako is on fire!
I tried the method you mentioned (wit the python command) AND turned on Unicode support for app using AppLocale, and it worked!
The mute suggestion worked too! Great work, guys!
I tried the method you mentioned (wit the python command) AND turned on Unicode support for app using AppLocale, and it worked!
The mute suggestion worked too! Great work, guys!
Re: OSD Volume display w/ current level? + advanced Question!
That is the plugin you are looking for.stisev wrote:Also, I didn't understand what you meant for the second issue. Can you give me specific directions? I don't see a "task plugin" but I do see a "Task Create/Switch Events"
Bitmonster wanted to include an example in the config which comes with an EG install since it is the most overlooked plugin if someone wants to control multiple apps.
I don't know if he changed it by now.
Re: OSD Volume display w/ current level? + advanced Question!
Thanks Bartman. I checked out the example scripts and, yes, I think he did include them in the latest version.
Another question that's come up is can anyone create an effective entry that toggles ALT+TAB but !!!DOES NOT CLOSE IT!!!.
I tried this entry, but it didn't work. Basically, I want to open Alt+Tab, but prevent it from closing
Another question that's come up is can anyone create an effective entry that toggles ALT+TAB but !!!DOES NOT CLOSE IT!!!.
I tried this entry, but it didn't work. Basically, I want to open Alt+Tab, but prevent it from closing
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1262">
<Macro Name="Alt + Tab" id="750" Expanded="True">
<Action>
Window.SendKeys(u'{Alt+Tabulator}', False)
</Action>
<Action>
Window.SendKeys(u'{Right}', False)
</Action>
<Action>
EventGhost.StopProcessing()
</Action>
</Macro>
</EventGhost>
Re: OSD Volume display w/ current level? + ALT+TAB!?
I've come up with a new ALT+TAB script, but it still doesn't work 100%.
I tried using "TaskSwitchXP", but having to run ANOTHER process is a pain in the ass.
The problem with this is that if the number of processes are 4 or 5, etc.. it won't "focus" on all of them, only the ones divisible by 3. Same goes with {Alt+tabulator} and {Alt+tabulator+tabulator}.
Since there's easy way to "sticky" the ALT+TAB without HOLDING down ALT, I'm at a loss here. I'm assuming there's no way to "HOLD" a button down in EG.
I tried using "TaskSwitchXP", but having to run ANOTHER process is a pain in the ass.
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1262">
<Macro Name="Alt + Tab (F5)" Expanded="True">
<Event Name="Firefly.Num5">
</Event>
<Action>
EventGhost.ShowOSD(u'Alt+Tab', None, (255, 255, 255), (0, 0, 0), 0, (0, 0), 0, 3.0)
</Action>
<Action>
Window.SendKeys(u'{Alt+Tabulator+Tabulator+Tabulator}', False)
</Action>
</Macro>
</EventGhost>
The problem with this is that if the number of processes are 4 or 5, etc.. it won't "focus" on all of them, only the ones divisible by 3. Same goes with {Alt+tabulator} and {Alt+tabulator+tabulator}.
Since there's easy way to "sticky" the ALT+TAB without HOLDING down ALT, I'm at a loss here. I'm assuming there's no way to "HOLD" a button down in EG.
Re: OSD Volume display w/ current level? + ALT+TAB!?
I've been experimenting, researching, etc etc... yet I still can't find a viable way to switch between ALL applications (basically, one at a time)