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 

Help Needed *Volume OSD has a blinking Progress Bar*

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
DominicTFY



Joined: 05 Dec 2004
Posts: 10

PostPosted: Thu Dec 09, 2004 8:03 am    Post subject: Help Needed *Volume OSD has a blinking Progress Bar* Reply with quote

Hi again guys...Sori 4 posting so many questions these few days.
I completed my Volume OSD but it has a blinking progress Bar
I used Gui's Progress Bar and Picture function together.
I dun wanna use SplashImage becuz it has displays the white background awhile b4 it goes transparent.(hope it can be solved Smile )
How can i solve the problem while still allowing me to change the volume and display the correct volume almost instantly(w/o having to wait with the presence of "sleep") and that both the image and the progress bar do not blink?
The Image used is just below.

Code:
;Dominic Tay
;Volume Control via OSD

^=::
SoundSet, +10
Gosub, OSD
return

^-::
SoundSet, -10
Gosub, OSD
return

OSD:
SoundGet, Volumelvl
Gui, Color, FFFFFF
IfWinNotActive, %A_ScriptName%
{
Gui, add, pic, vMyImage, Image2.bmp
Gui, add, Progress, vMyProgress h40 w520 x50 y68, %Volumelvl%
DetectHiddenWindows on
WinWait, %A_ScriptName%
WinSet, Transcolor, FFFFFF 200
WinSet, AlwaysOnTop, On
Gui, -Caption
Gui, show, Center
SetTimer, UpdateOSD, 600
}
else
{
GuiControl,, MyImage, Image2.bmp
SetTimer, UpdateOSD,10
}
SetTimer,GuiDestroy, 600

UpdateOSD:

SoundGet, Volumelvl1
GuiControl,,MyProgress, %Volumelvl1%
SetTimer, UpdateOSD, Off
return

GuiDestroy:
SetTimer, GuiDestroy, off
Gui, Destroy
return
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10464

PostPosted: Fri Dec 10, 2004 2:13 pm    Post subject: Reply with quote

Quote:
I completed my Volume OSD but it has a blinking progress Bar
Try creating the GUI window only once (at the top of the script). Then hide/show it via "Gui Cancel" and "Gui Show" rather than destroying it every time. To change the position of an existing progress bar in a way that minimizes blinking/flashing, use GuiControl as in this example:

GuiControl,, MyProgress, %Volumelvl%
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
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