Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/18/2023 in all areas

  1. CYCho

    WINMM.DLL Media Player

    I recently bumped into winmm.dll and found that it was the resource file of Sound.au3 UDF for all of its audio functions. I was interested in learning its video funtions as well to find if it could replace WMPlayer.OCX in my zPlayer. I have been a bit dissatisfied with WMPlayer object because it required a resizing process for a simple toggle between play and pause. This made the video to flicker and it was annoying. That was the reason for going back to the earlier version of zPlayer, knowing that WMPlayer object embedded in IE may not be supported by Windows in the near future. Edit: Attached is a media player based on wimm.dll. Much of the time I spent to make this player was on video playback. I foresee that this player will ultimately be the future version of my zPlayer. I had a lot of fun working on this. And I have to say thank you to many of forum members for helping me out when I had difficulties. If an error is found, I would expect that you would kindly let me know. If you download the latest version, hopefully the error would have been corrected already. (File updated on August 15, 2023) ==> Please visit here for the latest update. WINMM.DLL Media Player.zip
    2 points
  2. AutoBert

    full screen gui

    ESC insn't colsing the script. and script has also bad coding practice defining global var in a loop. Add this: #AutoIt3Wrapper_AU3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 and have a look in the console output. So i prefer to do i this way: ; https://www.autoitscript.com/forum/topic/210078-full-screen-gui/?do=findComment&comment=1516762 #AutoIt3Wrapper_AU3Check_Parameters=-q -d -w 1 -w 2 -w 3 -w 4 #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> #include <GUIConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region (=== GUI generated by GuiBuilderPlus 1.0.0-beta4 ===) Global $hGUI = GUICreate("MyGUI", 400, 350, 760, 365, -1, -1) Global $idFullScreen = GUICtrlCreateDummy() #EndRegion (=== GUI generated by GuiBuilderPlus 1.0.0-beta4 ===) _GDIPlus_Startup() ; ========== USED TO ADD PICTURE IN MEMORY ==================== Global Const $Pic_Banner = _GDIPlus_BitmapCreateFromMemory(_vista(), True) ; ============================================================= OnAutoItExitRegister("_Exit") _main() ;------------------------------------------------------------------------------ ; Title...........: _main ; Description.....: run the main program loop ;------------------------------------------------------------------------------ Func _main() GUISetState(@SW_SHOW) Local $aAccelKeys[1][2] = [["{F11}", $idFullScreen]] GUISetAccelerators($aAccelKeys) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idFullScreen _FullScreen() Case Else ; EndSwitch ;Sleep(10) WEnd EndFunc ;==>_main ;------------------------------------------------------------------------------ Func _FullScreen() Local Static $aWPos, $aGUIStyle = GUIGetStyle($hGUI), $iFullScreen = 0 If $iFullScreen = 0 Then $aWPos = WinGetPos($hGUI) WinMove($hGUI, "", 0, 0, @DesktopWidth, @DesktopHeight) Local $Pic1 = GUICtrlCreatePic("", 0, 0, @DesktopWidth, @DesktopHeight) _WinAPI_DeleteObject(GUICtrlSendMsg($Pic1, $STM_SETIMAGE, $IMAGE_BITMAP, $Pic_Banner)) GUISetStyle(BitOR($WS_POPUP, $WS_EX_TOPMOST), -1) $iFullScreen = 1 Else WinMove($hGUI, "", $aWPos[0], $aWPos[1], $aWPos[2], $aWPos[3]) GUISetStyle($aGUIStyle[0], $aGUIStyle[1]) $iFullScreen = 0 EndIf EndFunc ;==>_FullScreen ;------------------------------------------------------------------------------------- Func _exit() ;_WinAPI_DeleteObject($Pic_Banner) _GDIPlus_Shutdown() Exit EndFunc ;==>_exit ;------------------------------------------------------------------------------------- ;Code below was generated by: 'File to Base64 String' Code Generator v1.20 Build 2020-06-05 ESC is closing GUI and no warnings or errors in console.
    1 point
  3. mike1950r, Surely the thing to do is to correct the "personal library" to remove the error causing the problem? M23 Edit: water beat me to it!
    1 point
  4. Why not check the library first and when there are no errors then check all scripts using the library?
    1 point
  5. ptrex

    WINMM.DLL Media Player

    Maybe this can help
    1 point
  6. Skeletor

    WINMM.DLL Media Player

    Also maybe you want to center the GUI Global $hGUI, $guiWidth = 320, $guiHeight = 60, $guiMsg, $idTitle, $idStreamed, $idSlider, $idLength, $idRandom, $idPlay Global $idPrevious, $idRepeat, $idNext, $idUp, $idDown, $idFile, $idFolder, $idNotes $hGUI = GUICreate("WINMM.DLL Media Player", $guiWidth, $guiHeight, (@DesktopWidth - $guiWidth) /2, (@DesktopHeight - $guiHeight) /2) ; Main GUI
    1 point
  7. Skeletor

    WINMM.DLL Media Player

    I ran into an issue where it could not play the file due to a codec issue, however instead of exting the program, rather return back to the main gui. Else $sMsg = $sFile & @CRLF & @CRLF $sMsg &= "This file cannot be loaded by this player. Please check if proper codec is installed." & @CRLF & @CRLF $sMsg &= "Do you want to try again?" Local $iRes = MsgBox(4, "Load error", $sMsg) If $iRes = 7 Then GUICtrlSetState($idFolder, $GUI_Enable) Return _WinAPI_SetWindowPos($vcGUI, $HWND_BOTTOM, Default, Default, Default, Default, BitOR($SWP_NOACTIVATE, $SWP_SHOWWINDOW, $SWP_NOMOVE, $SWP_NOSIZE )) Else GUICtrlSetState($idFile, $GUI_Enable) GUICtrlSetState($idFolder, $GUI_Enable) Return EndIf EndIf To me, when the program asks to try again, it will do so on the same file, when you state No, you telling it you want to load a different file.
    1 point
  8. Good catch @KaFu. Per help file on _ClipBoard_SetDataEx.
    1 point
  9. i think with If FileExists("E:\") you can check if is in use #include <WinAPIFiles.au3> #include <GUIConstantsEx.au3> #include <GuiListBox.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> Example() Func Example() Local $idListBox, $CurPos, $CurDRIVE ; Create GUI GUICreate("List Box DRIVES", 400, 296) $idListBox = GUICtrlCreateList("", 2, 2, 396, 296, BitOR($WS_VSCROLL, $WS_BORDER, $LBS_NOTIFY)) GUICtrlSetFont(-1, 12, 400, 0, "Tahoma") GUISetState(@SW_SHOW) _GUICtrlListBox_Dir($idListBox, "", $DDL_DRIVES, False) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idListBox $CurPos = _GUICtrlListBox_GetCurSel($idListBox) $CurDRIVE = _GUICtrlListBox_GetText($idListBox, $CurPos) ;------------------------------------------------------------ ConsoleWrite('****************************' & @CRLF) ConsoleWrite($CurDRIVE) If FileExists($CurDRIVE & "\") Then ConsoleWrite(" FileExists " & @CRLF) Local $aData = _WinAPI_GetDiskFreeSpaceEx($CurDRIVE & "\") ConsoleWrite('Total free space on ' & $CurDRIVE & "\" & ' => ' & $aData[2] & ' bytes' & @CRLF) Else ConsoleWrite(" File Not Exists " & @CRLF) EndIf ;------------------------------------------------------------ Local $sMessage, $iTypeOfDrive = _WinAPI_GetDriveType($CurDRIVE & "\") Switch $iTypeOfDrive Case $DRIVE_UNKNOWN $sMessage = "The drive type cannot be determined." Case $DRIVE_NO_ROOT_DIR $sMessage = "The root path is invalid." Case $DRIVE_REMOVABLE $sMessage = "The drive is removable media." Case $DRIVE_FIXED $sMessage = "The drive is a fixed drive." Case $DRIVE_REMOTE $sMessage = "The drive is a remote (network) drive." Case $DRIVE_CDROM $sMessage = "The drive is a CD-ROM drive." Case $DRIVE_RAMDISK $sMessage = "The drive is a RAM disk." EndSwitch ConsoleWrite($sMessage & @CRLF) ;------------------------------------------------------------ Local $aData = _WinAPI_GetVolumeInformation($CurDRIVE & "\") If Not @error Then ConsoleWrite('Volume name: ' & $aData[0] & @CRLF) ConsoleWrite('File system: ' & $aData[4] & @CRLF) ConsoleWrite('Serial number: ' & $aData[1] & @CRLF) ConsoleWrite('File name length: ' & $aData[2] & @CRLF) ConsoleWrite('Flags: 0x' & Hex($aData[3]) & @CRLF) EndIf ;------------------------------------------------------------ ConsoleWrite("" & @CRLF) EndSwitch WEnd GUIDelete() EndFunc ;==>Example
    1 point
  10. #include <WinAPIFiles.au3> _WinAPI_GetDriveNumber ( $sDrive ) _WinAPI_GetDriveType ( [$sDrive = ''] ) _WinAPI_GetVolumeInformation ( [$sRoot = ''] ) _WinAPI_SetVolumeMountPoint ( $sFilePath, $sGUID ) _WinAPI_GetVolumeNameForVolumeMountPoint ( $sMountedPath ) DriveGetType ( "path" [, operation = 1] ) DriveStatus ( "path" ) DriveGetSerial ( "path" ) DriveMapGet ( "device" )
    1 point
  11. I'm using the lib dll that you sent and I've already seen that I'm going to have crashing problems even running just the example you sent because if I let several videos play in a row, it starts to slow down until it crashes, I think that libvlc_media_player_stop() is not cleaning everything it should or so you can't repeat all the commands when putting the next video, I'm doing tests here to try to find out the cause of the crashes.
    1 point
  12. ioa747

    full screen gui

    replace it with this Func _main() GUISetState(@SW_SHOW) Local $aAccelKeys[2][2] = [["{F11}", $idFullScreen], ["{ESC}", $GUI_EVENT_CLOSE]] GUISetAccelerators($aAccelKeys) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ;_WinAPI_DeleteObject($Pic_Banner) _GDIPlus_Shutdown() ExitLoop Case $idFullScreen ; ========== USED TO ADD PICTURE IN MEMORY ==================== Global $Pic_Banner = _GDIPlus_BitmapCreateFromMemory(_vista(), True) ; ============================================================= _FullScreen() Case Else ; EndSwitch Sleep(10) WEnd EndFunc ;==>_main edit: two things put _GDIPlus_Shutdown() before the ExitLoop remove the word Const in Global $Pic_Banner = _GDIPlus_BitmapCreateFromMemory(_vista(), True)
    1 point
×
×
  • Create New...