keashdoc Posted January 27, 2023 Posted January 27, 2023 Hi, I want to launch a .m4a audio file using the default Media Player. I want the Media Player to run minimized / hidden and not be displayed. I only want to hear the audio without the Media Player being displayed. I tried this but Windows Media Player still pops up in the foreground. ShellExecute("c:\myaudio.m4a", "", "", "", @SW_MINIMIZE) Any suggestions would be greatly appreciated Kris
Nine Posted January 28, 2023 Posted January 28, 2023 Don't fight with external software, just use its COM OCX. Local $sFullPath = "C:\Applications\AutoIt\WASApi\The Rolling Stones\The Rolling Stones - Lady Jane.mp3" Local $oPlayer = ObjCreate("WMPlayer.OCX") $oPlayer.URL = $sFullPath $oPlayer.Controls.Play Sleep(1000) ; Let enough time to start While $oPlayer.playState = 3 ; 1 - stopped, 2 - paused, 3 - playing Sleep(100) WEnd “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
keashdoc Posted January 28, 2023 Author Posted January 28, 2023 You are awesome. Thank you so much Nine. That worked perfectly!!!!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now