Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/25/2012 in all areas

  1. For the record, the above is a matter for opinion.
    2 points
  2. Hi! This is a fully functional video player that is powered by DirectShow to provide the best speed, stability, file support and features. The DirectShow renderer is VMR9, which is utilizing Direct3D9, making playback hardware powered. Some of the features are: Most video format available (through installed filters)Minimal GUI, designed not to interuptSaving favourite videosTaking snapshotsAll in one menu (context menu)The todo list is pretty much this: Settings dialogMore hotkeysOption to change file associations.What do you think?Oh, this is also a cooperative project including me and AdmiralAlkex A screenshot of the player in use: Download below, with source code (au3 part) and compiled exe. AAA_Alpha.zip Ps. There is a well hidden easter egg, find it and get cookie! Ds. Don't forget to check out the sister project. AAA Thumbnailer
    1 point
  3. actually doesnt seem to save too much time but here it is: #include <AD.au3> _AD_Open() If @error Then MsgBox(0, "", "unable to connect") Exit EndIf $aComputers2 = _AD_GetObjectsInOU("", "(objectclass=computer)") _AD_Close() Local $results[1][1] TCPStartup() For $i = 1 To UBound($aComputers2) - 1 $ip_address = TCPNameToIP($aComputers2[$i]) ReDim $results[UBound($results) + 1][2] $results[UBound($results) - 1][0] = $aComputers2[$i] $results[UBound($results) - 1][1] = $ip_address ConsoleWrite($aComputers2[$i] & @CRLF) ConsoleWrite($ip_address & @CRLF) ConsoleWrite(@CRLF) Next TCPShutdown() _ArrayDisplay($results)
    1 point
  4. you can get ad.au3 from here #include <AD.au3> Global $aComputers2 _AD_Open() If @error Then MsgBox(0, "", "unable to connect") Exit EndIf $aComputers2 = _AD_GetObjectsInOU("", "(objectclass=computer)", 2, "name,operatingSystem") _AD_Close() Local $results[1][1] TCPStartup() For $i = 1 To UBound($aComputers2) - 1 $ip_address = TCPNameToIP($aComputers2[$i][0]) ReDim $results[UBound($results) + 1][3] $results[UBound($results) - 1][0] = $aComputers2[$i][0] $results[UBound($results) - 1][1] = $aComputers2[$i][1] $results[UBound($results) - 1][2] = $ip_address Next TCPShutdown() _ArrayDisplay($results)
    1 point
  5. Success: Returns string containing IP address corresponding to the name. not array
    1 point
  6. Valik

    inline functions C++

    It can benefit yes. The compiler may already inline the code or may not even if you tell it to. The inline keyword is a hint that the compiler may not need or may ignore entirely.
    1 point
  7. something like $oShell = ObjCreate("SAPI.SpVoice") ; Get the Windows SAPI Object $oShell.Speak("30 minutes of playing left.") well it's more like annoying voice than a sound, but it will work
    1 point
  8. I assume that you have the text in a single variable and that the line break is caused by CRLF in the string. Use$sString = StringReplace($sString, @CRLF, " ")to get rid of the line break.
    1 point
  9. if you want to go the xml parsing route, take the string of the xml, and pass it in: $oXML=ObjCreate("Microsoft.XMLDOM") $oXML.LoadXML('<p>String i want to geta<span class="street">String i want to getb</span></p>') $result = $oXML.selectSingleNode('//p') ConsoleWrite ( $result.childNodes.item(0).text & @CRLF) ConsoleWrite ( $result.childNodes.item(1).text & @CRLF) output would be: String i want to geta String i want to getb this works for html as well, but then again, you can use the _IE* functions, and .innertext to do the same
    1 point
  10. You can use the _StringBetween() function, like this, #include <String.au3> Local $sString = '<p>String i want to get<span class="street">String i want to get</span></p>', _ $sVar1 = _StringBetween($sString, '<p>', '<span class="street">'), _ $sVar2 = _StringBetween($sString, '<span class="street">', '</span></p>') ConsoleWrite($sVar1[0] & @LF & $sVar2[0] & @LF) Look in the Help File for more info, and another example.
    1 point
  11. Melba23

    psychoblast

    Why did I get the impression you might just do something like this? I hope you get many new members similar to yourself in your new forum as we can certainly do without them here. I find it strange that you seem to hate us so much and yet continue to return here - but you might find it a little harder in the future with the permanent block you now have. M23
    1 point
  12. Actually, I do not work with WinXP but by chance I discovered an effect. This is experimentell only and not fully implemented! Aero must be disabled (will done by script) on Vista+ os! #include <gdiplus.au3> #include <guiconstantsex.au3> #include <windowsconstants.au3> Opt("MustDeclareVars", 1) Opt("GUIOnEventMode", 1) Global Const $hDwmApiDll = DllOpen("dwmapi.dll") Global $sChkAero = DllStructCreate("int;") DllCall($hDwmApiDll, "int", "DwmIsCompositionEnabled", "ptr", DllStructGetPtr($sChkAero)) Global $aero = DllStructGetData($sChkAero, 1) If $aero Then DllCall($hDwmApiDll, "int", "DwmEnableComposition", "uint", False) Global $dy If @OSBuild < 6000 Then Global $aTheme = _WinAPI_GetCurrentThemeName() If Not @error Then $dy = -54 Else $dy = -40 EndIf Else $dy = -47 EndIf _GDIPlus_Startup() Global Const $hFullScreen = WinGetHandle("[TITLE:Program Manager;CLASS:Progman]") Global Const $aFullScreen = WinGetPos($hFullScreen) Global Const $fW = 4 Global Const $fH = 32 Global Const $iW = 640 Global Const $iH = 400 Global Const $hGUI = GUICreate("", $iW, $iH, -1, -1, $WS_POPUP, $WS_EX_OVERLAPPEDWINDOW + $WS_EX_TOPMOST) Global Const $idTitle = GUICtrlCreateLabel("Pseudo Aero Effect by UEZ", $fW + 16, $fh / 3, 150, 16) GUICtrlSetFont(-1, 9, 800, 0, "Arial", 4) GUICtrlSetBkColor(-1, -2) Global Const $idLabel = GUICtrlCreateLabel(@LF & @LF & @LF & @TAB & "Done by UEZ 2011", $fW, $fH, $iW - 2 * $fW - 2, $iH - $fH - $fW) GUICtrlSetFont(-1, 30, 400, 0, "Arial", 4) GUICtrlSetBkColor(-1, -2) Global Const $idLabel_Min = GUICtrlCreateLabel("[_]", $iW - 50, $fH / 3, $fh / 2, $fh / 2) GUICtrlSetBkColor(-1, -2) Global Const $idLabel_Close = GUICtrlCreateLabel("[X]", $iW - 30, $fH / 3, $fh / 2, $fh / 2) GUICtrlSetBkColor(-1, -2) WinSetTrans($hGUI, "", 0xFF) Global Const $hGUI_Hidden = GUICreate("", $iW, $iH, 0, 0, Default, $WS_EX_MDICHILD + $WS_EX_LAYERED, $hGUI) GUISetState(@SW_HIDE, $hGUI_Hidden) GUISetState(@SW_SHOW, $hGUI) _SetGuiRoundCorners($hGUI, 16, True, False, True, False) Global $hDev = _WinAPI_GetDC($hGUI) Global $hDC_Area = _WinAPI_CreateCompatibleDC($hDev) Global $hBitmap_Area = _WinAPI_CreateCompatibleBitmap($hDev, $aFullScreen[2], $aFullScreen[3]) Global Const $hDC_Zoom = _WinAPI_GetDC(0) Global Const $hGUI_ZoomDC = _WinAPI_GetDC($hGUI_Hidden) Global Const $memDC = _WinAPI_CreateCompatibleDC($hGUI_ZoomDC) Global Const $memBmp = _WinAPI_CreateCompatibleBitmap($hGUI_ZoomDC, $iW, $iH) _WinAPI_SelectObject($memDC, $memBmp) Global $aPos = WinGetPos($hGUI) _WinAPI_StretchBlt($hGUI_ZoomDC, 0, 0, $iW, $iH, $hDC_Zoom, $aPos[0], $aPos[1], $iW, $iH, $SRCCOPY) _WinAPI_BitBlt($memDC, 0, 0, $iW, $iH, $hGUI_ZoomDC, 0, $dy, 0x00CC0020) Global Const $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGUI) Global Const $hBitmap = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphic) Global Const $hContext = _GDIPlus_ImageGetGraphicsContext($hBitmap) Global Const $GW_CHILD = 5 Global Const $GW_HWNDNEXT = 2 Global $hRegion = _GDIPlus_RegionCreateFromRect(_GDIPlus_RectFCreate(0, 0, $iW, $iH)) Global $hChild = _WinAPI_GetWindow($hGUI, $GW_CHILD) Global $aRect, $msg Do $aRect = ControlGetPos($hChild, "", 0) _GDIPlus_RegionCombineRect($hRegion, _GDIPlus_RectFCreate($aRect[0], $aRect[1], $aRect[2], $aRect[3]), 3) $hChild = _WinAPI_GetWindow($hChild, $GW_HWNDNEXT) Until Not $hChild _GDIPlus_GraphicsSetClipRegion($hGraphic, $hRegion) _GDIPlus_RegionDispose($hRegion) Global $tRectF = _GDIPlus_RectFCreate(0, 0, $iW / 1.5, $iH / 1.5) Global $hBrush = _GDIPlus_LineBrushCreateFromRectWithAngle($tRectF, 0x80201010, 0xA0F0F0F0, -60, False, 1) Global $hBmp = _GDIPlus_BitmapCreateFromHBITMAP($memBmp) Global $hBmp_Blur = _Blur($hBmp, $iW, $iH) _GDIPlus_GraphicsDrawImage($hContext, $hBmp_Blur, 0, 0) _GDIPlus_GraphicsFillRect($hContext, 0, 0, $iW, $iH, $hBrush) _GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, $iW, $iH) _GDIPlus_BitmapDispose($hBmp) _GDIPlus_BitmapDispose($hBmp_Blur) GUIRegisterMsg($WM_WINDOWPOSCHANGED, "WM_WINDOWPOSCHANGED") GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST") Global $exit = False GUISetOnEvent($GUI_EVENT_RESTORE, "Restored", $hGUI) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit", $hGUI) GUICtrlSetOnEvent($idLabel_Close, "_Exit") GUICtrlSetOnEvent($idLabel_Min, "_MinWin") While Sleep(30) ;~ Repaint() If $exit Then ExitLoop WEnd GUIRegisterMsg($WM_WINDOWPOSCHANGED, "") _WinAPI_DeleteDC($memDC) _WinAPI_DeleteObject($memBmp) _WinAPI_DeleteObject($hBitmap_Area) _WinAPI_ReleaseDC($hGUI, $hDev) _WinAPI_ReleaseDC($hGUI, $hGUI_ZoomDC) _WinAPI_ReleaseDC(0, $hDC_Zoom) _GDIPlus_BrushDispose($hBrush) _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_GraphicsDispose($hContext) _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_Shutdown() GUIDelete() $tRectF = 0 If $aero Then DllCall($hDwmApiDll, "int", "DwmEnableComposition", "uint", True) Exit Func _Exit() $exit = True EndFunc Func _MinWin() GUISetState(@SW_MINIMIZE, $hGUI) EndFunc Func Restored() Repaint() EndFunc Func WM_WINDOWPOSCHANGED($hWnd, $iMsg, $StartWIndowPosaram, $lParam) Repaint() Return "GUI_RUNDEFMSG" EndFunc Func Repaint() $aPos = WinGetPos($hGUI) _WinAPI_StretchBlt($hGUI_ZoomDC, 0, 0, $iW, $iH, $hDC_Zoom, $aPos[0]+16, $aPos[1] + 3, $iW, $iH, $SRCCOPY) _WinAPI_BitBlt($memDC, 0, 0, $iW, $iH, $hGUI_ZoomDC, 0, $dy, 0x00CC0020) DllStructSetData($tRectF, "X", $aPos[0]) DllStructSetData($tRectF, "Y", $aPos[1]) $hBrush = _GDIPlus_LineBrushCreateFromRectWithAngle($tRectF, 0x80302020, 0xA0F0F0F0, -60, False, 1) $hBmp = _GDIPlus_BitmapCreateFromHBITMAP($memBmp) $hBmp_Blur = _Blur($hBmp, $iW, $iH) _GDIPlus_GraphicsDrawImage($hContext, $hBmp_Blur, 0, 0) _GDIPlus_GraphicsFillRect($hContext, 0, 0, $iW, $iH, $hBrush) _GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, $iW, $iH) _GDIPlus_BitmapDispose($hBmp) _GDIPlus_BitmapDispose($hBmp_Blur) _GDIPlus_BrushDispose($hBrush) EndFunc Func WM_NCHITTEST($hWndGUI, $MsgID, $WParam, $LParam) If ($hWndGUI = $hGui) And ($MsgID = $WM_NCHITTEST) Then Return $HTCAPTION EndFunc ;==>WM_NCHITTEST Func _Blur($hBitmap, $iW, $iH, $fScale = 0.30, $qual = 6); by eukalyptus Local $hGraphics = _GDIPlus_GraphicsCreateFromHWND(_WinAPI_GetDesktopWindow()) Local $hBmpSmall = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphics) Local $hGfxSmall = _GDIPlus_ImageGetGraphicsContext($hBmpSmall) DllCall($ghGDIPDll, "uint", "GdipSetPixelOffsetMode", "hwnd", $hGfxSmall, "int", 2) Local $hBmpBig = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphics) Local $hGfxBig = _GDIPlus_ImageGetGraphicsContext($hBmpBig) DllCall($ghGDIPDll, "uint", "GdipSetPixelOffsetMode", "hwnd", $hGfxBig, "int", 2) _GDIPlus_GraphicsScaleTransform($hGfxSmall, $fScale, $fScale) _GDIPlus_GraphicsSetInterpolationMode($hGfxSmall, $qual) _GDIPlus_GraphicsScaleTransform($hGfxBig, 1 / $fScale, 1 / $fScale) _GDIPlus_GraphicsSetInterpolationMode($hGfxBig, $qual) _GDIPlus_GraphicsDrawImageRect($hGfxSmall, $hBitmap, 0, 0, $iW, $iH) _GDIPlus_GraphicsDrawImageRect($hGfxBig, $hBmpSmall, 0, 0, $iW, $iH) _GDIPlus_GraphicsDispose($hGraphics) _GDIPlus_BitmapDispose($hBmpSmall) _GDIPlus_GraphicsDispose($hGfxSmall) _GDIPlus_GraphicsDispose($hGfxBig) Return $hBmpBig EndFunc ;==>_Blur Func _WinAPI_StretchBlt($hDestDC, $iXDest, $iYDest, $iWidthDest, $iHeightDest, $hSrcDC, $iXSrc, $iYSrc, $iWidthSrc, $iHeightSrc, $iRop) Local $Ret = DllCall("gdi32.dll", "int", "StretchBlt", "hwnd", $hDestDC, "int", $iXDest, "int", $iYDest, "int", $iWidthDest, "int", $iHeightDest, "hwnd", $hSrcDC, "int", $iXSrc, "int", $iYSrc, "int", $iWidthSrc, "int", $iHeightSrc, "dword", $iRop) If (@error) Or (Not $Ret[0]) Then Return SetError(1, 0, 0) Return 1 EndFunc ;==>_WinAPI_StretchBlt ; #FUNCTION# ==================================================================================================================== ; Name...........: _WinAPI_GetCurrentThemeName ; Description....: Retrieves the name of the current visual styles, color scheme name, and size name. ; Syntax.........: _WinAPI_GetCurrentThemeName ( ) ; Parameters.....: None ; Return values..: Success - The array that contains the following information: ; ; [0] - The theme path and file name. ; [1] - The color scheme name. ; [2] - The size name. ; ; Failure - 0 and sets the @error flag to non-zero, @extended flag may contain the system error code. ; Author.........: Yashied ; Modified.......: ; Remarks........: None ; Related........: ; Link...........: @@MsdnLink@@ GetCurrentThemeName ; Example........: Yes ; =============================================================================================================================== Func _WinAPI_GetCurrentThemeName() Local $Ret = DllCall('uxtheme.dll', 'uint', 'GetCurrentThemeName', 'wstr', '', 'int', 4096, 'wstr', '', 'int', 2048, 'wstr', '', 'int', 2048) If @error Then Return SetError(1, 0, 0) Else If $Ret[0] Then Return SetError(1, $Ret[0], 0) EndIf EndIf Local $Result[3] For $i = 0 To 2 $Result[$i] = $Ret[$i * 2 + 1] Next Return $Result EndFunc ;==>_WinAPI_GetCurrentThemeName Func _SetGuiRoundCorners($hGUI, $iEllipse, $iLeftUp = True, $iLeftDown = True, $iRightUp = True, $iRightDown = True) Local $hCornerRgn Local $aGuiSize = WinGetPos($hGUI) Local $hRgn = _WinAPI_CreateRoundRectRgn(0, 0, $aGuiSize[2], $aGuiSize[3], $iEllipse, $iEllipse) If $iLeftUp = False Then $hCornerRgn = _WinAPI_CreateRectRgn(0, 0, $aGuiSize[2] / 2, $aGuiSize[3] / 2) _WinAPI_CombineRgn($hRgn, $hRgn, $hCornerRgn, $RGN_OR) _WinAPI_DeleteObject($hCornerRgn) EndIf If $iLeftDown = False Then $hCornerRgn = _WinAPI_CreateRectRgn(0, $aGuiSize[3] / 2, $aGuiSize[2] / 2, $aGuiSize[3]) _WinAPI_CombineRgn($hRgn, $hRgn, $hCornerRgn, $RGN_OR) _WinAPI_DeleteObject($hCornerRgn) EndIf If $iRightUp = False Then $hCornerRgn = _WinAPI_CreateRectRgn($aGuiSize[2] / 2, 0, $aGuiSize[2], $aGuiSize[3] / 2) _WinAPI_CombineRgn($hRgn, $hRgn, $hCornerRgn, $RGN_OR) _WinAPI_DeleteObject($hCornerRgn) EndIf If $iRightDown = False Then $hCornerRgn = _WinAPI_CreateRectRgn($aGuiSize[2] / 2, $aGuiSize[3] / 2, $aGuiSize[2] - 1, $aGuiSize[3] - 1) _WinAPI_CombineRgn($hRgn, $hRgn, $hCornerRgn, $RGN_OR) _WinAPI_DeleteObject($hCornerRgn) EndIf _WinAPI_SetWindowRgn($hGUI, $hRgn) EndFunc ;==>_SetGuiRoundCorners #region additional GDI+ functions Func _GDIPlus_GraphicsScaleTransform($hGraphics, $nScaleX, $nScaleY, $iOrder = 0) Local $aResult = DllCall($ghGDIPDll, "uint", "GdipScaleWorldTransform", "hwnd", $hGraphics, "float", $nScaleX, "float", $nScaleY, "int", $iOrder) If @error Then Return SetError(@error, @extended, False) Return $aResult[0] = 0 EndFunc ;==>_GDIPlus_GraphicsScaleTransform Func _GDIPlus_GraphicsSetInterpolationMode($hGraphics, $iInterpolationMode) Local $aResult = DllCall($ghGDIPDll, "uint", "GdipSetInterpolationMode", "hwnd", $hGraphics, "int", $iInterpolationMode) If @error Then Return SetError(@error, @extended, False) Return $aResult[0] = 0 EndFunc ;==>_GDIPlus_GraphicsSetInterpolationMode Func _GDIPlus_LineBrushCreateFromRectWithAngle($tRectF, $iARGBClr1, $iARGBClr2, $nAngle, $fIsAngleScalable = True, $iWrapMode = 0) Local $pRectF, $aResult $pRectF = DllStructGetPtr($tRectF) $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateLineBrushFromRectWithAngle", "ptr", $pRectF, "uint", $iARGBClr1, "uint", $iARGBClr2, "float", $nAngle, "int", $fIsAngleScalable, "int", $iWrapMode, "int*", 0) If @error Then Return SetError(@error, @extended, 0) Return $aResult[7] EndFunc ;==>_GDIPlus_LineBrushCreateFromRectWithAngle Func _GDIPlus_GraphicsSetClipRegion($hGraphics, $hRegion, $iCombineMode = 0) Local $aResult = DllCall($ghGDIPDll, "uint", "GdipSetClipRegion", "hwnd", $hGraphics, "hwnd", $hRegion, "int", $iCombineMode) If @error Then Return SetError(@error, @extended, False) Return $aResult[0] = 0 EndFunc Func _GDIPlus_RegionCreateFromRect($tRectF) Local $pRectF, $aResult $pRectF = DllStructGetPtr($tRectF) $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateRegionRect", "ptr", $pRectF, "int*", 0) If @error Then Return SetError(@error, @extended, 0) Return $aResult[2] EndFunc Func _GDIPlus_RegionCombineRect($hRegion, $tRectF, $iCombineMode = 2) Local $pRectF, $aResult $pRectF = DllStructGetPtr($tRectF) $aResult = DllCall($ghGDIPDll, "uint", "GdipCombineRegionRect", "hwnd", $hRegion, "ptr", $pRectF, "int", $iCombineMode) If @error Then Return SetError(@error, @extended, False) Return $aResult[0] = 0 EndFunc Func _GDIPlus_RegionDispose($hRegion) Local $aResult = DllCall($ghGDIPDll, "uint", "GdipDeleteRegion", "hwnd", $hRegion) If @error Then Return SetError(@error, @extended, False) Return $aResult[0] = 0 EndFunc #endregion If you have the classic theme activate adjust -52 to -38 in _WinAPI_BitBlt($memDC, 0, 0, $iW, $iH, $hGUI_ZoomDC, 0, -52, 0x00CC0020) lines! Btw, how can I check whether classical or Luna theme is activated? Limitations: only updates when window is movedno transparent labelsrelatively slowScreenshot, short AVI video and optimized version by eukalyptus here: AutoIt.de Maybe this effect comes 4 years too late... Br, UEZ
    1 point
×
×
  • Create New...