DominicTFY
Joined: 05 Dec 2004 Posts: 10
|
Posted: Thu Dec 09, 2004 8:03 am Post subject: Help Needed *Volume OSD has a blinking Progress Bar* |
|
|
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 )
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 |
|
|
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10464
|
Posted: Fri Dec 10, 2004 2:13 pm Post subject: |
|
|
| 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% |
|