AutoHotkey Community

It is currently May 27th, 2012, 10:05 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: October 10th, 2004, 5:24 am 
I guess it may interest new users.
The new AHK version is using the XP look to draw GUI elements( looks much better ),
but those nice colorfull bars showed by
scripts are now default system scheme bars.
I wanted a volume osd showing colored bars again.
case somebody is interested this is a much(much or very??) simplified version of Rajat's
Volume On-Screen-Display (OSD)
This script was made specifically for TPF Display font, to use others fonts you must edit it.
Code:
volume_up::
SoundSet, +1, MASTER
Gosub, osd
Return
+volume_up::
SoundSet, +1, WAVE
Gosub, osd
Return
volume_down::
SoundSet, -1, MASTER
Gosub, osd
Return
+volume_down::
SoundSet, -1, WAVE
Gosub, osd
Return

osd:
SoundGet, ?volM, MASTER
SoundGet, ?volW, WAVE
Transform, ?volM, Ceil, %?volM%
Transform, ?volW, Ceil, %?volW%
?full = IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII
IfWinNotExist, volumeMASTER
{
   StringLeft, ?barM, ?full, %?volM%
   StringLeft, ?barW, ?full, %?volW%
   Progress,1: B H26 W790 ZH0 C0 ZX0 ZY0 FS22 CTE0932F CWblack, , , volumeMASTER,TPF Display
   WinGetPos, , ?wY, , , volumeMASTER
   ?wY += 26
   Progress,2: B Y%?wY% H26 W790 ZH0 C0 ZX0 ZY0 FS22 CTred CWblack, , , volumeWAVE,TPF Display
   Progress, 1:, %?volM%--%?barM%
   Progress, 2:, %?volW%--%?barW%
}
Else
{
   StringLeft, ?barM, ?full, %?volM%
   StringLeft, ?barW, ?full, %?volW%
   Progress, 1:, %?volM%--%?barM%
   Progress, 2:, %?volW%--%?barW%
}

SetTimer, label, 2000 ;bars are visible for 2 seconds
Return
label:
SetTimer, label, Off
Progress, 1:Off
Progress, 2:Off
Return

You can find TPF Display font here
http://www.dafont.com/en/voir.php?libelle=TPF+Display


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 10th, 2004, 2:23 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Quote:
but those nice colorfull bars showed by scripts are now default system scheme bars.
Thanks for mentioning it. I've found a way to fix this and in the next version, the bars will obey colors as they originally did.

If you find any other controls no longer work the way they originally did under a Windows XP theme, please let me know. One other example I've found is checkbox/radio text, which no longer obeys the specified font color.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 10th, 2004, 3:28 pm 
Offline

Joined: August 26th, 2004, 3:11 pm
Posts: 80
Location: Chelsea - MA, USA
Maybe you should create an option to choose between having the Windows theme or not.

_________________
Working now on:
NumpadMouse v2 (Draw)
top-recode project (private server script) (pkodev)


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

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Thanks. For the next release, there will be a "Gui -Theme" command that causes all subsequently created controls in that window to use the classic theme. This effect can later be turned off via "Gui +Theme".

Perhaps there is a way to choose a specific/named theme as well, but if difficult to implement, that is probably a little to advanced to be a high priority.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 10th, 2004, 9:25 pm 
Quote:
I've found a way to fix this and in the next version, the bars will obey colors as they originally did.

Will be great, but for volume osd the script I posted looks much better than bars.
Give it a try with the tpf display font, it may surprise you.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2004, 7:52 am 
It's really a pretty OSD THX.
What about a vertical one


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2004, 1:19 pm 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
I'll add "vertical progress bars" to the list. Thanks.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 13th, 2004, 8:33 pm 
yesss,vertical bass and treble
editing a font right now, dificult job when finished it'll look better then tfp display
In fact I'm editing tfp display :D


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 14th, 2004, 12:40 am 
Offline

Joined: October 12th, 2004, 11:34 pm
Posts: 74
Location: São Paulo ,Brazil
I tried one script with vertical bars but I did not find an adequate font.
Guess the only way is to make|edit a font, maybe with something like a horizontal version
of TPF Display "I".
Hey "guest", will you share your font with us??


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 14th, 2004, 2:23 am 
Offline

Joined: October 12th, 2004, 11:34 pm
Posts: 74
Location: São Paulo ,Brazil
volume osd using TPF display:
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 14th, 2004, 3:11 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Thanks for the illustration. It is a nice look.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2006, 1:26 am 
Offline

Joined: March 25th, 2006, 1:25 am
Posts: 14
I can't figure out for the life of me how to make if so the background can be transparent...
Anybody?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2006, 1:30 am 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
I think you'd need to change the script to have the progress bars in a Gui window first.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2006, 1:31 am 
Offline

Joined: March 25th, 2006, 1:25 am
Posts: 14
I know nothing, so I guess I'll stick with what I got for now.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2006, 2:37 am 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
Here's a basic example:

Code:
#Up::
  SoundSet, +1, MASTER
  Gosub, osd
Return

#Down::
  SoundSet, -1, MASTER
  Gosub, osd
Return

osd:
  SoundGet, volM, MASTER
  Transform, volM, Ceil, %volM%
  IfWinNotExist, Volume Gui
    {
    Gui, Add, Progress, vProgress1 w300 h20 cBlue BackgroundEEAA99 -Smooth
    Gui, +ToolWindow +AlwaysOnTop -Caption
    Gui, Color, EEAA99
    Gui, +Lastfound ; Make the GUI window the last found window.
    WinSet, TransColor, EEAA99
    Gui, Show,, Volume Gui
    }
  GuiControl,, Progress1, %volM%
  SetTimer, label, 2000 ;bars are visible for 2 seconds
Return

label:
  SetTimer, label, Off
  Gui, Destroy
Return


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 23 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