Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/17/2024 in all areas

  1. argumentum

    Taskbar problems

    ..never mind. had to be DllStructCreate("dword;hwnd;dword;dword;int[4];dword")
    2 points
  2. ioa747

    Taskbar problems

    @Nine thanks for sharing I removed the unnecessary call DllStructSetData() I updated it above
    1 point
  3. Nine

    Taskbar problems

    Based on MSDN for ABM_GETSTATE message : Tested (x86, x64) without : DllStructSetData($tAPPBARDATA, 2, WinGetHandle('[CLASS:Shell_TrayWnd]')) And it is working just fine. Not a big deal, but I was doubtful on why we would need to provide this information.
    1 point
  4. ioa747

    Taskbar problems

    @argumentum Thank you, now also works on x64 I filled in something else that was missing $iCurrentState = $iNewState ;*** <--- that was missing If $iState = 1 Or $iState = 2 Then If $iCurrentState <> $iState Then DllCall('shell32.dll', 'int', 'SHAppBarMessage', 'dword', $ABM_SETSTATE, 'ptr', DllStructGetPtr($tAPPBARDATA)) $iCurrentState = $iNewState ;*** <--- that was missing EndIf ElseIf $iState = 3 Then DllCall('shell32.dll', 'int', 'SHAppBarMessage', 'dword', $ABM_SETSTATE, 'ptr', DllStructGetPtr($tAPPBARDATA)) $iCurrentState = $iNewState EndIf
    1 point
  5. ioa747

    Confirm script:

    Sorry, it seems I forgot other things too. here's a closer look ; ----------------------------------------------- #include <FileConstants.au3> #include <MsgBoxConstants.au3> ; ----------------------------------------------- Opt("MustDeclareVars", 1) ; ----------------------------------------------- _SelectEdlFile() ; ----------------------------------------------- Func _SelectEdlFile() While 1 Local $sMessage = "Open Session File" Local $_SelectEdlFile = FileOpenDialog($sMessage, "C:\SAWStudio64\Audio", "Session File (*.edl)", $FD_FILEMUSTEXIST) If FileExists($_SelectEdlFile) Then ExitLoop MsgBox($MB_TOPMOST, "NOTICE!", "No valid Session .edl data file was selected." & @CRLF & "Please select a valid Session .edl data file") WEnd _LaunchTTA() _LaunchEdl($_SelectEdlFile) EndFunc ;==>_SelectEdlFile ; ----------------------------------------------- Func _LaunchTTA() Run("C:\Windows\toggleTaskbarAutohide.exe") Sleep(100) EndFunc ;==>_LaunchTTA ; ----------------------------------------------- Func _LaunchEdl($_SelectEdlFile) Local $_sSrcPath1 = FileGetShortName("C:\RML\SAW\SAWStudio64.exe") Local $_sSrcPath2 = $_sSrcPath1 & ' "' & $_SelectEdlFile & '"' ; to avoid problems if empty space in path ConsoleWrite("$_sSrcPath2: " & $_sSrcPath2 & @CRLF) ; ----------------------------------------------- Run($_sSrcPath2) ; ----------------- MouseMove(340, 195, 0) Sleep(2000) ; Is there a reason you're waiting here? EndFunc ;==>_LaunchEdl ; ----------------------------------------------- What was it really? Did I forget something?
    1 point
  6. ioa747

    Taskbar problems

    @sylremo thank you for this I modified it according to my needs ; https://www.autoitscript.com/forum/topic/154281-taskbar-problems/?do=findComment&comment=1517375 ; FileVersion:3, Testet on Win10 22H2, with AutoIt Version:3.3.16.1 ;---------------------------------------------------------------------------------------- #AutoIt3Wrapper_AU3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 ;~ #AutoIt3Wrapper_UseX64=y ConsoleWrite("TaskbarState=" & TaskbarState() & @CRLF) ; #FUNCTION# -------------------------------------------------------------------------------------------------------------------- ; Name...........: TaskbarState ; Description....: Sets or gets the state of the taskbar. ; Syntax.........: TaskbarState([$iState]) ; Parameters.....: $iState - [optional] The new state of the taskbar. Can be one of the following values: ; 1 - Auto-hide the taskbar. ; 2 - Always on top. ; 3 - Toggle the current state of the taskbar. ; Return values..: The current state of the taskbar. Can be one of the following values: ; Success: 1 = Auto-hide, 2 = Always on top. ; Failure: 0 and sets the @error flag to non-zero. ; Author ........: sylremo, mod:ioa747 ; Notes .........: if no value in $iState then return the state of the taskbar ; Link ..........: https://www.autoitscript.com/forum/topic/154281-taskbar-problems/#comment-1538596 ;-------------------------------------------------------------------------------------------------------------------------------- Func TaskbarState($iState = "") Local Const $ABM_GETSTATE = 0x00000004 Local Const $ABM_SETSTATE = 0x0000000A Local Const $ABS_AUTOHIDE = 0x00000001 Local Const $ABS_ALWAYSONTOP = 0x00000002 Local $tAPPBARDATA = DllStructCreate('dword;hwnd;dword;dword;int[4];dword') DllStructSetData($tAPPBARDATA, 1, DllStructGetSize($tAPPBARDATA)) Local $iCurrentState = DllCall('shell32.dll', 'int', 'SHAppBarMessage', 'dword', $ABM_GETSTATE, 'ptr', DllStructGetPtr($tAPPBARDATA)) If Not @error And IsArray($iCurrentState) Then Local $iNewState = $iCurrentState[0] ? $ABS_ALWAYSONTOP : $ABS_AUTOHIDE DllStructSetData($tAPPBARDATA, 6, $iNewState) $iCurrentState = $iCurrentState[0] = 1 ? 1 : 2 If $iState = 1 Or $iState = 2 Then If $iCurrentState <> $iState Then DllCall('shell32.dll', 'int', 'SHAppBarMessage', 'dword', $ABM_SETSTATE, 'ptr', DllStructGetPtr($tAPPBARDATA)) $iCurrentState = $iNewState EndIf ElseIf $iState = 3 Then DllCall('shell32.dll', 'int', 'SHAppBarMessage', 'dword', $ABM_SETSTATE, 'ptr', DllStructGetPtr($tAPPBARDATA)) $iCurrentState = $iNewState EndIf Return $iCurrentState EndIf Return SetError(1, 0, 0) EndFunc ;==>TaskbarState Thanks to @argumentum it now also works on x64 Thanks to @Nine I removed the unnecessary call DllStructSetData()
    1 point
×
×
  • Create New...