ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

windows volume control setting

<< < (3/4) > >>

techidave:
Thanks Lanux for your "setwav" box, but can/could it be added to the startup folder?

Target, a coder I am not.  I have looked at the authotkey website several times but do not understand much of what they talk about.  So compiling code is out of the question for me.

lanux128:
Thanks Lanux for your "setwav" box, but can/could it be added to the startup folder?-techidave (July 08, 2008, 09:57 PM)
--- End quote ---

actually, i meant to say that i'm working on it. ;) this is how it'll work: upon startup, the script will retrieve and set the WAVE volume from an INI file. if it doesn't find the INI file then it'll ask for the input then save the value for the following boot-ups. what do you think?

lanux128:
btw, here is the source for those interested..


--- ---; Set wave volume upon startup
; Source: hxxp://www.donationcoder.com/forum/index.php?topic=13989.0
; Note: compile the script to get the startup link working
#SingleInstance, force
#NoEnv
SendMode, Input

appname=SetWav
ini_file=%appname%.ini
Gosub, Get_INI
If WavLevel <> 0
  {
  FileCreateShortcut, %A_WorkingDir%\%appname%.exe, %A_StartupCommon%\%appname%.lnk, %A_WorkingDir%
  GoSub SetWave
  }
Else
  {
  ;other tasks here..
  }
Return

SetWave:
  SoundSetWaveVolume, %WavLevel%
  TrayTip,%appname%,Current wave volume: %WavLevel%,,1
  Sleep, 5000
  GoSub GuiEscape ;exit
Return

Get_INI:
IfNotExist, %ini_file%
{
  GoSub, ShowGUI
}
Else
{
  IniRead,WavLevel,%ini_file%,Settings,WavLevel,100
  If WavLevel>100
    WavLevel=100
}
Return

ShowGUI:
Gui, +ToolWindow
Gui, Add, GroupBox, x6 y6 w140 h54, Enter WAV level: (0-100)`%
Gui, Add, Edit, x16 y30 w80 h20 vNewWavVol Limit3 Number,
Gui, Add, Button, x100 y30 h20 Default, OK
Gui, Show, , %appname%
Return

GuiClose:
ButtonOK:
  Gui, Submit
  comments=
  comments=`;%A_Space%Ini settings for SetWav script.
  comments=%comments%`n`;%A_Space%
  comments=%comments%`n`;%A_Space%This file contains the configurable settings.
  comments=%comments%`n`;%A_Space%--------------------------------------
  comments=%comments%`n`;%A_Space%You may edit this file but not while the script is running.
  comments=%comments%`n`;
  FileAppend,%comments%,%ini_file%
  If NewWavVol>100
    NewWavVol=100
  IniWrite,%NewWavVol%,%ini_file%,Settings,WavLevel
  FileAppend,`n,%ini_file% 
Return

GuiEscape:
ExitApp

Target:
not to trump lanux here, his app sounds more a little more capable???

the attached zip file includes the setsound script and the aforementioned sound card analysis script both compiled and ready to go

Setsound_50.exe does what it says, sets the master and wave volumes at 50% then closes (50% was a nominal figure - if you want something else let us know).  Copy it to your startup folder and that should be it...

EDIT: updated the setsound script to toggle the mute status off (if it's already on...)

techidave:
thank you  Lanux and Target for your apps!  I will give them a try.

Dave

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version