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 Previous  1, 2
Author Message
 Post subject:
PostPosted: March 25th, 2006, 4:04 am 
Offline

Joined: March 25th, 2006, 1:25 am
Posts: 14
Ok, so I have been messing with this now, added in a mute toggle.

Code:
volume_mute::
  SoundSet, +1,, MUTE
  Gosub, mute
Return

volume_up::
  SoundSet, +1, MASTER
  Gosub, osd
Return

volume_down::
  SoundSet, -1, MASTER
  Gosub, osd
Return

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

mute:
  Transform, volM, Ceil, %volM%
  SoundGet, volM, MASTER
  SoundGet,master_mute,,MUTE
   if master_mute = On
    {
    Gui, Color, 000080
    Gui, font, s20 bold cred, Tahoma
    Gui, Add, text,x0 y0, Mute On
    Gui, Add, Progress, vProgress3 w300 h20 cred Background000000
    Gui, +ToolWindow +AlwaysOnTop -Caption
    Gui, Color, 000080
    Gui, +Lastfound ; Make the GUI window the last found window.
    WinSet, TransColor, 000080 180
    Gui, Show,, Volume Gui
    }
  GuiControl,, Progress3, %volM%
  SetTimer, label, 1000 ;bars are visible for 1 seconds

return

label:
  SetTimer, label, Off
  Gui, Destroy
Return


That version works, but when I try to add an else for what I want it to show when mute is toggled back off I get an error and can't see why.

Heres that code...

Code:
volume_mute::
  SoundSet, +1,, MUTE
  Gosub, mute
Return

volume_up::
  SoundSet, +1, MASTER
  Gosub, osd
Return

volume_down::
  SoundSet, -1, MASTER
  Gosub, osd
Return

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

mute:
  Transform, volM, Ceil, %volM%
  SoundGet, volM, MASTER
  SoundGet,master_mute,,MUTE
   if master_mute = On
    {
    Gui, Color, 000080
    Gui, font, s20 bold cred, Tahoma
    Gui, Add, text,x0 y0, Mute On
    Gui, Add, Progress, vProgress3 w300 h20 cred Background000000
    Gui, +ToolWindow +AlwaysOnTop -Caption
    Gui, Color, 000080
    Gui, +Lastfound ; Make the GUI window the last found window.
    WinSet, TransColor, 000080 180
    Gui, Show,, Volume Gui
    }
  GuiControl,, Progress3, %volM%
  SetTimer, label, 1000 ;bars are visible for 1 seconds

Else
   {
   if master_mute = Off
    {
    Gui, Color, 000080
    Gui, font, s20 bold c87d300, Tahoma
    Gui, Add, text,x0 y0, Mute Off
    Gui, Add, Progress, vProgress4 w300 h20 c87d300 Background000000
    Gui, +ToolWindow +AlwaysOnTop -Caption
    Gui, Color, 000080
    Gui, +Lastfound ; Make the GUI window the last found window.
    WinSet, TransColor, 000080 180
    Gui, Show,, Volume Gui
    }
  GuiControl,, Progress4, %volM%
  SetTimer, label, 1000 ;bars are visible for 1 seconds
   }

return

label:
  SetTimer, label, Off
  Gui, Destroy
Return


Another thing I am thinking about in my head is making ti so if you move the volume up or down while it is muted it will show the progress bar color as red as it moves. That I'll have to figure out later after this else problem is handled.


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

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
With If and Else, the Else has to come straight after the If section.

I made some changes to the code, but using a rather ugly method of destroying the gui before updating the bar (flickers) when muted because I'm not aware of a method to change the colour of a progress bar once it's been created (e.g. by GuiControl).

Hotkey sections are the same as before so I left them off.

Code:
osd:
  SoundGet, muteM, MASTER, mute
  If muteM =On
    {
    Gosub, mute
    Return
    }
  SoundGet, volM, MASTER
  Transform, volM, Ceil, %volM%
  IfWinNotExist, Volume Gui
    {
    Gui, Add, Progress, vProgress1 w300 h20 c87d300 Background000000
    Gui, +ToolWindow +AlwaysOnTop -Caption
    Gui, Color, 000080
    Gui, +Lastfound ; Make the GUI window the last found window.
    WinSet, TransColor, 000080 180
    Gui, Show,, Volume Gui
    }
  GuiControl,, Progress1, %volM%
  SetTimer, label, 2000 ;bars are visible for 2 seconds
Return

