Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/22/2022 in all areas

  1. I guess it's for historic reasons. BTW, I use my function CW() instead, which works in compiled programs as well: Func CW($s = "") If @Compiled Then _CUI_ConsoleWrite($s) Else _ConsoleWrite($s) EndIf EndFunc ;==>CW Func _CUI_ConsoleWrite(ByRef $s) Local Static $hDll = DllOpen("kernel32.dll") Local Static $hCon = __CUI_ConsoleInit($hDll) DllCall($hDll, "bool", "WriteConsoleW", "handle", $hCon, "wstr", $s & @LF, "dword", StringLen($s) + 1, "dword*", 0, "ptr", 0) Return EndFunc ;==>_CUI_ConsoleWrite ; internal use only Func __CUI_ConsoleInit(ByRef $hDll) DllCall($hDll, "bool", "AllocConsole") Return DllCall($hDll, "handle", "GetStdHandle", "int", -11)[0] EndFunc ;==>__CUI_ConsoleInit ; Unicode-aware ConsoleWrite Func _ConsoleWrite(ByRef $s) ConsoleWrite(BinaryToString(StringToBinary($s & @LF, 4), 1)) EndFunc ;==>_ConsoleWrite
    3 points
  2. Warning! The code sample above will work just fine as long as the plaintext is 7-bit ASCII. Unfortunately, AutoIt uses a subset of Unicode (UCS2) and if the plaintext contains Unicode characters which have no exact counterpart in the 0x80-0xFF range of your locale Windows ANSI charset, they will be "converted" to rubbish or ?. So Alice first needs to convert the plaintext to binary using StringToBinary with option UTF8, encrypt and send the ciphertext to Bob. Bob will decrypt and use BinaryToString with option UTF8 to convert the result to a valid AutoIt string which will then be garanteed equal to the original plaintext. Below, vd() is a variable dump function to illustrate what happens if conversion to/from UTF8 is not done: vd(BinaryToString(StringToBinary("mémère 3€ Μεγάλο πρόβλημα Большая проблема 大问题 बड़ी समस्या مشكلة كبيرة"))) vd(BinaryToString(StringToBinary("mémère 3€ Μεγάλο πρόβλημα Большая проблема 大问题 बड़ी समस्या مشكلة كبيرة", $SB_UTF8), $SB_UTF8)) Result in Unicode console: String (74) 'mémère 3€ ?e???? p??ß??µa ??????? ???????? ??? ???? ?????? ????? ?????' String (74) 'mémère 3€ Μεγάλο πρόβλημα Большая проблема 大问题 बड़ी समस्या مشكلة كبيرة'
    3 points
  3. Features: Create modern looking borderless and resizable GUIs with control buttons (Close,Maximize/Restore,Minimize, Fullscreen, Menu) True borderless, resizeable GUI with full support for aerosnap etc. Many color schemes/themes included. See MetroThemes.au3 for more details. 3 type of Windows 8/10 style buttons. Modern checkboxes, radios, toggles and progressbar. All buttons, checkboxes etc. have hover effects! Windows 10 style modern MsgBox. Windows 10/Android style menu that slides in from left. Windows 10 style right click menu Credits: @UEZ, for the function to create buttons with text using GDIPlus. @binhnx for his SSCtrlHover UDF Changelog: Download UDF with example:
    1 point
  4. Those extra formats provided may not have the same id on another machine or another boot on some machine, as any program can register a format and the order of the formats registering are dependent on who registers first. for example, text/_moz_htmlcontext is 49613 on my machine currently. That is why i mentioned the example in the _ClipBoard_EnumFormats documentation.
    1 point
  5. Hi, I'm developing CefAu3 project, it embed Chromium browser to your AutoIt program. I'm busy and can stop it. If you want to contribute, you can fork my project and build it yourself. Some Features: - Easy create CEF window - Multi-message loop - Interaction between AutoIt and JavaScript - Supports AutoIt binding - Supports user events... Github: https://github.com/wy3/cefau3 MiniBrowser: https://github.com/small-autoit/mb CEF project: https://bitbucket.org/chromiumembedded/cef Learn more: http://magpcss.org/ceforum/
    1 point
  6. Done, I sent you a message. In fact, I've already been working on new functions and there are things that maybe need to be clarified. I already have a version, but it has some bugs and I'd rather post it once I'm done.
    1 point
  7. Hi, thanks for the help. I have reviewed it and it is great, something that had not occurred to me before. And well, I'm going to work on some missing functions, like getting the audio and audio data through an ID. And maybe some other function. Would you mind if I post it when it's all over?
    1 point
  8. smbape

    OpenCV v4 UDF

    Hi @iZo Can you follow these running examples instructions and give a feedback?
    1 point
  9. Here is only needed code, stripped unnecessary code + ConsoleWrite(">>>>>>>>>>> " & _GUICtrlListView_GetItemText($ListView1, $index, $SubItem) & @CRLF) #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> #include <array.au3> #include <MsgBoxConstants.au3> Opt("GUIOnEventMode", 1) Local $aItems[10][2] For $iI = 0 To UBound($aItems) - 1 $aItems[$iI][0] = "Row " & $iI $aItems[$iI][1] = "Item " & $iI Next $Form1 = GUICreate("Form1", 850, 830, -1, -1) $ListView1 = GUICtrlCreateListView("Type|From ID", 13, 180, 826, 325, BitOR($LVS_SINGLESEL, $WS_HSCROLL, $WS_VSCROLL, $WS_BORDER)) _GUICtrlListView_SetExtendedListViewStyle($ListView1, BitOR($LVS_EX_ONECLICKACTIVATE, $LVS_EX_TRACKSELECT, $LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES, $LVS_EX_HEADERDRAGDROP)) GUISetOnEvent($GUI_EVENT_CLOSE, "Form2Close") _GUICtrlListView_AddArray($ListView1, $aItems) GUISetState() GUIRegisterMsg($WM_NOTIFY, "_WM_NOTIFY") GUISetState(@SW_SHOW) While 1 Sleep(100) WEnd Func Form2Close() Exit EndFunc ;==>Form2Close Func _WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg, $wParam $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $event = DllStructGetData($tNMHDR, 'Code') If $wParam = $ListView1 And $event = $NM_CLICK Then $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) $index = DllStructGetData($tInfo, "Index") $SubItem = DllStructGetData($tInfo, "SubItem") ConsoleWrite(">>>>>>>>>>> " & _GUICtrlListView_GetItemText($ListView1, $index, $SubItem) & @CRLF) EndIf Return $GUI_RUNDEFMSG EndFunc ;==>_WM_NOTIFY
    1 point
  10. Since monoceres has released I searched for a way to map the 2D image of the earth to a 3D sphere with rotation. Here the result (after 9 years of research ^^) as a non realistic physical animation: ==> Due to the fact that AutoIt / GDI+ are not that fast I couldn't add a moon animation additionally. Thanks to one of Eukalyptus' code to pointing me to the right direction. U rock man. Source code extract only - not working because of missing binary data (images): ;coded by UEZ build 2017-03-18 #pragma compile(x64, false) #pragma compile(Icon, "c:\Program Files (x86)\AutoIt3\Icons\au3.ico") #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters=/so /pe /rm #AutoIt3Wrapper_Run_After=del /f /q "%scriptdir%\%scriptfile%_stripped.au3" #include <GDIPlus.au3> #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> _GDIPlus_Startup() Global $hGUI, $iFPS = 0, $iShowFPS = 0, $bExit Global Const $iW = 800, $iW2 = ($iW - 100) / 2, $iH = 500, $fRad = ACos(-1) / 180, $sTitle = "GDI+ Rotating Earth v1.7 coded by UEZ 2017" AutoItSetOption("GUIOnEventMode", 1) GDIPlus_RotatingEarth() AutoItSetOption("GUIOnEventMode", 0) _GDIPlus_Shutdown() Func GDIPlus_RotatingEarth() $bExit = False $hGUI = GUICreate($sTitle, $iW, $iH) GUISetState(@SW_SHOW, $hGUI) ;create canvas elements Local Const $hDC = _WinAPI_GetDC($hGUI) Local Const $hHBitmap = _WinAPI_CreateCompatibleBitmap($hDC, $iW, $iH) Local Const $hDC_backbuffer = _WinAPI_CreateCompatibleDC($hDC) Local Const $DC_obj = _WinAPI_SelectObject($hDC_backbuffer, $hHBitmap) Local Const $hCanvas = _GDIPlus_GraphicsCreateFromHDC($hDC_backbuffer) _GDIPlus_GraphicsSetInterpolationMode($hCanvas, $GDIP_INTERPOLATIONMODE_NEARESTNEIGHBOR) _GDIPlus_GraphicsSetPixelOffsetMode($hCanvas, $GDIP_PIXELOFFSETMODE_HALF) Local Const $hBrush_Clr = _GDIPlus_BrushCreateSolid(0xFF000000), _ $hBrush_FPS = _GDIPlus_BrushCreateSolid(0xFFF0F0F0), _ $hFormat_FPS = _GDIPlus_StringFormatCreate(), _ $hFamily_FPS = _GDIPlus_FontFamilyCreate("Arial"), _ $hFont_FPS = _GDIPlus_FontCreate($hFamily_FPS, 8), _ $tLayout_FPS = _GDIPlus_RectFCreate(0, 0, 60, 16), _ $hImage_Earth = _GDIPlus_BitmapCreateFromMemory(_Earth()), _ $hImage_Galaxy = _GDIPlus_BitmapCreateFromMemory(_Galaxy()), _ $hImage_Clouds = _GDIPlus_BitmapCreateFromMemory(_Clouds()), _ $hImage_Moon = _GDIPlus_BitmapCreateFromMemory(_Moon()), _ $hImage_USSE = _GDIPlus_BitmapCreateFromMemory(_USSE()), _ $hMatrix = _GDIPlus_MatrixCreate(), $hMatrix2 = _GDIPlus_MatrixCreate(), _ $hPath = _GDIPlus_PathCreate(), $hPath2 = _GDIPlus_PathCreate(), _ $hPen = _GDIPlus_PenCreate(0xC0FFFFFF, 1) _GDIPlus_ImageRotateFlip($hImage_USSE, 4) Local $aDim = _GDIPlus_ImageGetDimension($hImage_Earth) Local $hGfx = _GDIPlus_ImageGetGraphicsContext($hImage_Earth) _GDIPlus_GraphicsDrawStringEx($hGfx, "Coded by UEZ 2017 ^^", $hFont_FPS, _GDIPlus_RectFCreate(0, $aDim[1] / 2 - 4, 120, 12), $hFormat_FPS, $hBrush_FPS) _GDIPlus_ImageDispose($hGfx) Local Const $hTexture_Earth = _GDIPlus_TextureCreate($hImage_Earth), $hTexture_Clouds = _GDIPlus_TextureCreate($hImage_Clouds) DllCall($__g_hGDIPDll, "int", "GdipTranslateTextureTransform", "ptr", $hTexture_Earth, "float", -200, "float", 0, "long", 0) DllCall($__g_hGDIPDll, "int", "GdipTranslateTextureTransform", "ptr", $hTexture_Clouds, "float", -100, "float", 0, "long", 0) Local $iDiameter = $aDim[0] < $aDim[1] ? $aDim[0] : $aDim[1], _ $fDiameter2 = $iDiameter / 2, _ $fDX = ($iW - $iDiameter) / 2, $fDY = ($iH - $iDiameter) / 2 _GDIPlus_PathAddEllipse($hPath, $fDX - 1, $fDY - 1, $iDiameter + 2, $iDiameter + 2) Local Const $hBrush = _GDIPlus_PathBrushCreateFromPath($hPath) _GDIPlus_PathBrushSetCenterColor($hBrush, 0x02000008) _GDIPlus_PathBrushSetCenterPoint($hBrush, $fDX + $fDiameter2 + 1, $fDY + $fDiameter2 + 1) _GDIPlus_PathBrushSetSurroundColor($hBrush, 0xF8000000) _GDIPlus_PathBrushSetGammaCorrection($hBrush, 1) _GDIPlus_PathBrushSetFocusScales($hBrush, 0.50, 0.50) _GDIPlus_PathAddEllipse($hPath2, -1, -1, 201, 201) Local Const $hBrush2 = _GDIPlus_PathBrushCreateFromPath($hPath2) _GDIPlus_PathBrushSetCenterColor($hBrush2, 0x0800000) _GDIPlus_PathBrushSetCenterPoint($hBrush2, 100, 100) _GDIPlus_PathBrushSetSurroundColor($hBrush2, 0xFF000000) _GDIPlus_PathBrushSetGammaCorrection($hBrush2, 1) _GDIPlus_PathBrushSetFocusScales($hBrush2, 0.50, 0.50) $hGfx = _GDIPlus_ImageGetGraphicsContext($hImage_Moon) _GDIPlus_GraphicsFillEllipse($hGfx, -1, -1, 201, 201, $hBrush2) _GDIPlus_ImageDispose($hGfx) $iFPS = 0 GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit_About") AdlibRegister("CalcFPS", 1000) Local $fTimer1, $fTimer2, $fScale, $fTmp, $fX, $fSin, $fZ, $fS, $zz, $z = 90, $iStep = 4 ;the higher $iStep is the faster the animation but lower the quality. Local $fPosX, $fPosY, $fSize, $fSpeed, $aMeteor[4] = [0, 10 + Random() * ($iH - 20), 5 + Random() * 10, 5 + Random() * 10] $fPosX = $iW + 60 $fPosY = Random() * ($iH - 100) + 50 $fSize = 0.5 + Random() * 2 $fSpeed = Random() * 3 + 1 $fTimer1 = TimerInit() $fTimer2 = TimerInit() Do DllCall($__g_hGDIPDll, "int", "GdipDrawImageRect", "handle", $hCanvas, "handle", $hImage_Galaxy, "float", 0, "float", 0, _ "float", $iW, "float", $iH) DllCall($__g_hGDIPDll, "int", "GdipSetSmoothingMode", "handle", $hCanvas, "int", 4) If TimerDiff($fTimer1) > 10000 Then DllCall($__g_hGDIPDll, "int", "GdipDrawLine", "handle", $hCanvas, "handle", $hPen, "float", $aMeteor[0], "float", $aMeteor[1], _ "float", $aMeteor[0] + $aMeteor[2] * 3, "float", $aMeteor[1] + $aMeteor[3] * 3) $aMeteor[0] += $aMeteor[2] $aMeteor[1] += $aMeteor[3] If BitOR($aMeteor[0] > $iW, $aMeteor[1] > $iH, $aMeteor[0] < 0, $aMeteor[1] < 0) Then $aMeteor[0] = 0 $aMeteor[1] = Random() * ($iH * 0.75) $aMeteor[2] = 8 + Random() * 12 $aMeteor[3] = 7 + Random() * 10 $fTimer1 = TimerInit() EndIf EndIf If TimerDiff($fTimer2) > 30000 Then DllCall($__g_hGDIPDll, "int", "GdipDrawImageRect", "handle", $hCanvas, "handle", $hImage_USSE, "float", $fPosX, "float", $fPosY, _ "float", 50 * $fSize, "float", 12 * $fSize) $fPosX -= $fSpeed If $fPosX < -100 Then $fPosX = $iW + 30 $fPosY = Random() * ($iH - 100) + 50 $fSize = Random() * 2 $fSpeed = Random() * 3 + 1 $fTimer2 = TimerInit() EndIf EndIf $zz = $z * $fRad $fX = $iW2 - Cos($zz) * 345 $z -= 0.5 $fZ = Sin($zz) $fS = 100 - $fZ * 50 DllCall($__g_hGDIPDll, "int", "GdipSetSmoothingMode", "handle", $hCanvas, "int", 1) DllCall($__g_hGDIPDll, "int", "GdipTranslateTextureTransform", "ptr", $hTexture_Earth, "float", 0.75, "float", 0, "long", 0) DllCall($__g_hGDIPDll, "int", "GdipTranslateTextureTransform", "ptr", $hTexture_Clouds, "float", 1.25, "float", 0, "long", 0) If $fZ > 0 Then _GDIPlus_GraphicsDrawImageRect($hCanvas, $hImage_Moon, $fX, 110, $fS, $fS) For $i = 1 To $fDiameter2 Step $iStep $fScale = 1 + $i / $fDiameter2 DllCall($__g_hGDIPDll, "int", "GdipSetMatrixElements", "handle", $hMatrix, "float", 1.0, "float", 0.0, "float", 0.0, "float", 1.0, "float", 0.0, "float", 0.0) DllCall($__g_hGDIPDll, "int", "GdipTranslateMatrix", "handle", $hMatrix, "float", $fDX + $fDiameter2, "float", $fDY + $fDiameter2, "int", 0) DllCall($__g_hGDIPDll, "int", "GdipScaleMatrix", "handle", $hMatrix, "float", $fScale, "float", $fScale, "int", 0) DllCall($__g_hGDIPDll, "int", "GdipTranslateMatrix", "handle", $hMatrix, "float", -$fDiameter2, "float", -$fDiameter2, "int", 0) DllCall($__g_hGDIPDll, "int", "GdipSetWorldTransform", "handle", $hCanvas, "handle", $hMatrix) DllCall($__g_hGDIPDll, "int", "GdipFillEllipse", "handle", $hCanvas, "handle", $hTexture_Earth, _ "float", $i, "float", $i, "float", $iDiameter -2 * $i, "float", $iDiameter - 2 * $i) DllCall($__g_hGDIPDll, "int", "GdipFillEllipse", "handle", $hCanvas, "handle", $hTexture_Clouds, _ "float", $i, "float", $i, "float", $iDiameter -2 * $i, "float", $iDiameter - 2 * $i) Next _GDIPlus_MatrixSetElements($hMatrix) _GDIPlus_GraphicsSetTransform($hCanvas, $hMatrix) DllCall($__g_hGDIPDll, "int", "GdipFillRectangle", "handle", $hCanvas, "handle", $hBrush, "float", $fDX, "float", $fDY, "float", $iDiameter, "float", $iDiameter) Else For $i = 1 To $fDiameter2 Step $iStep $fScale = 1 + $i / $fDiameter2 DllCall($__g_hGDIPDll, "int", "GdipSetMatrixElements", "handle", $hMatrix, "float", 1.0, "float", 0.0, "float", 0.0, "float", 1.0, "float", 0.0, "float", 0.0) DllCall($__g_hGDIPDll, "int", "GdipTranslateMatrix", "handle", $hMatrix, "float", $fDX + $fDiameter2, "float", $fDY + $fDiameter2, "int", 0) DllCall($__g_hGDIPDll, "int", "GdipScaleMatrix", "handle", $hMatrix, "float", $fScale, "float", $fScale, "int", 0) DllCall($__g_hGDIPDll, "int", "GdipTranslateMatrix", "handle", $hMatrix, "float", -$fDiameter2, "float", -$fDiameter2, "int", 0) DllCall($__g_hGDIPDll, "int", "GdipSetWorldTransform", "handle", $hCanvas, "handle", $hMatrix) DllCall($__g_hGDIPDll, "int", "GdipFillEllipse", "handle", $hCanvas, "handle", $hTexture_Earth, _ "float", $i, "float", $i, "float", $iDiameter - 2 * $i, "float", $iDiameter - 2 * $i) DllCall($__g_hGDIPDll, "int", "GdipFillEllipse", "handle", $hCanvas, "handle", $hTexture_Clouds, _ "float", $i, "float", $i, "float", $iDiameter - 2 * $i, "float", $iDiameter - 2 * $i) Next _GDIPlus_MatrixSetElements($hMatrix) _GDIPlus_GraphicsSetTransform($hCanvas, $hMatrix) DllCall($__g_hGDIPDll, "int", "GdipFillRectangle", "handle", $hCanvas, "handle", $hBrush, "float", $fDX, "float", $fDY, "float", $iDiameter, "float", $iDiameter) _GDIPlus_GraphicsDrawImageRect($hCanvas, $hImage_Moon, $fX, 110, $fS, $fS) EndIf _GDIPlus_GraphicsDrawStringEx($hCanvas, "FPS: " & $iShowFPS, $hFont_FPS, $tLayout_FPS, $hFormat_FPS, $hBrush_FPS) ;draw background message text _WinAPI_BitBlt($hDC, 0, 0, $iW, $iH, $hDC_backbuffer, 0, 0, $SRCCOPY) ;blit drawn bitmap to GUI $iFPS += 1 If $bExit Then ExitLoop Until False ;Not Sleep(10) AdlibUnRegister("CalcFPS") ;release resources _GDIPlus_PenDispose($hPen) _GDIPlus_BrushDispose($hBrush) _GDIPlus_BrushDispose($hBrush2) _GDIPlus_PathDispose($hPath) _GDIPlus_PathDispose($hPath2) _GDIPlus_MatrixDispose($hMatrix) _GDIPlus_MatrixDispose($hMatrix2) _GDIPlus_ImageDispose($hImage_Earth) _GDIPlus_ImageDispose($hImage_Galaxy) _GDIPlus_ImageDispose($hImage_Clouds) _GDIPlus_ImageDispose($hImage_Moon) _GDIPlus_ImageDispose($hImage_USSE) _GDIPlus_BrushDispose($hTexture_Earth) _GDIPlus_BrushDispose($hTexture_Clouds) _GDIPlus_FontDispose($hFont_FPS) _GDIPlus_FontFamilyDispose($hFamily_FPS) _GDIPlus_StringFormatDispose($hFormat_FPS) _GDIPlus_BrushDispose($hBrush_Clr) _GDIPlus_BrushDispose($hBrush_FPS) _GDIPlus_GraphicsDispose($hCanvas) _WinAPI_SelectObject($hDC_backbuffer, $DC_obj) _WinAPI_DeleteDC($hDC_backbuffer) _WinAPI_DeleteObject($hHBitmap) _WinAPI_ReleaseDC($hGUI, $hDC) GUIDelete($hGUI) EndFunc ;==>GDIPlus_RotatingEarth Func _Exit_About() $bExit = True EndFunc ;==>_Exit_About Func CalcFPS() ;display FPS $iShowFPS = $iFPS $iFPS = 0 EndFunc ;==>CalcFPS ;Code below was generated by: 'File to Base64 String' Code Generator v1.20 Build 2016-12-01 ... Download: Rotating Earth v1.7.au3 In line 92 you can modify the $iStep variable -> the higher $iStep is the faster the animation & lower the quality. So long...
    1 point
  11. UPDATE: With the addition of the ObjCreateInterface function and enhanced COM functionality by trancexxx, these interfaces are now accessible directly in AutoIt. I've rewritten the plugin as a native UDF which will work when compiled as x64 as well. I've attached the new UDF as well as updated plugin and UDF versions of my OSD Volume script. UDF Example: #include <_AudioEndpointVolume.au3> ; ## Get current volume levels $vol = _GetMasterVolumeLevel() ConsoleWrite("Get Vol Error: " & @error & @CRLF) ConsoleWrite("Volume: " & $vol & " (decibels)" & @CRLF) $vol = _GetMasterVolumeLevelScalar() ConsoleWrite("Get Vol Error: " & @error & @CRLF) ConsoleWrite("Volume: " & $vol & " (scalar)" & @CRLF) ; ## Set new volume levels ConsoleWrite("Set vol to -20db..." & @CRLF) _SetMasterVolumeLevel(-20) ConsoleWrite("Set Vol Error: " & @error & @CRLF) $vol = _GetMasterVolumeLevel() ConsoleWrite("Get Vol Error: " & @error & @CRLF) ConsoleWrite("Volume: " & $vol & " (decibels)" & @CRLF) ConsoleWrite("Set vol to scalar 30..." & @CRLF) _SetMasterVolumeLevelScalar(30) ConsoleWrite("Set Vol Error: " & @error & @CRLF) $vol = _GetMasterVolumeLevelScalar() ConsoleWrite("Get Vol Error: " & @error & @CRLF) ConsoleWrite("Volume: " & $vol & " (scalar)" & @CRLF) ; ## Get volume range information ConsoleWrite("Get range info..." & @CRLF) $aInfo = _GetVolumeRange() ConsoleWrite("Get Range Error: " & @error & @CRLF) ConsoleWrite("MinDB: " & $aInfo[0] & @CRLF) ConsoleWrite("MaxDB: " & $aInfo[1] & @CRLF) ConsoleWrite("Increment: " & $aInfo[2] & @CRLF) ; ## Set mute states ConsoleWrite("Set mute on..." & @CRLF) _SetMute(1) ConsoleWrite("Set Mute Error: " & @error & @CRLF) $mute = _GetMute() ConsoleWrite("Get Mute Error: " & @error & @CRLF) ConsoleWrite("Muted: " & $mute & @CRLF) Sleep(2000) ConsoleWrite("Set mute off..." & @CRLF) _SetMute(0) ConsoleWrite("Set Mute Error: " & @error & @CRLF) $mute = _GetMute() ConsoleWrite("Get Mute Error: " & @error & @CRLF) ConsoleWrite("Muted: " & $mute & @CRLF) ; ## Get volume step info ; ## Steps range from 0 to nStepCount - 1 ConsoleWrite("Get step info..." & @CRLF) $aInfo = _GetVolumeStepInfo() ConsoleWrite("Get Step Error: " & @error & @CRLF) ConsoleWrite("Current step: " & $aInfo[0] & @CRLF) ConsoleWrite("Total steps: 0 to " & $aInfo[1] - 1 & @CRLF) ConsoleWrite("Increase 5 steps..." & @CRLF) For $i = 1 To 5 _VolumeStepUp() Next $aInfo = _GetVolumeStepInfo() ConsoleWrite("Get Step Error: " & @error & @CRLF) ConsoleWrite("Current step: " & $aInfo[0] & @CRLF) ConsoleWrite("Decrease 2 steps..." & @CRLF) For $i = 1 To 2 _VolumeStepDown() Next $aInfo = _GetVolumeStepInfo() ConsoleWrite("Get Step Error: " & @error & @CRLF) ConsoleWrite("Current step: " & $aInfo[0] & @CRLF) OLD PLUGIN VERSION vista_vol_plugin.zip _AudioEndpointVolume.au3 VolumeOSD.zip VolumeOSD_plugin.zip
    1 point
×
×
  • Create New...