Volume Meter Flickers Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
Epialis
Posts: 858
Joined: 02 Aug 2020, 22:44

Volume Meter Flickers

18 Nov 2020, 16:15

Hey all, blessings...

Is there a way to not have the volume meter flickering behind a progress bar? I do have the volume meter hidden using guicontrol, until the progress bar is finished loading, but it still flickers when the progress is loading everything up. You can see it flickering behind the progress bar.

Not sure if anyone else has had this problem. I searched but couldn't find anything.

On a side note, everything else that is hidden doesn't show or flicker; as in buttons and edits and such. Just the volume meter.

Thank you.

Code: Select all

SoundGet,Volume
Gui, Font, bold, s10
Gui, Add, Slider, x433  y5 w315 h22 Right Right  Range0-100 gVol vSet ToolTip NoTicks,% Volume

; Right after this I put this to hide it until progress bar is done loading:
GuiControl, +hidden, set

; Then I hide the progress bar and unhide the buttons, edits and such.

Sleep 1000
GuiControl, +cGreen, MyProgress
GuiControl,, Text, %Max% Videos Loaded From File
Progress, Off
Sleep, 4000
GuiControl, +Hidden, MyProgress
GuiControl, +Hidden, Text
GuiControl, -Hidden, Edit2
GuiControl, -Hidden, Button3
GuiControl, -hidden, set
GuiControl, -hidden, myDropDownList
GuiControl, -hidden, nodrop
GuiControl, -hidden, nodrop2
Return
I was thinking, would I have to just not add the volume bar until after the progress bar is done? But that doesn't fix it.. just a work around

Blessings
User avatar
Tigerlily
Posts: 377
Joined: 04 Oct 2018, 22:31

Re: Volume Meter Flickers  Topic is solved

18 Nov 2020, 16:43

@Epialis

try to make the volume meter transparent with

WinSet, Transparent, 0, Volume Meter WinTitle [docs]

Cheers,
tigerlily
Last edited by Tigerlily on 18 Nov 2020, 16:45, edited 1 time in total.
-TL
User avatar
Epialis
Posts: 858
Joined: 02 Aug 2020, 22:44

Re: Volume Meter Flickers

18 Nov 2020, 18:18

@Tigerlily

Code: Select all

SoundGet,Volume
Gui, Font, bold, s10
Gui, Add, Slider, x433  y5 w315 h22 Right Right  Range0-100 gVol HwndTrans vSet ToolTip NoTicks,% Volume

WinSet, Transparent, 0, ahk_id %Trans% 
GuiControl, +hidden, set
Thanks for the response! Doesn't appear to make any changes with the flickering.

Code: Select all

WinSet, Transparent, 50, ahk_id %Trans%
This works, but the flickering is still showing behind the progress bar. It just makes it transparent after the bar is over.
User avatar
Xtra
Posts: 2744
Joined: 02 Oct 2015, 12:15

Re: Volume Meter Flickers

18 Nov 2020, 22:58

try using:
Gui, +E0x02000000 +E0x00080000 ; WS_EX_COMPOSITED & WS_EX_LAYERED => Double Buffer

from here:
https://www.autohotkey.com/boards/viewtopic.php?t=77668&p=337765
User avatar
Epialis
Posts: 858
Joined: 02 Aug 2020, 22:44

Re: Volume Meter Flickers

19 Nov 2020, 00:22

Xtra wrote:
18 Nov 2020, 22:58
try using:
Gui, +E0x02000000 +E0x00080000 ; WS_EX_COMPOSITED & WS_EX_LAYERED => Double Buffer

from here:
https://www.autohotkey.com/boards/viewtopic.php?t=77668&p=337765
Thank you for your response. I implemented the code but it makes the progress bar completely disappear as well as the buttons on the GUI.
The black at the top is where the progress bar should be... then the buttons should show numbers on them.
capture5.jpg
capture5.jpg (16.58 KiB) Viewed 719 times
capture6.jpg
capture6.jpg (25 KiB) Viewed 717 times
User avatar
Epialis
Posts: 858
Joined: 02 Aug 2020, 22:44

Re: Volume Meter Flickers

19 Nov 2020, 00:32

See the white spot there? That's the volume meter flickering through the progress bar.
capture8.jpg
capture8.jpg (21.68 KiB) Viewed 712 times
User avatar
Xtra
Posts: 2744
Joined: 02 Oct 2015, 12:15