mute:
  Transform, volM, Ceil, %volM%
  SoundGet, volM, MASTER
  SoundGet,master_mute,,MUTE

    Gui, Destroy
    Gui, Color, 000080
    If master_mute = On
      {
      Gui, font, s20 bold cred, Tahoma
      Gui, Add, text,x0 y0, Mute On
      Gui, Add, Progress, vProgress1 w300 h20 cred Background000000
      }
    Else
      {
      Gui, font, s20 bold c87d300, Tahoma
      Gui, Add, text,x0 y0, Mute Off
      Gui, Add, Progress, vProgress1 w300 h20 c87d300 Background000000
      }
    Gui, +ToolWindow +AlwaysOnTop -Caption
    Gui, Color, 000080
    Gui, +Lastfound ; Make the GUI window the last found window.
    WinSet, TransColor, 000080 180
    Gui, Show,, Volume Gui
  GuiControl,, Progress1, %volM%
  SetTimer, label, 1000 ;bars are visible for 1 seconds
return

label:
  SetTimer, label, Off
  Gui, Destroy
Return


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

Joined: March 25th, 2006, 1:25 am
Posts: 14
Ok, I added wave and microphone volume controls along with the mutes for both.
Thats the playback mic volume and mute, I don't got a need to mess with the recording one.

Code:
volume_mute::
  SoundSet, +1,, MUTE
  Gosub, mute
Return

^volume_mute::
  SoundSet, +1,MICROPHONE, MUTE
  Gosub, mutemic
Return

+volume_mute::
  SoundSet, +1,WAVE, MUTE
  Gosub, mutewav
Return

volume_up::
  SoundSet, +1, MASTER
  Gosub, osd
Return

volume_down::
  SoundSet, -1, MASTER
  Gosub, osd
Return

+volume_up::
  SoundSet, +1, WAVE
  Gosub, osdwav
Return

+volume_down::
  SoundSet, -1, WAVE
  Gosub, osdwav
Return

^volume_up::
  SoundSet, +1, MICROPHONE
  Gosub, osdmic
Return

^volume_down::
  SoundSet, -1, MICROPHONE
  Gosub, osdmic
Return

osd:
  SoundGet, muteM, MASTER, mute
  If muteM =On
    {
    Gosub, mute
    Return
    }
  SoundGet, muteM, WAVE, mute
  If muteM =On
    {
    Gosub, mutewav
    Return
    }
  SoundGet, muteM, MICROPHONE, mute
  If muteM =On
    {
    Gosub, mutemic
    Return
    }
  SoundGet, volM, MASTER
  Transform, volM, Ceil, %volM%
  IfWinNotExist, Volume Gui
    {
    Gui, Add, Progress, vProgress1 w300 h20 c87d300 Background000000
    Gui, +ToolWindow +AlwaysOnTop -Caption
    Gui, Color, 000080
    Gui, +Lastfound ; Make the GUI window the last found window.
    WinSet, TransColor, 000080 200
    Gui, Show,, Volume Gui
    }
  GuiControl,, Progress1, %volM%
  SetTimer, label, 2000 ;bars are visible for 2 seconds
Return

osdwav:
  SoundGet, volWAV, WAVE
  Transform, volWAV, Ceil, %volWAV%
  IfWinNotExist, VolumeWAV Gui
    {
    Gui, Add, Progress, vProgress2 w300 h20 cffa500 Background000000
    Gui, +ToolWindow +AlwaysOnTop -Caption
    Gui, Color, 000080
    Gui, +Lastfound ; Make the GUI window the last found window.
    WinSet, TransColor, 000080 180
    Gui, Show,, VolumeWAV Gui
    }
  GuiControl,, Progress2, %volWAV%
  SetTimer, label, 2000 ;bars are visible for 2 seconds
Return

osdmic:
  SoundGet, volMIC, MICROPHONE
  Transform, volMIC, Ceil, %volMIC%
  IfWinNotExist, VolumeMIC Gui
    {
    Gui, Add, Progress, vProgress3 w300 h20 c007ebf Background000000
    Gui, +ToolWindow +AlwaysOnTop -Caption
    Gui, Color, 000080
    Gui, +Lastfound ; Make the GUI window the last found window.
    WinSet, TransColor, 000080 180
    Gui, Show,, VolumeMIC Gui
    }
  GuiControl,, Progress3, %volMIC%
  SetTimer, label, 2000 ;bars are visible for 2 seconds
Return

