AutoHotkey Community

It is currently May 26th, 2012, 4:41 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 68 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject:
PostPosted: May 13th, 2004, 9:42 am 
Offline

Joined: May 4th, 2004, 6:15 pm
Posts: 68
Try the above script with this line added at top

Code:
CoordMode, ToolTip, Screen


Now click on the taskbar and fire the script with volumeup or down key.

Now click on the desktop and again fire the script.

In my pc the tooltip changed its position according to the active window but it should not happen as the CoordMode for Tooltip is set to Screen.

Is this a problem in AHK or what ???


compuboy_r


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 13th, 2004, 11:56 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
I think since that script was written before CoordMode existed, it adjusts the ToolTip based on the active window. Therefore, if you change to absolute coordinates, it gets messed up because it tries to adjust something that's already been adjusted.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 13th, 2004, 1:58 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
Chris is right... actually i didn't bother updating the script with the new feature, once it was added.

anyways i've updated it now.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 15th, 2004, 8:49 am 
Offline

Joined: May 4th, 2004, 6:15 pm
Posts: 68
Well, I have made some modifications to the script

*** Display Mode Changed to TrayTip
*** Added Mute Detection

Try This

Code:
;_________________________________________________
;_______Volume OSD Script   - Rajat_______________
;_________________________________________________


;_________________________________________________
;_______User Settings_____________________________

;Make customisation only in this area or
;hotkey area only!!


   ;change characters for empty & full bar here
   Full = |
   Empty = -
   
   
;Customise Hotkeys in Hotkey Customisation Section
;(below the next section)



;___________________________________________
;_____Auto Execute Section__________________

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

   SetFormat, float, 0.0
   SetTimer, splashoff, 1000
   SoundGet, currsnd1
   SetTimer, CheckMute, 1000


   ;Building Empty Bar
   Loop, 100
      EmptyBar = %EmptyBar%%Empty%

   Display:
      SoundGet, currsnd
      if currsnd1 <> %currsnd%
      {
         TrayTip,Volume, %curr%  %currsnd1%`% ,,17
         currsnd1 = %currsnd%
      }

      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%
      {
         TrayTip
         SetTimer, SplashOff, off
      }
   return



;___________________________________________
;_____Hotkey Customisation Section__________

; User defined hotkeys here


Volume_Up::         ;comment this line if u uncomment the ones below.
;#up::            ;Uncomment to assign Vol Up to Win-Up
   #MaxHotkeysPerInterval 50
   SoundSet, +1
   SoundGet, currsnd
   mark=0
   curr=%EmptyBar%
   loopup:
   mark += 1
   iflessorequal,mark, %currsnd%,StringReplace, curr, curr,%Empty%,%Full%
   iflessorequal,mark, %currsnd%, goto, loopup
   gosub, display
return


Volume_Down::         ;comment this line if u uncomment the ones below.
;#down::         ;Uncomment to assign Vol Down to Win-Down
   #MaxHotkeysPerInterval 50
   SoundSet, -1       
   SoundGet, currsnd
   mark=0
   curr=%EmptyBar%
   loopdown:
   mark += 1
   iflessorequal,mark, %currsnd%,StringReplace, curr, curr,%Empty%,%Full%
   iflessorequal,mark, %currsnd%, goto, loopdown
   gosub, display
return

;___________________________________________




;__________MUTE DETECTION BY COMPUBOY_R


CheckMute:
SoundGet,checkmute,,MUTE
   if checkmute = On
   {
      TrayTip,Volume,MUTE,,1
      mutetray = yes
   }

   else
   {
      if mutetray = yes
      {
      TrayTip
      mutetray = no
      }

   }

return


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

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
nice!

i'd also tried replacing tooltips with traytips but i've also used traytips for other purposes... and when 2 programs try to use traytips at the same time then strange things happen!

like if an au3 script and an ahk script use them at the same time then traytips get totally confused!

_________________
Image


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

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
The MSDN docs state that if a TrayTip (balloon) is already displayed, any new one must wait until the other one expires before it will show up.

However, the MSDN docs are also fairly wrong about the timeout feature, so it wouldn't surprise me if competing traytips aren't well behaved.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 22nd, 2004, 3:58 pm 
Offline

Joined: May 4th, 2004, 6:15 pm
Posts: 68
I have added mouse support for lowering and increasing the volume.

With This Script u can lower the volume by mouse

Volume Up : Ctrl+Shift+WheelUp
Volume Down : Ctrl+Shift+WheelDown

I have also deactivated the Mute Detection, but for anyone who needs it just uncomment the lines

Line No. 32 : SetTimer, CheckMute, 1000
Line No. 104 : Remove /*
Line No. 128 : Remove */

compuboy_r

Code:
;_________________________________________________
;_______Volume OSD Script   - Rajat_______________
;_________________________________________________


;_________________________________________________
;_______User Settings_____________________________

;Make customisation only in this area or
;hotkey area only!!


   ;change characters for empty & full bar here
   Full = |
   Empty = -
   
   
;Customise Hotkeys in Hotkey Customisation Section
;(below the next section)



;___________________________________________
;_____Auto Execute Section__________________

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

   SetFormat, float, 0.0
   SetTimer, splashoff, 1000
   SoundGet, currsnd1
   ;SetTimer, CheckMute, 1000 //Remove Comment Mark here to enable Mute Detection


   ;Building Empty Bar
   Loop, 100
      EmptyBar = %EmptyBar%%Empty%

   Display:
      SoundGet, currsnd
      if currsnd1 <> %currsnd%
      {
         TrayTip,Volume, %curr%  %currsnd1%`% ,,17
         currsnd1 = %currsnd%
      }

      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%
      {
         TrayTip
         SetTimer, SplashOff, off
      }
   return



