AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Volume OSD - updated
Goto page 1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Thu Apr 08, 2004 10:05 am    Post subject: Volume OSD - updated Reply with quote

This script shows volume indicators as volume is increased/decreased using Winkey+Up / Winkey+Down or multimedia keys (the keys can be changed)



Script Updated:
Now you can change Master Volume AND Wave Volume, both showing OSD.
Also, hotkeys section is moved to top of script to allow easy customisation to newbies.

Code:


;_________________________________________________
;_______Volume OSD Script   - Rajat_______________
;_________________________________________________


;_________________________________________________
;_______User Settings_____________________________

;Make customisation only in this area


;change characters for empty & full bar here
Full = |
Empty = -

;set bar position here (relative to desktop)
setenv, PosX, 350
setenv, PosY, 510


;Customise Hotkeys here
HotKey, #Up, VolUp
HotKey, #Down, VolDn

HotKey, ^#Up, wVolUp
HotKey, ^#Down, wVolDn



;___________________________________________
;_____Auto Execute Section__________________

; DON'T CHANGE ANYTHING HERE!!
; (unless u know what u're doing)

SetFormat, float, 0.0
SetTimer, splashoff, 1000
CoordMode, ToolTip, Screen
SoundGet, currsnd1



;Building Empty Bar
Loop, 25
  EmptyBar = %EmptyBar%%Empty%
 
Exit

Display:
   IfNotEqual, Type, W, SoundGet, currsnd
   IfEqual, Type, W, SoundGet, currsnd, Wave
   if currsnd1 <> %currsnd%
   {
      IfNotEqual, Type, W, ToolTip, %currsnd%`% %curr%, %PosX%, %PosY%
      IfEqual, Type, W, ToolTip, * %currsnd%`% %curr%, %PosX%, %PosY%
      currsnd1 = %currsnd%
   }
   Type =

   setenv, presstime, %A_MDay%%A_hour%%A_Min%%A_Sec%
   envadd, presstime, 2
   SetTimer, SplashOff, On
return


Splashoff:
  setenv, presstime2, %A_MDay%%A_hour%%A_Min%%A_Sec%
  ifgreaterorequal, presstime2, %presstime%
  {
    ToolTip
    SetTimer, SplashOff, off
  }
return



;___________________________________________
;_____Hotkey Customisation Section__________

; User defined hotkeys here


wVolUp:
   Type = W
VolUp:
   #MaxHotkeysPerInterval 50
   
   IfNotEqual, Type, W
   {
      SoundSet, +4       
      SoundGet, currsnd
   }
   
   IfEqual, Type, W
   {
      SoundSet, +4, Wave
      SoundGet, currsnd, Wave
   }
   
   mark=0
   curr=%EmptyBar%
   loopup:
   mark += 4
   iflessorequal,mark, %currsnd%,StringReplace, curr, curr,%Empty%,%Full%
   iflessorequal,mark, %currsnd%, goto, loopup
   gosub, display
return


wVolDn:
   Type = W
VolDn:
   #MaxHotkeysPerInterval 50
   
   IfNotEqual, Type, W
   {
      SoundSet, -4       
      SoundGet, currsnd
   }
   
   IfEqual, Type, W
   {
      SoundSet, -4, Wave
      SoundGet, currsnd, Wave
   }
   
   mark=0
   curr=%EmptyBar%
   loopdown:
   mark += 4
   iflessorequal,mark, %currsnd%,StringReplace, curr, curr,%Empty%,%Full%
   iflessorequal,mark, %currsnd%, goto, loopdown
   gosub, display
return

;___________________________________________


_________________


Last edited by Rajat on Wed Jun 23, 2004 3:37 pm; edited 5 times in total
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Sun Apr 11, 2004 11:47 am    Post subject: Reply with quote

I tried it... it's very slick, nice work. I might wind up using a variant of this.
Back to top
View user's profile Send private message Send e-mail
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Sun Apr 11, 2004 11:57 am    Post subject: Reply with quote

if that variancy is not for some personal reqmt, then do post it! as i use this script regularly, any improvement is welcome! Smile
_________________
Back to top
View user's profile Send private message
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Wed Apr 14, 2004 3:14 pm    Post subject: Reply with quote

I use the right and left keys to do things as well.

Code:
#LEFT:: ; Windows Key + LEFT
SoundSet, 1 ; Set volume to 1%
SoundSet, 100, wave ; Set Wave volume to 100%
return

#RIGHT:: ; Windows Key + RIGHT
SoundSet, +1, , mute ; Toggles Mute on and off
SoundSet, 100, wave ; Set Wave volume to 100%
return


I hate how some media players, msn voice chat, etc... change the Wave volume instead of the master volume. So I like to keep it at 100%.

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Tue Apr 27, 2004 8:08 pm    Post subject: Reply with quote

The script above has been changed to use ToolTip (v1.0.9+) instead of SplashText. This looks better.

Also the script has been optimized so that the timer doesn't keep running.... its run only for about 2 seconds when the hotkey is pressed, then again turned off.

Chris, do give it a try... the new command looks nice. This is the general purpose use i've put the command to, other than the more serious uses that now this command will be used for.
_________________
Back to top
View user's profile Send private message
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Tue Apr 27, 2004 8:13 pm    Post subject: Reply with quote

Chris and Rajat,

Already added ToolTip to a script I have, great addition.

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Tue Apr 27, 2004 11:30 pm    Post subject: Reply with quote

Quote:
Chris, do give it a try... the new command looks nice. This is the general purpose use i've put the command to, other than the more serious uses that now this command will be used for.

I tried it and it looks good. It seems that ToolTip has more general purpose uses than TrayTip. In addition, TrayTip (since it uses balloon help) only works on Win2k and XP I think.
Back to top
View user's profile Send private message Send e-mail
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Tue Apr 27, 2004 11:48 pm    Post subject: Reply with quote

Quote:
I tried it and it looks good. It seems that ToolTip has more general purpose uses than TrayTip. In addition, TrayTip (since it uses balloon help) only works on Win2k and XP I think.

Balloon Popups like MSN Messenger? Is that a new feature that is on the list?
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Wed Apr 28, 2004 2:27 am    Post subject: Reply with quote

actually i'd asked for balloon tips (traytips) too, but tooltips has turned out better than my expectations... the most important is that it has no amount of text limitations. and Chris has enabled multi-line support.
_________________


Last edited by Rajat on Wed Apr 28, 2004 3:19 am; edited 1 time in total
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Wed Apr 28, 2004 2:53 am    Post subject: Reply with quote

AutoIt3 uses "balloon help" (or whatever the official name for it is) to do a TrayTip. I don't know if you can have these balloon windows elsewhere on the screen. In any case, TrayTip should be in the next release even though it only works on XP/2000.
Back to top
View user's profile Send private message Send e-mail
Rajat



Joined: 28 Mar 2004
Posts: 1718

PostPosted: Wed Apr 28, 2004 3:16 am    Post subject: Reply with quote

Quote:
TrayTip should be in the next release
... that's great! ... it always positions itself above tray notification area, so absolute placement is no problem... also it has a title & a close button (if title added).
_________________
Back to top
View user's profile Send private message
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Wed Apr 28, 2004 3:22 am    Post subject: Reply with quote

Quote:
also it has a title & a close button (if title added).

Hopefully it will have a timeout Option to auto close the notification, and Label option that if the user clicked on the message it would GoSub to the label. Wink

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Wed Apr 28, 2004 11:11 am    Post subject: Reply with quote

Quote:
Hopefully it will have a timeout Option to auto close the notification, and Label option that if the user clicked on the message it would GoSub to the label.

Great stuff. If it's readily doable I'll try to include it.
Back to top
View user's profile Send private message Send e-mail
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10480

PostPosted: Wed May 12, 2004 3:10 pm    Post subject: Reply with quote

Quote:
and Label option that if the user clicked on the message it would GoSub to the label

I think this is achievable, but according to MSDN it would only work on Windows XP. Is it still something you would use? It'll stay on the list in any event, since I'm sure someone would find it useful.
Back to top
View user's profile Send private message Send e-mail
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Wed May 12, 2004 4:29 pm    Post subject: Reply with quote

Quote:
Is it still something you would use? It'll stay on the list in any event, since I'm sure someone would find it useful.

When you guys mentioned Balloon Help, for some reason I got it stuck in my head that it was like msn messenger popups Embarassed . TrayTip is a very nice addition, and with things only working on 2000/XP I'll take it either way, even though 99% of the PC I remotely manage are still on NT. I'll still use it where I can.

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page 1, 2, 3, 4, 5  Next
Page 1 of 5

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group