mute:
  Transform, volM, Ceil, %volM%
  SoundGet, volM, MASTER
  SoundGet,master_mute,,MUTE

    Gui, Destroy
    Gui, Color, 000080
    If master_mute = On
      {
      Gui, font, s20 bold cred, Tahoma
      Gui, Add, text,x0 y0, Master Mute On
      Gui, Add, Progress, vProgress1 w300 h20 cred Background000000
      }
    Else
      {
      Gui, font, s20 bold c87d300, Tahoma
      Gui, Add, text,x0 y0, Master Mute Off
      Gui, Add, Progress, vProgress1 w300 h20 c87d300 Background000000
      }
    Gui, +ToolWindow +AlwaysOnTop -Caption
    Gui, Color, 000080
    Gui, +Lastfound ; Make the GUI window the last found window.
    WinSet, TransColor, 000080 180
    Gui, Show,, Volume Gui
  GuiControl,, Progress1, %volM%
  SetTimer, label, 2000 ;bars are visible for 1 seconds
return

mutewav:
  Transform, volWAV, Ceil, %volWAV%
  SoundGet, volWAV, WAVE
  SoundGet,wave_mute,WAVE,MUTE

    Gui, Destroy
    Gui, Color, 000080
    If wave_mute = On
      {
      Gui, font, s20 bold cred, Tahoma
      Gui, Add, text,x0 y0, Wave Mute On
      Gui, Add, Progress, vProgress2 w300 h20 cred Background000000
      }
    Else
      {
      Gui, font, s20 bold cffa500, Tahoma
      Gui, Add, text,x0 y0, Wave Mute Off
      Gui, Add, Progress, vProgress2 w300 h20 cffa500 Background000000
      }
    Gui, +ToolWindow +AlwaysOnTop -Caption
    Gui, Color, 000080
    Gui, +Lastfound ; Make the GUI window the last found window.
    WinSet, TransColor, 000080 180
    Gui, Show,, VolumeWAV Gui
  GuiControl,, Progress2, %volWAV%
  SetTimer, label, 2000 ;bars are visible for 1 seconds
return

mutemic:
  Transform, volMIC, Ceil, %volMIC%
  SoundGet, volMIC, MICROPHONE
  SoundGet,microphone_mute,MICROPHONE,MUTE

    Gui, Destroy
    Gui, Color, 000080
    If microphone_mute = On
      {
      Gui, font, s20 bold cred, Tahoma
      Gui, Add, text,x0 y0, Microphone Mute On
      Gui, Add, Progress, vProgress3 w300 h20 cred Background000000
      }
    Else
      {
      Gui, font, s20 bold c007ebf, Tahoma
      Gui, Add, text,x0 y0, Microphone Mute Off
      Gui, Add, Progress, vProgress3 w300 h20 c007ebf Background000000
      }
    Gui, +ToolWindow +AlwaysOnTop -Caption
    Gui, Color, 000080
    Gui, +Lastfound ; Make the GUI window the last found window.
    WinSet, TransColor, 000080 180
    Gui, Show,, VolumeMIC Gui
  GuiControl,, Progress3, %volMIC%
  SetTimer, label, 2000 ;bars are visible for 1 seconds
return

label:
  SetTimer, label, Off
  Gui, Destroy
Return


Saw thing post HERE that talked about using cancel and show with one GUI to stop or slow flicker but didn't understand it.

In the original it had all the sliters show when one was moved but I am not sure I want to do this with this one. For one if more than one was muted the text would stack or something, so if I did do this I would prolly remove the text and just leave it so the bars muted are red.

I am also thinking of adding text to the left of the bar that says Master, Wave, and Mic. That or little icons, like a little mic, a wave and a speaker.

Getting late, I'll see about working on that tomarrow.
Some cool stuff here, Thank you Evl for helping a nub along the road ;p


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

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
That other script you linked to doesn't try to change the colour of the progress bar at all, so the same method can't be applied. You could try starting a new thread (and link to this thread) and ask if anyone else knows a way of changing the progress bar colour of a bar that's already been created.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2006, 7:18 pm 
Offline

Joined: March 25th, 2006, 1:25 am
Posts: 14
Ahh haaa, found me one, now I just got to get it working on this one.
THIS volume osd changes the color and doesn't flash.

Now I got something to occupy my time while I download today.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2006, 8:11 pm 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
I don't see that it changes the colour of the progress bar?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2006, 8:23 pm 
Offline

Joined: March 25th, 2006, 1:25 am
Posts: 14
The one at the bottom, HERE

