Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/12/2025 in all areas

  1. @donnyh13 Hi When we discussed this with @jchd and @jpm in Trac Ticket #3945 then the last table at the end of the web page showed the results with a better alignment, I'm pasting it below : Row Unicode CharacterName \h \v \s [[:space:]] [[:blank:]] -------------------------------------------------------------------------------- # 1 0x0009 HT xX xX xX xX # 2 0x000A LF xX xX xX # 3 0x000B VT xX xX xX # 4 0x000C FF xX xX xX # 5 0x000D CR xX xX xX # 6 0x0020 SPACE xX xX xX xX # 7 0x0085 NEL xX X X # 8 0x00A0 NO-BREAK SPACE xX X X X # 9 0x1680 OGHAM SPACE MARK xX X X X # 10 0x180E MONGOLIAN VOWEL SEPARATOR xX X X X # 11 0x2000 EN QUAD xX X X X # 12 0x2001 EM QUAD xX X X X # 13 0x2002 EN SPACE xX X X X # 14 0x2003 EM SPACE xX X X X # 15 0x2004 THREE-PER-EM SPACE xX X X X # 16 0x2005 FOUR-PER-EM SPACE xX X X X # 17 0x2006 SIX-PER-EM SPACE xX X X X # 18 0x2007 FIGURE SPACE xX X X X # 19 0x2008 PUNCTUATION SPACE xX X X X # 20 0x2009 THIN SPACE xX X X X # 21 0x200A HAIR SPACE xX X X X # 22 0x2028 LINE SEPARATOR xX X X # 23 0x2029 PARAGRAPH SEPARATOR xX X X # 24 0x202F NARROW NO-BREAK SPACE xX X X X # 25 0x205F MEDIUM MATHEMATICAL SPACE xX X X X # 26 0x3000 IDEOGRAPHIC SPACE xX X X X Legend : xX will match with or without (*UCP) in the pattern X alone will match ONLY if (*UCP) is present at the start of the pattern For example let's create a subject starting with "abc" followed by a no-break space (0x00A0) and ending with "def" , so the subject looks like this "abc def" (make sure there is a no-break space in the middle of the subject between abc and def) . Now let's test different patterns : ======================= 2 patterns searching for \h abc\hdef => 1 match (*UCP)abc\hdef => 1 match Both patterns match because xX is indicated for \h (concerning the no-break space) ======================= 2 patterns searching for \s abc\sdef => NO match (*UCP)abc\sdef => 1 match Only the pattern starting with (*UCP) matches because X is indicated for \s (concerning the no-break space) This example could be applied to any of the 26 characters found in the table above Hope it helps
    2 points
  2. Hi @MWIProd 👋 . Please set $_WD_DEBUG = $_WD_DEBUG_Full Run your browser automation Share the console output and *.log file with us Then we will have a better understanding of your capabilities setup and it's more likely that we can help you. Examples for using the _WD_CapabilitiesAdd() can be found here (autoit-webdriver-boilerplate) or here (au3WebDriver). Best regards Sven
    1 point
  3. myLogin 🛡️ Hey guys, I've been working lately on a project developed directly from my GitHub repo. I'm optimizing it as much as possible, minimizing false positives. Feel free to try it out with complete confidence 🤖 Simple open-source program to lock the Windows Desktop screen with advanced options: Disables the desktop while the lock window is active Prevents normal system use Only unlocks with a password set by the administrator
    1 point
  4. rcmaehl

    AFK Detection

    Check powercfg /requests. Things that don't require user input, but prevent the computer from sleeping are listed there.
    1 point
  5. I am working to fix the double_ws
    1 point
  6. Indeed, all these buggy @DOUBLE_WS make this table terribly hard to read. Even copy-pasting the table content to a text editor and replacing @DOUBLE_WS by a couple of spaces doesn't align the columns. I confess being responsible for going deep into (*UCP) details in StringRegEx help (beside having authored the bulk of that help topic) but since we DO have AutoIt users handling cyrillic, greek, asian languages and others, I found it useful to mention everything of value for all users.
    1 point
  7. 1 point
  8. Thanks @pixelsearch, That explains what i'm seeing very well. I thought initially that a table wasn't formatted right in the html. I really appreciate your example and time explaining it. Best regards,
    1 point
  9. Danyfirex

    Sound Playing Detection

    I've not tried that. maybe later. So you can do something like this: #include <WinAPICom.au3> #include <Process.au3> #include <Array.au3> Opt("MustDeclareVars", 1) Global Const $CLSCTX_INPROC_SERVER = 0x01 + 0x02 + 0x04 + 0x10 Global Enum $eRender, $eCapture, $eAll, $EDataFlow_enum_count Global Enum $AudioSessionStateInactive, $AudioSessionStateActive, $AudioSessionStateExpired Global Const $eMultimedia = 1 Global Const $sCLSID_MMDeviceEnumerator = "{BCDE0395-E52F-467C-8E3D-C4579291692E}" Global Const $sIID_IMMDeviceEnumerator = "{A95664D2-9614-4F35-A746-DE8DB63617E6}" Global Const $sTagIMMDeviceEnumerator = _ "EnumAudioEndpoints hresult(int;dword;ptr*);" & _ "GetDefaultAudioEndpoint hresult(int;int;ptr*);" & _ "GetDevice hresult(wstr;ptr*);" & _ "RegisterEndpointNotificationCallback hresult(ptr);" & _ "UnregisterEndpointNotificationCallback hresult(ptr)" Global Const $sIID_IAudioMeterInformation = "{C02216F6-8C67-4B5B-9D00-D008E73E0064}" Global Const $sTagIAudioMeterInformation = "GetPeakValue hresult(float*);" & _ "GetMeteringChannelCount hresult(dword*);" & _ "GetChannelsPeakValues hresult(dword;float*);" & _ "QueryHardwareSupport hresult(dword*);" Global Const $sIID_IMMDevice = "{D666063F-1587-4E43-81F1-B948E807363F}" Global Const $sTagIMMDevice = _ "Activate hresult(clsid;dword;ptr;ptr*);" & _ "OpenPropertyStore hresult(dword;ptr*);" & _ "GetId hresult(wstr*);" & _ "GetState hresult(dword*)" Global Const $sIID_IAudioSessionManager2 = "{77aa99a0-1bd6-484f-8bc7-2c654c9a9b6f}" Global Const $sTagIAudioSessionManager = "GetAudioSessionControl hresult(ptr;dword;ptr*);" & _ "GetSimpleAudioVolume hresult(ptr;dword;ptr*);" Global Const $sTagIAudioSessionManager2 = $sTagIAudioSessionManager & "GetSessionEnumerator hresult(ptr*);" & _ "RegisterSessionNotification hresult(ptr);" & _ "UnregisterSessionNotification hresult(ptr);" & _ "RegisterDuckNotification hresult(wstr;ptr);" & _ "UnregisterDuckNotification hresult(ptr)" Global Const $sIID_IAudioSessionEnumerator = "{e2f5bb11-0570-40ca-acdd-3aa01277dee8}" Global Const $sTagIAudioSessionEnumerator = "GetCount hresult(int*);GetSession hresult(int;ptr*)" Global Const $sIID_IAudioSessionControl = "{f4b1a599-7266-4319-a8ca-e70acb11e8cd}" Global Const $sTagIAudioSessionControl = "GetState hresult(int*);GetDisplayName hresult(wstr*);" & _ "SetDisplayName hresult(wstr);GetIconPath hresult(wstr*);" & _ "SetIconPath hresult(wstr;ptr);GetGroupingParam hresult(ptr*);" & _ "SetGroupingParam hresult(ptr;ptr);RegisterAudioSessionNotification hresult(ptr);" & _ "UnregisterAudioSessionNotification hresult(ptr);" Global Const $sIID_IAudioSessionControl2 = "{bfb7ff88-7239-4fc9-8fa2-07c950be9c6d}" Global Const $sTagIAudioSessionControl2 = $sTagIAudioSessionControl & "GetSessionIdentifier hresult(wstr*);" & _ "GetSessionInstanceIdentifier hresult(wstr*);" & _ "GetProcessId hresult(dword*);IsSystemSoundsSession hresult();" & _ "SetDuckingPreferences hresult(bool);" Global $bExit= not False HotKeySet("{ESC}","_Exit") _WinAPI_CoInitialize() Local $aApp =0 While $bExit $aApp = _GetAppsPlayingSound() If IsArray($aApp) then ConsoleWrite("!SoundDetected!!!" & @CRLF) For $i= 0 to UBound($aApp)-1 ConsoleWrite($aApp[$i][0] & @CRLF) Next ConsoleWrite("!End" & @CRLF) EndIf Sleep(100) WEnd _WinAPI_CoUninitialize() Func _Exit() $bExit=False EndFunc Func _GetAppsPlayingSound() Local $pIMMDevice = 0 Local $oMMDevice = 0 Local $pIAudioSessionManager2 = 0 Local $oIAudioSessionManager2 = 0 Local $pIAudioSessionEnumerator = 0 Local $oIAudioSessionEnumerator = 0 Local $nSessions = 0 Local $oMMDeviceEnumerator = 0 Local $aApp[0] Local $pIAudioSessionControl2 = 0 Local $oIAudioSessionControl2 = 0 Local $oIAudioMeterInformation = 0 Local $ProcessID = 0 Local $fPeakValue = 0 Local $iState = 0 Local $iVolume = 0 Local $oErrorHandler = 0 $oErrorHandler = ObjEvent("AutoIt.Error", "_ErrFunc") $oMMDeviceEnumerator = ObjCreateInterface($sCLSID_MMDeviceEnumerator, $sIID_IMMDeviceEnumerator, $sTagIMMDeviceEnumerator) If @error Then Return $aApp If SUCCEEDED($oMMDeviceEnumerator.GetDefaultAudioEndpoint($eRender, $eMultimedia, $pIMMDevice)) Then ;eRender $oMMDevice = ObjCreateInterface($pIMMDevice, $sIID_IMMDevice, $sTagIMMDevice) $oMMDevice.Activate($sIID_IAudioSessionManager2, $CLSCTX_INPROC_SERVER, 0, $pIAudioSessionManager2) $oIAudioSessionManager2 = ObjCreateInterface($pIAudioSessionManager2, $sIID_IAudioSessionManager2, $sTagIAudioSessionManager2) $oIAudioSessionManager2.GetSessionEnumerator($pIAudioSessionEnumerator) $oIAudioSessionEnumerator = ObjCreateInterface($pIAudioSessionEnumerator, $sIID_IAudioSessionEnumerator, $sTagIAudioSessionEnumerator) $oIAudioSessionEnumerator.GetCount($nSessions) For $i = 0 To $nSessions - 1 $oIAudioSessionEnumerator.GetSession($i, $pIAudioSessionControl2) $oIAudioSessionControl2 = ObjCreateInterface($pIAudioSessionControl2, $sIID_IAudioSessionControl2, $sTagIAudioSessionControl2) $oIAudioSessionControl2.GetState($iState) If $iState = $AudioSessionStateActive Then $oIAudioSessionControl2.GetProcessId($ProcessID) $oIAudioMeterInformation = ObjCreateInterface($pIAudioSessionControl2, $sIID_IAudioMeterInformation, $sTagIAudioMeterInformation) $oIAudioSessionControl2.AddRef $oIAudioMeterInformation.GetPeakValue($fPeakValue) If $fPeakValue > 0 Then ReDim $aApp[UBound($aApp) + 1][2] $aApp[UBound($aApp) - 1][0] = _ProcessGetName($ProcessID) $aApp[UBound($aApp) - 1][1] = $fPeakValue EndIf EndIf $fPeakValue = 0 $iState = 0 $ProcessID = 0 $oIAudioMeterInformation = 0 $oIAudioSessionControl2 = 0 Next $oIAudioSessionEnumerator = 0 $oIAudioSessionManager2 = 0 $oMMDevice = 0 $oMMDeviceEnumerator = 0 If UBound($aApp) = 0 Then $aApp = 0 Return $aApp Else Return 0 EndIf EndFunc ;==>_GetAppsPlayingSound Func SUCCEEDED($hr) Return ($hr >= 0) EndFunc ;==>SUCCEEDED ; User's COM error function. Will be called if COM error occurs Func _ErrFunc($oError) ; Do anything here. ConsoleWrite(@ScriptName & " (" & $oError.scriptline & ") : ==> COM Error intercepted !" & @CRLF & _ @TAB & "err.number is: " & @TAB & @TAB & "0x" & Hex($oError.number) & @CRLF & _ @TAB & "err.windescription:" & @TAB & $oError.windescription & @CRLF & _ @TAB & "err.description is: " & @TAB & $oError.description & @CRLF & _ @TAB & "err.source is: " & @TAB & @TAB & $oError.source & @CRLF & _ @TAB & "err.helpfile is: " & @TAB & $oError.helpfile & @CRLF & _ @TAB & "err.helpcontext is: " & @TAB & $oError.helpcontext & @CRLF & _ @TAB & "err.lastdllerror is: " & @TAB & $oError.lastdllerror & @CRLF & _ @TAB & "err.scriptline is: " & @TAB & $oError.scriptline & @CRLF & _ @TAB & "err.retcode is: " & @TAB & "0x" & Hex($oError.retcode) & @CRLF & @CRLF) EndFunc ;==>_ErrFunc Saludos
    1 point
×
×
  • Create New...