Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Play or Bee volume
#1
is there a way for Play or Bee to play a file at a certain volume without affecting any other apps?
An old blog on QM coding and automation.

The Macro Hook
#2
Set bee volume:
Macro
Code:
Copy      Help
int v=10 ;;0 - 100
v=v*0xffff/100; waveOutSetVolume(0 v<<16|v)

bee "$windows$\media\notify.wav"

;waveOutSetVolume(0 0xffffffff) ;;restores to 100%. Use here only if bee is with +.

XP: Changes volume for all programs. Cannot only for QM.
Vista: Changes volume only for QM. Also, only if bee "file", but not if bee or bee 1 etc.

----------
Set Play volume:
Macro
Code:
Copy      Help
Play 1 "Q:\mp3\Ataraxia\09 - Fengari.mp3" 1

#compile MP_Dialog
MediaPlayer.MediaPlayer me99._getcontrol(id(99 __hwndmp))
me99.Volume=-300 ;;0 max, -602 default (middle)

;mute
;10
;me99.Mute=TRUE
;2
;me99.Mute=0

Always sets only for QM.
#3
works great.
thanks.
An old blog on QM coding and automation.

The Macro Hook
#4
am i implementing this wrong? It gives me a syntax error when i use this code.


Function Background_Noise
Code:
Copy      Help
int+ projtimer
rep
,wait 0 V projtimer
,Play 4 "C:\qm\Desktop\New_Rain30s.mp3" 1
,#compile MP_Dialog
,MediaPlayer.MediaPlayer me99._getcontrol(id(99 __hwndmp))
,me99.Volume=-502 ;;0 max, -602 default (middle)
,wait 0 -V projtimer
,Play 4 "C:\qm\Desktop\New_Rain30s.mp3" -1
An old blog on QM coding and automation.

The Macro Hook
#5
#compile and other #xxx must be without tabs. This will not end rep.
#6
awesome...works great!
An old blog on QM coding and automation.

The Macro Hook


Forum Jump:


Users browsing this thread: 1 Guest(s)