Jump to content

Search the Community

Showing results for tags 'windows media player volume'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Hi, I am using windows media player object for my audio player. I need my player to remember the last set volume on the player if possible. I can use an INI file to store the last audio volume but i do not know how to get the current volume to store it on exiting the window. Any help would be appreciated. Regards Ajit #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> ;*** Build GUI: Opt("GUIOnEventMode", 1) #Region ### START Koda GUI section ### Form=C:\WinSpr\AutoIt\_Eigenes\COMStati.kxf $Form1 = GUICreate("Media Player", 600, 400, -1, -1, $WS_SYSMENU) GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close") $File_Path = GUICtrlCreateInput("", 10, 100, 300) $Browse_Btn = GUICtrlCreateButton("...", 315, 100, 20, 20) GUIctrlSetOnEvent($Browse_Btn, "browse") Global $oRP $oRP = ObjCreate("MediaPlayer.MediaPlayer.1") If Not IsObj($oRP) Then MsgBox(48, "ERROR...", "object failed") Exit EndIf $GUIActiveX = GUICtrlCreateObj($oRP, 10, -220, 280, 285) $oRPEvt = ObjEvent($oRP, "MediaPlayer_") With $oRP; Object tag pool .Rate = 10 .AutoStart = False .playcount = 0; 0,1,2,3 .displaysize = True .windowlessVideo = True .showControls = True .EnableContextMenu = True .ShowPositionControls = True ;~ .ShowStatusBar = True .ShowTracker = True .EnableTracker = True .showaudiocontrols = True .EnablePositionControls = True .Enabled = True .ShowDisplay = False .ShowGotoBar = False .Mute = False .Filename = "" ;~ .play ;.Play; .stop .pause ConsoleWrite(.openState & @CRLF); 0 Not ready, 6 Playing ConsoleWrite(.currentPosition) ConsoleWrite(.duration & @CRLF) ConsoleWrite(.PlayState & @CRLF); 0 Stopped, 1 Pause, 2 playing ;~ .SendKeyboardEvents = true .ClickToPlay = False .AutoRewind = False .CurrentPosition = 0 ;.volume = 0; -10000 ;~ .volume = -9000; -10000 ;~ .balance = -10000; -10000 ;~ .AboutBox EndWith GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $oRP.ShowPositionControls = True Consolewrite($oRP.volume & @CRLF) Sleep(100) WEnd Func Form1Close() Exit EndFunc Func browse() $var = FileOpenDialog("Select file to play", @DesktopDir& "\", "Images (*.mp3;*.wav)");, 1 + 4 ) GUICtrlSetData($File_Path, $var ) $oRP.Filename = $var EndFunc
×
×
  • Create New...