;___________________________________________
;_____Hotkey Customisation Section__________

; User defined hotkeys here

^+WheelUp::       
Volume_Up::         ;comment this line if u uncomment the ones below.
;#up::            ;Uncomment to assign Vol Up to Win-Up
   #MaxHotkeysPerInterval 50
   SoundSet, +1
   SoundGet, currsnd
   mark=0
   curr=%EmptyBar%
   loopup:
   mark += 1
   iflessorequal,mark, %currsnd%,StringReplace, curr, curr,%Empty%,%Full%
   iflessorequal,mark, %currsnd%, goto, loopup
   gosub, display
return

^+WheelDown::
Volume_Down::         ;comment this line if u uncomment the ones below.
;#down::         ;Uncomment to assign Vol Down to Win-Down
   #MaxHotkeysPerInterval 50
   SoundSet, -1       
   SoundGet, currsnd
   mark=0
   curr=%EmptyBar%
   loopdown:
   mark += 1
   iflessorequal,mark, %currsnd%,StringReplace, curr, curr,%Empty%,%Full%
   iflessorequal,mark, %currsnd%, goto, loopdown
   gosub, display
return

;___________________________________________


;Also Remove Comment Marks /* and */ to enable mute detection

/*
;__________MUTE DETECTION BY COMPUBOY_R


CheckMute:
SoundGet,checkmute,,MUTE
   if checkmute = On
   {
      TrayTip,Volume,MUTE,,1
      mutetray = yes
   }

   else
   {
      if mutetray = yes
      {
      TrayTip
      mutetray = no
      }

   }

return

*/


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 22nd, 2004, 4:47 pm 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
nice!

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 23rd, 2004, 4:37 pm 
Offline

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

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 19th, 2005, 9:35 pm 
compuboy_r wrote:
Code:
   Display:
      SoundGet, currsnd
      if currsnd1 <> %currsnd%
      {
         TrayTip,Volume, %curr%  %currsnd1%`% ,,17
         currsnd1 = %currsnd%
      }

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

A little bug in compuboy_r code:
TrayTip,Volume, %curr% %currsnd1%`% ,,17
TrayTip,Volume, %curr% %currsnd%`% ,,17
(%currsnd% and not %currsnd1%) ;)

however great program, great script, great all and you are great :)


Report this post
Top
  
Reply with quote  
 Post subject: modification
PostPosted: March 22nd, 2005, 11:52 pm 
Offline

Joined: March 22nd, 2005, 11:41 pm
Posts: 2
Location: Klagenfurt ,AUT
hi, I'm new here, so please be gently ;)

i added a special mute function, which i was inspired to by the cd-player in my car: it doesn't mute to zero but to a lower level.
maybe someone prefers this version of "mute".

Code:
; Silence value
silence = 20

HotKey, #., vol_MasterSilence

vol_MasterUp:
Clip =
SoundSet, +%vol_Step%
Gosub, vol_ShowBars
return

vol_MasterDown:
Clip =
SoundSet, -%vol_Step%
Gosub, vol_ShowBars
return

vol_MasterMute:
Clip =
SoundSet, +1, , mute
return

vol_MasterSilence:
If Clip =
   {
   SoundGet, tmp, Master
   SoundSet, %silence%
   Clip = 1
   }
Else
   {
   SoundSet, %tmp%
   Clip =
   }
Gosub, vol_ShowBars
return


i also have a little question:
is it possible to multiply the current volume level by a factor, e.g. by 0,1 for 10% of current volume level?
thanks


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 23rd, 2005, 1:13 am 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
Make sure you return after the auto-execute, or else it will run into the first label. And for the 10%, simply run it on the tmp variable (the current volume):

Code:
tmp/=10


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 23rd, 2005, 1:37 am 
Offline

Joined: March 22nd, 2005, 11:41 pm
Posts: 2
Location: Klagenfurt ,AUT
thanks for the fast reply jonny, have changed it to:
Code:
HotKey, #Up, vol_MasterUp      ; Win+UpArrow
HotKey, #Down, vol_MasterDown
HotKey, #-, vol_MasterMute
HotKey, #., vol_MasterSilence

vol_MasterUp:
Clip =
SoundSet, +%vol_Step%
Gosub, vol_ShowBars
return

vol_MasterDown:
Clip =
SoundSet, -%vol_Step%
Gosub, vol_ShowBars
return

vol_MasterMute:
Clip =
SoundSet, +1, , mute
return

vol_MasterSilence:
If Clip =
   {
   SoundGet, tmp, Master
   tmp/=5
   SoundSet, %tmp%
   Clip = 1
   }
Else
   {
   tmp*=5
   SoundSet, %tmp%
   Clip =
   }
Gosub, vol_ShowBars
return


btw. this is not the whole script, just the part, that i changed


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 23rd, 2005, 2:10 am 
Offline

Joined: March 12th, 2005, 7:57 pm
Posts: 15
Rajat--

I still use your other volume control script with the progress bars (love it, by the way, thanks). What's the advantage of this one over the other one you wrote?

--David


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 23rd, 2005, 9:43 am 
Offline

Joined: March 28th, 2004, 3:53 pm
Posts: 1870
there have been many mods since the original VolOSD i wrote... some add mute detection, some use gui etc. use the one u prefer.

_________________
Image


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 Previous  1, 2, 3, 4, 5  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: JamixZol, Yahoo [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