AutoHotkey Community

It is currently May 27th, 2012, 1:53 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 68 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
 Post subject: Volume OSD - updated
PostPosted: April 8th, 2004, 11:05 am 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
This script shows volume indicators as volume is increased/decreased using Winkey+Up / Winkey+Down or multimedia keys (the keys can be changed)

Image

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

;___________________________________________


_________________
Image


Last edited by Rajat on June 23rd, 2004, 4:37 pm, edited 5 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 11th, 2004, 12:47 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
I tried it... it's very slick, nice work. I might wind up using a variant of this.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 11th, 2004, 12:57 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
if that variancy is not for some personal reqmt, then do post it! as i use this script regularly, any improvement is welcome! :)

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 14th, 2004, 4:14 pm 
Offline

Joined: March 2nd, 2004, 10:10 pm
Posts: 443
Location: SLC, Utah
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 27th, 2004, 9:08 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
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.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 27th, 2004, 9:13 pm 
Offline

Joined: March 2nd, 2004, 10:10 pm
Posts: 443
Location: SLC, Utah
Chris and Rajat,

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

thanks,
beardboy


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 28th, 2004, 12:30 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 28th, 2004, 12:48 am 
Offline

Joined: March 2nd, 2004, 10:10 pm
Posts: 443
Location: SLC, Utah
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 28th, 2004, 3:27 am 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
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.

_________________
Image


Last edited by Rajat on April 28th, 2004, 4:19 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 28th, 2004, 3:53 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 28th, 2004, 4:16 am 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
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).

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 28th, 2004, 4:22 am 
Offline

Joined: March 2nd, 2004, 10:10 pm
Posts: 443
Location: SLC, Utah
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. ;)

thanks,
beardboy


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 28th, 2004, 12:11 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 12th, 2004, 4:10 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 12th, 2004, 5:29 pm 
Offline

Joined: March 2nd, 2004, 10:10 pm
Posts: 443
Location: SLC, Utah
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 :oops: . 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


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 68 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 14 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group