Re: Volume Meter Flickers

19 Nov 2020, 02:23

You could try creating as hidden:
Gui, Add, Slider, x433 y5 w315 h22 Right Right Range0-100 gVol vSet ToolTip NoTicks +Hidden,% Volume

When a control is hidden it shouldnt be causing any issues do you have something else going on when updating the progress bar?
User avatar
Epialis
Posts: 858
Joined: 02 Aug 2020, 22:44

Re: Volume Meter Flickers

19 Nov 2020, 02:48

Xtra wrote:
19 Nov 2020, 02:23
You could try creating as hidden:
Gui, Add, Slider, x433 y5 w315 h22 Right Right Range0-100 gVol vSet ToolTip NoTicks +Hidden,% Volume

When a control is hidden it shouldnt be causing any issues do you have something else going on when updating the progress bar?
The only thing I have before are just buttons and edit fields, all of which are hidden until the progress bar is done. So I have it set to hidden already.

Code: Select all

Gui, New, +LastFound +Resize
Gui, Margin, 10, 10
;Gui, Add, Picture, w75 h25 y1 +BackgroundTrans vnodrop gAddVideo, addvid.jpg
Gui, Add, Button, hidden w75 h24 y5 gAddVideo vnodrop, Add Video
Gui, Color,, AE7F7A ; Background Color For The Edit Boxes
Gui, Font, bold cBlack ; Text Color For Typing In Edit Boxes
Gui, Add, Edit, hidden -E0x200 +Border x+5 yp-0 hp-2 w200 h23 hwndEdit1Hwnd vnodrop2
Gui, Add, Button, hidden x+15 yp+0 hp-2 w70 h24 gFilter hidden vnodrop1, Filter
Gui, Add, Edit, -E0x200 +Border x755 yp-1 hp-2 w250 h23  hwndEdit2Hwnd gFilter hidden vnodrop3
Gui, Add, Button, x+7 yp-1 hp-2 w22 h24 gClearFilter hidden vnodrop4, X
gui, font
Gui, color, 4d0000
Gui +Resize +MinSize835x600 

; ************************************************** VOLUME SLIDER ***********************************************************
SoundGet,Volume
;Gui, +E0x02000000 +E0x00080000
Gui, Font, bold, s10
Gui, Add, Slider, x433 y5 w315 h22 Right Right  Range0-100 gVol HwndTrans vSet ToolTip NoTicks,% Volume
; ************************************************** VOLUME SLIDER ***********************************************************

;************************************* HIDE VOLUME SLIDER UNTIL DONE LOADING SONGS *************************************************
;WinSet, Transparent, 0, ahk_id %Trans%
GuiControl, +hidden, set
;************************************* HIDE VOLUME SLIDER UNTIL DONE LOADING SONGS *************************************************
Specifically this line:

Code: Select all

GuiControl, +hidden, set
User avatar
Epialis
Posts: 858
Joined: 02 Aug 2020, 22:44

Re: Volume Meter Flickers

19 Nov 2020, 08:03

Okay I figured out the real culprit. It's the text area for the percentage on the progress bar.

Code: Select all

SetFormat, Float, 1.1
Gui, Font, S11
Gui, Add, Progress, x10 y3 w1025 h25 +Smooth vBarVal +Background0xFBF1E5 +cFFFFFF +cGreen +Range0-%Max% vMyProgress
Gui, Add, Text, x350 y8 w350 h15 +BackgroundTrans +Center +cBlack vText, % "0%"
I haven't found a work around... the flickering is on line 4.
User avatar
Epialis
Posts: 858
Joined: 02 Aug 2020, 22:44

Re: Volume Meter Flickers

19 Nov 2020, 08:19

Okay, a work around. Not sure I like the light transparent greenish color instead of normal green, but it does work. Thx for all the ideas, I do appreciate them. They led me in the right direction. Blessings.

Code: Select all

SetFormat, Float, 1.1
Gui, Font, S13 bold
Gui, Add, Progress, x10 y3 w1025 h25 +Smooth vBarVal +Background0xFBF1E5 +cFFFFFF +cGreen +Range0-%Max% vMyProgress
Gui, Add, Text, x10 y6 w1025 h20 +Center +cBlack HwndTesting vText, % "0%"
WinSet, Transparent, 100, ahk_id %Testing%

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: dunnerca, wilkster and 121 guests