Had to change the mute hotkey since I don't have the key listed on mine.
After that once mute is on a a box with mute in it stays on till it is off and if you then move the volume the bar is red not green.
If you move the volume and press mute and the volume gui hasn't died yet and you move the volume again it will keep the color it had.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2006, 8:35 pm 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
Ok I see it now (it was a bit flaky the first time I tried it and it didn't show in red when muted). It looks to still be destroying the gui before it "changes" colour but you can probably just imitate the method or check the state of mute each time and then destroy and recreate the gui if you need to change colour.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2006, 8:39 pm 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
Oh I found the solution to changing the colour of the progress bar here:
http://www.autohotkey.com/forum/viewtop ... lor+colour


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

Joined: March 25th, 2006, 1:25 am
Posts: 14
There is an error in here, don't know where though.
The error causes the wave and microphone progress bars to show whatever the master is at. It also moves the master with the wave or mic depending on which your moving.
I based this non-flashing code off of THIS script by Dactilus. I have clearly made a mistake in here in the process.

I left in the auto reload script that reloads when it detects the save of the script. Clearly marked it.

Other things I am thinking about doing is deciding on weather to use text, icons or both.

Also haven't seen if this is possible yet or not, but if you uncomment line 151 and comment out +0x400000 on line 150 the progress bars still have a border. Anyway to make that go away?

Code:
SetTimer,UPDATEDSCRIPT,1000 ;Remove later Auto reloader on save

;Master hotkey setup
volume_up::
SoundSet +1
SoundSet, +1, master
gosub, mastervol
return

volume_down::
SoundSet -1
SoundSet, -1, master
gosub, mastervol
return

volume_mute::
SoundSet, -0, master, mute
IfWinExist, volume
{
SoundGet, mutemaster, master, mute
if mutemaster = On
{
GuiControl,, Pic1,*icon40 C:\WINDOWS\system32\mmsys.cpl
GuiControl, +cred, MasterProgress
}
else
{
GuiControl, +c87d300, MasterProgress
GuiControl,, Pic1, *icon1 C:\WINDOWS\system32\mmsys.cpl
}
SetTimer,label, 2000
return
}
Gosub, show
Return

;Wave hotkey setup
^volume_up::
SoundSet +1
SoundSet, +1, wave
gosub, wavevol
return

^volume_down::
SoundSet -1
SoundSet, -1, wave
gosub, wavevol
return

^volume_mute::
SoundSet, -0, wave, mute
IfWinExist, volume
{
SoundGet, mutewave, wave, mute
if mutewave = On
{
;GuiControl,, Pic2,*icon40 C:\WINDOWS\system32\mmsys.cpl
GuiControl, +cred, WaveProgress
}
else
{
GuiControl, +cffa500, WaveProgress
;GuiControl,, Pic2, *icon1 C:\WINDOWS\system32\mmsys.cpl
}
SetTimer,label, 2000
return
}
Gosub, show
Return

;Microphone hotkey setup
+volume_up::
SoundSet +1
SoundSet, +1, microphone
gosub, micvol
return

+volume_down::
SoundSet -1
SoundSet, -1, microphone
gosub, micvol
return

+volume_mute::
SoundSet, -0, microphone, mute
IfWinExist, volume
{
SoundGet, mutemic, microphone, mute
if mutemic = On
{
;GuiControl,, Pic3,*icon40 C:\WINDOWS\system32\mmsys.cpl
GuiControl, +cred, MicProgress
}
else
{
GuiControl, +c007ebf, MicProgress
;GuiControl,, Pic3, *icon1 C:\WINDOWS\system32\mmsys.cpl
}
SetTimer,label, 2000
return
}
Gosub, show
Return

;This routine is isolated to avoid icon flashing
mastervol:
IfWinExist, volume
{
SoundGet, master_volume
GuiControl,, MasterProgress, %master_volume%
SetTimer,label, 2000
return
}
Gosub, show
Return

wavevol:
IfWinExist, volume
{
SoundGet, wave_volume
GuiControl,, WaveProgress, %wave_volume%
SetTimer,label, 2000
return
}
Gosub, show
Return

micvol:
IfWinExist, volume
{
SoundGet, mic_volume
GuiControl,, MicProgress, %mic_volume%
SetTimer,label, 2000
return
}
Gosub, show
Return

show:
SoundGet, master_volume
SoundGet, wave_volume
SoundGet, mic_volume
SoundGet, mutemic, microphone, mute
SoundGet, mutemaster, master, mute
SoundGet, mutewave, wave, mute

IfWinNotExist, volume
{
Gui, +ToolWindow -Caption +alwaysontop +0x400000
;Gui, Color, 000000
Gui, +Lastfound ; Make the GUI window the last found window.
WinSet, TransColor, 000001 180
Gui, font, s14 bold cred, Tahoma
Gui, Add, text, x5 y2 ,Master
if mutemaster = On
{
Gui, Add, pic, x7 y22 vPic1 icon40, C:\WINDOWS\system32\mmsys.cpl
Gui, Add, Progress, vMasterProgress xm55 y5 w300 h20 cred Background000000,%master_volume%
}
else
{
Gui, Add, Progress, vMasterProgress xm55 y5 w300 h20 c87d300 Background000000,%master_volume%
Gui, Add, pic, x7 y22 vPic1 icon1, C:\WINDOWS\system32\mmsys.cpl
}

if mutewave = On
{
;Gui, Add, pic, x7 y+22 vPic2 icon40, C:\WINDOWS\system32\mmsys.cpl
Gui, Add, Progress, vWaveProgress xm55 y25 w300 h20 cred Background000000,%wave_volume%
}
else
{
Gui, Add, Progress, vWaveProgress xm55 y25 w300 h20 cffa500 Background000000,%wave_volume%
;Gui, Add, pic, x7 yp+22 vPic2 icon1, C:\WINDOWS\system32\mmsys.cpl
}

if mutemic = On
{
;Gui, Add, pic, x7 y+22 vPic3 icon40, C:\WINDOWS\system32\mmsys.cpl
Gui, Add, Progress, vMicProgress xm55 y45 w300 h20 cred Background000000,%mic_volume%
}
else
{
Gui, Add, Progress, vMicProgress xm55 y45 w300 h20 c007ebf Background000000,%mic_volume%
;Gui, Add, pic, x7 yp+22 vPic3 icon1, C:\WINDOWS\system32\mmsys.cpl
}
Gui, Show, NoActivate h70 w400, volume
}
SetTimer,label, 2000
return

label:
SetTimer,label, off
Gui, destroy

UPDATEDSCRIPT: ;Remove later The rest of the auto reloader on save
FileGetAttrib,attribs,%A_ScriptFullPath%
IfInString,attribs,A
{
  FileSetAttrib,-A,%A_ScriptFullPath%
  SplashTextOn,,,Updated script,
  Sleep,500
  SplashTextOff
  Reload
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 17th, 2009, 2:20 am 
this doesn't flicker as much. also, always shows the text "Mute On" when changing volume and mute is indeed on. briefly shows "Mute Off" when turned off.

Code:
volume_mute::
  SoundSet, +1,, MUTE
  vAction = Mute
  Gosub, osd
Return

volume_up::
  SoundSet, +1, MASTER
  vAction = UpDown
  Gosub, osd
Return

volume_down::
  SoundSet, -1, MASTER
  vAction = UpDown
  Gosub, osd
Return


osd:
Gui 2:Default
SoundGet, muteM, MASTER, MUTE
SoundGet, volM, MASTER
Transform, volM, Ceil, %volM%
If vAction = UpDown
{
   vTime = 2000
}
If vAction = Mute
{
   Gui, Destroy
   vTime = 1000
}
IfWinNotExist, Volume Gui
{
   If muteM = On
         {
            Gui, font, s20 bold cred, Tahoma
            Gui, Add, text,x0 y0, Mute On
            Gui, Add, Progress, vProgress1 w300 h20 cred Background000000            
         }
       else if vAction = Mute
         {
          Gui, font, s20 bold c87d300, Tahoma
          Gui, Add, text,x0 y0, Mute Off
          Gui, Add, Progress, vProgress1 w300 h20 c87d300 Background000000
         }
       else
         {
            Gui, Add, Progress, vProgress1 w300 h20 c87d300 Background000000
         }
}
Gui, +ToolWindow +AlwaysOnTop -Caption
Gui, Color, 000080
Gui, +Lastfound ; Make the GUI window the last found window.
WinSet, TransColor, 000080 180
Gui, Show,, Volume Gui
GuiControl,, Progress1, %volM%
SetTimer, label, %vTime% ;bars are visible for vTime milliseconds
Return


label:
  SetTimer, label, Off
  Gui, 2:Destroy
Return


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 17th, 2009, 4:40 am 
Holy thank you necro, I need to finish messing with this script lol...


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

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