1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. Micha_he

Beiträge von Micha_he

  • copy & paste und Aufruf eines VB-Scriptes mit AutoIT möglich?

    • Micha_he
    • 8. September 2015 um 11:52

    Meiner Meinung nach, mach doch Dein VBS-Script nichts anderes wie:
    - Fragen nach Nummer
    - Dokument mit Pfad+Name+Nummer+Ext speichern.

    Das kannst Du doch in gmmg's Script (Zeile 30/31) noch einbauen und dann das VBS ganz weglassen. Z.B. so:

    AutoIt
    $txt_Filename = "S:\ARCHIV\Mittelvergabe\Memos\" & InputBox("Eingabe","Nummer vergeben:") & ".doc"
    _Word_DocSaveAs($oDoc, $txt_Filename) ; save as doc")

    (Code ungetestet...)

    Das GUI-Element '$Filename' wären dann natürlich nicht mehr notwendig, wenn Du den Filenamen fest vergibts und nur um die Nummer erweiterst.

  • Deutsche Hilfe installieren

    • Micha_he
    • 12. August 2015 um 12:40

    Ist glaube ich mal bei Win7 mit einen Sicherheitsupdate eingeführt worden, das kompilierte CHM-Dateien nur nach einer Umkonfiguration ausgeführt werden. Lässt sich auch per Gruppenrichtlinie für die gesamte Domäne(lokal daher auch bestimmt direkt per Registry) wieder ausstellen.

    Gruß
    Micha

  • kopieren in win7 xp usw. Ich nix verstehen warum geht nicht?

    • Micha_he
    • 17. Juli 2015 um 14:42

    Außerdem sind für '@DesktopCommonDir' administrative (#RequireAdmin im Script ?) Rechte erforderlich.

    Ggf. wird Dein Script ja unterschiedlich (mal mit, mal ohne Admin-Rechte) gestartet !?

    P.S.: Im Startpost schreibst Du: 'auf Ihren Desktop kopieren?'. Das wäre dann aber eigentlich '@DesktopDir' !

  • Treeview mit Icons und Spalten

    • Micha_he
    • 30. Juni 2015 um 15:36

    +1 (suche ich auch)

  • Ebay Widget

    • Micha_he
    • 11. Juni 2015 um 00:06

    Hab es nochmal rausgesucht, nochmal kurz getestet (da meine Frau es nicht mehr nutzt) und im Post #1 wieder angehängt.

  • Message Box

    • Micha_he
    • 3. Juni 2015 um 12:18

    Ohne jemals etwas mit Excel+AutoIt gemacht zu haben, würde die AutoIt-Hilfe zu '_Excel_BookSaveAs() folgendes empfehlen:

    Code
    _Excel_BookSaveAs ($Appl, $Dateipfad)
    If Not @error Then
    	MsgBox (0,"Excel-Datei", "Überschreiben erfolgreich")
    Else
    	MsgBox(5, "Excel-Datei", "Speichvorgang nicht möglich")
    EndIf
  • Systray Reste? Wie entfernen?

    • Micha_he
    • 20. Mai 2015 um 15:02

    Wenn Du den Ablauf nicht ändern kannst (weil z.B. der Task von einem anderen Programm beendet wird) dann sollte diese verkürzte Variante auch funktionieren:

    Spoiler anzeigen
    [autoit]


    #include <GUIToolBar.au3>

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $sTitle = "SX Virtual Link"

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $hTray = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:1]')
    $iCount = _GUICtrlToolbar_ButtonCount($hTray)
    For $i = 0 To $iCount
    If StringInStr(_GUICtrlToolbar_GetButtonText($hTray, _GUICtrlToolbar_IndexToCommand ($hTray, $i )), $sTitle) Then
    _GUICtrlToolbar_DeleteButton($hTray, _GUICtrlToolbar_IndexToCommand ($hTray, $i ))
    EndIf
    Next

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ;
    ; Function Name: _SysTrayIconHandle($iIndex, $iWin = 1)
    ; Description: Gets hwnd of window associated with systray icon of given index
    ; Parameter(s): $iIndex - icon index (Note: starting from 0)
    ; $iWin
    ; | 1 - ToolbarWindow32, Win2000+
    ; | 2 - NotifyIconOverflowWindow, Win7+
    ;
    ; Requirement(s):
    ; Return Value(s): On Success - Returns hwnd of found icon
    ; On Failure - Sets @error and returns -1
    ; | See _SysTrayGetButtonInfo for @error returns
    ;
    ; Author(s): Tuape, Erik Pilsits
    ;
    ;===============================================================================
    Func _SysTrayIconHandle($iIndex, $iWin = 1)
    Local $TRAYDATA = _SysTrayGetButtonInfo($iIndex, $iWin, 2)
    If @error Then
    Return SetError(@error, 0, -1)
    Else
    Return Ptr(DllStructGetData($TRAYDATA, 1))
    EndIf
    EndFunc ;==>_SysTrayIconHandle

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ; INTERNAL =====================================================================
    ;
    ; Function Name: _SysTrayGetButtonInfo($iIndex, $iWin = 1, $iInfo = 0)
    ; Description: Gets Tray Button Info
    ; Parameter(s): $iIndex - icon index (Note: starting from 0)
    ; $iWin
    ; | 1 - ToolbarWindow32, Win2000+
    ; | 2 - NotifyIconOverflowWindow, Win7+
    ; $iInfo - Info to return
    ; | 1 - TBBUTTON structure
    ; | 2 - TRAYDATA structure
    ; | 3 - tooltip
    ; | 4 - icon position
    ; Requirement(s):
    ; Return Value(s): On Success - Returns requested info
    ; On Failure - Sets @error and returns -1
    ; | 1 - Failed to find tray window
    ; | 2 - Failed to get tray window PID
    ; | 3 - Failed to open process
    ; | 4 - Failed to allocate memory
    ; | 5 - Failed to get TBBUTTON info
    ;
    ; Author(s): Erik Pilsits, Tuape
    ;
    ;===============================================================================
    Func _SysTrayGetButtonInfo($iIndex, $iWin = 1, $iInfo = 1)
    Local Const $TB_GETBUTTON = 1047
    ;~ Local Const $TB_GETBUTTONTEXT = 1099
    ;~ Local Const $TB_GETBUTTONINFO = 1089
    Local Const $TB_GETITEMRECT = 1053
    Local Const $ACCESS = BitOR(0x0008, 0x0010, 0x0400) ; VM_OPERATION, VM_READ, QUERY_INFORMATION
    Local $TBBUTTON
    If @OSArch = "X86" Then
    $TBBUTTON = DllStructCreate("int iBitmap;int idCommand;byte fsState;byte fsStyle;byte bReserved[2];dword dwData;int iString")
    Else ; X64
    $TBBUTTON = DllStructCreate("int iBitmap;int idCommand;byte fsState;byte fsStyle;byte bReserved[6];uint64 dwData;int64 iString")
    EndIf
    Local $TRAYDATA
    If @OSArch = "X86" Then
    $TRAYDATA = DllStructCreate("hwnd hwnd;uint uID;uint uCallbackMessage;dword Reserved[2];handle hIcon")
    Else
    $TRAYDATA = DllStructCreate("uint64 hwnd;uint uID;uint uCallbackMessage;dword Reserved[2];uint64 hIcon")
    EndIf
    Local $trayHwnd = _FindTrayToolbarWindow($iWin)
    If $trayHwnd = -1 Then Return SetError(1, 0, -1)
    Local $return, $err = 0
    Local $ret = DllCall("user32.dll", "dword", "GetWindowThreadProcessId", "hwnd", $trayHwnd, "dword*", 0)
    If @error Or Not $ret[2] Then SetError(2, 0, -1)
    Local $pId = $ret[2]
    Local $procHandle = DllCall("kernel32.dll", "handle", "OpenProcess", "dword", $ACCESS, "bool", False, "dword", $pId)
    If @error Or Not $procHandle[0] Then Return SetError(3, 0, -1)
    Local $lpData = DllCall("kernel32.dll", "ptr", "VirtualAllocEx", "handle", $procHandle[0], "ptr", 0, "ulong", DllStructGetSize($TBBUTTON), "dword", 0x1000, "dword", 0x04)
    If Not @error And $lpData[0] Then
    $ret = DllCall("user32.dll", "lresult", "SendMessageW", "hwnd", $trayHwnd, "uint", $TB_GETBUTTON, "wparam", $iIndex, "lparam", $lpData[0])
    If Not @error And $ret[0] Then
    DllCall("kernel32.dll", "bool", "ReadProcessMemory", "handle", $procHandle[0], "ptr", $lpData[0], "struct*", $TBBUTTON, "ulong", DllStructGetSize($TBBUTTON), "ulong*", 0)
    Switch $iInfo
    Case 2
    ; TRAYDATA structure
    DllCall("kernel32.dll", "bool", "ReadProcessMemory", "handle", $procHandle[0], "ptr", DllStructGetData($TBBUTTON, 6), "struct*", $TRAYDATA, "ulong", DllStructGetSize($TRAYDATA), "ulong*", 0)
    $return = $TRAYDATA
    Case 3
    ; tooltip
    $return = ""
    If BitShift(DllStructGetData($TBBUTTON, 7), 16) <> 0 Then
    Local $intTip = DllStructCreate("wchar[1024]")
    ; we have a pointer to a string, otherwise it is an internal resource identifier
    DllCall("kernel32.dll", "bool", "ReadProcessMemory", "handle", $procHandle[0], "ptr", DllStructGetData($TBBUTTON, 7), "struct*", $intTip, "ulong", DllStructGetSize($intTip), "ulong*", 0)
    $return = DllStructGetData($intTip, 1)
    ;else internal resource
    EndIf
    Case 4
    ; icon position
    If Not BitAND(DllStructGetData($TBBUTTON, 3), 8) Then ; 8 = TBSTATE_HIDDEN
    Local $pos[2], $RECT = DllStructCreate("int;int;int;int")
    DllCall("user32.dll", "lresult", "SendMessageW", "hwnd", $trayHwnd, "uint", $TB_GETITEMRECT, "wparam", $iIndex, "lparam", $lpData[0])
    DllCall("kernel32.dll", "bool", "ReadProcessMemory", "handle", $procHandle[0], "ptr", $lpData[0], "struct*", $RECT, "ulong", DllStructGetSize($RECT), "ulong*", 0)
    $ret = DllCall("user32.dll", "int", "MapWindowPoints", "hwnd", $trayHwnd, "ptr", 0, "struct*", $RECT, "uint", 2)
    $pos[0] = DllStructGetData($RECT, 1)
    $pos[1] = DllStructGetData($RECT, 2)
    $return = $pos
    Else
    $return = -1
    EndIf
    Case Else
    ; TBBUTTON
    $return = $TBBUTTON
    EndSwitch
    Else
    $err = 5
    EndIf
    DllCall("kernel32.dll", "bool", "VirtualFreeEx", "handle", $procHandle[0], "ptr", $lpData[0], "ulong", 0, "dword", 0x8000)
    Else
    $err = 4
    EndIf
    DllCall("kernel32.dll", "bool", "CloseHandle", "handle", $procHandle[0])
    If $err Then
    Return SetError($err, 0, -1)
    Else
    Return $return
    EndIf
    EndFunc ;==>_SysTrayGetButtonInfo

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ;
    ; Function Name: _FindTrayToolbarWindow($iWin = 1)
    ; Description: Utility function for finding Toolbar window hwnd
    ; Parameter(s): $iWin
    ; | 1 - ToolbarWindow32, Win2000+
    ; | 2 - NotifyIconOverflowWindow, Win7+
    ;
    ; Requirement(s):
    ; Return Value(s): On Success - Returns Toolbar window hwnd
    ; On Failure - returns -1
    ;
    ; Author(s): Tuape, Erik Pilsits
    ;
    ;===============================================================================
    Func _FindTrayToolbarWindow($iWin = 1)
    Local $hwnd, $ret = -1
    If $iWin = 1 Then
    $hWnd = DllCall("user32.dll", "hwnd", "FindWindow", "str", "Shell_TrayWnd", "ptr", 0)
    If @error Then Return -1
    $hWnd = DllCall("user32.dll", "hwnd", "FindWindowEx", "hwnd", $hWnd[0], "hwnd", 0, "str", "TrayNotifyWnd", "ptr", 0)
    If @error Then Return -1
    If @OSVersion <> "WIN_2000" Then
    $hWnd = DllCall("user32.dll", "hwnd", "FindWindowEx", "hwnd", $hWnd[0], "hwnd", 0, "str", "SysPager", "ptr", 0)
    If @error Then Return -1
    EndIf
    $hWnd = DllCall("user32.dll", "hwnd", "FindWindowEx", "hwnd", $hWnd[0], "hwnd", 0, "str", "ToolbarWindow32", "ptr", 0)
    If @error Then Return -1
    $ret = $hwnd[0]
    ElseIf $iWin = 2 Then
    ; NotifyIconOverflowWindow for Windows 7
    $hWnd = DllCall("user32.dll", "hwnd", "FindWindow", "str", "NotifyIconOverflowWindow", "ptr", 0)
    If @error Then Return -1
    $hWnd = DllCall("user32.dll", "hwnd", "FindWindowEx", "hwnd", $hWnd[0], "hwnd", 0, "str", "ToolbarWindow32", "ptr", 0)
    If @error Then Return -1
    $ret = $hwnd[0]
    EndIf
    Return $ret
    EndFunc ;==>_FindTrayToolbarWindow

    [/autoit]
  • Systray Reste? Wie entfernen?

    • Micha_he
    • 20. Mai 2015 um 10:02

    Ich habe letztens, das indentische Problem so gelöst:

    Spoiler anzeigen
    [autoit]


    #include <GUIToolBar.au3>

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $sTitle = "SX Virtual Link"

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $hTray = ControlGetHandle('[Class:Shell_TrayWnd]', '', '[Class:ToolbarWindow32;Instance:1]')
    $iCount = _GUICtrlToolbar_ButtonCount($hTray)
    For $i = 0 To $iCount
    If StringInStr(_GUICtrlToolbar_GetButtonText($hTray, _GUICtrlToolbar_IndexToCommand ($hTray, $i )), $sTitle) Then
    $iPid = WinGetProcess(_SysTrayIconHandle($i))
    If $iPid > 0 Then
    _GUICtrlToolbar_DeleteButton($hTray, _GUICtrlToolbar_IndexToCommand ($hTray, $i ))
    ProcessClose($iPid)
    EndIf
    EndIf
    Next

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ;
    ; Function Name: _SysTrayIconHandle($iIndex, $iWin = 1)
    ; Description: Gets hwnd of window associated with systray icon of given index
    ; Parameter(s): $iIndex - icon index (Note: starting from 0)
    ; $iWin
    ; | 1 - ToolbarWindow32, Win2000+
    ; | 2 - NotifyIconOverflowWindow, Win7+
    ;
    ; Requirement(s):
    ; Return Value(s): On Success - Returns hwnd of found icon
    ; On Failure - Sets @error and returns -1
    ; | See _SysTrayGetButtonInfo for @error returns
    ;
    ; Author(s): Tuape, Erik Pilsits
    ;
    ;===============================================================================
    Func _SysTrayIconHandle($iIndex, $iWin = 1)
    Local $TRAYDATA = _SysTrayGetButtonInfo($iIndex, $iWin, 2)
    If @error Then
    Return SetError(@error, 0, -1)
    Else
    Return Ptr(DllStructGetData($TRAYDATA, 1))
    EndIf
    EndFunc ;==>_SysTrayIconHandle

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ; INTERNAL =====================================================================
    ;
    ; Function Name: _SysTrayGetButtonInfo($iIndex, $iWin = 1, $iInfo = 0)
    ; Description: Gets Tray Button Info
    ; Parameter(s): $iIndex - icon index (Note: starting from 0)
    ; $iWin
    ; | 1 - ToolbarWindow32, Win2000+
    ; | 2 - NotifyIconOverflowWindow, Win7+
    ; $iInfo - Info to return
    ; | 1 - TBBUTTON structure
    ; | 2 - TRAYDATA structure
    ; | 3 - tooltip
    ; | 4 - icon position
    ; Requirement(s):
    ; Return Value(s): On Success - Returns requested info
    ; On Failure - Sets @error and returns -1
    ; | 1 - Failed to find tray window
    ; | 2 - Failed to get tray window PID
    ; | 3 - Failed to open process
    ; | 4 - Failed to allocate memory
    ; | 5 - Failed to get TBBUTTON info
    ;
    ; Author(s): Erik Pilsits, Tuape
    ;
    ;===============================================================================
    Func _SysTrayGetButtonInfo($iIndex, $iWin = 1, $iInfo = 1)
    Local Const $TB_GETBUTTON = 1047
    ;~ Local Const $TB_GETBUTTONTEXT = 1099
    ;~ Local Const $TB_GETBUTTONINFO = 1089
    Local Const $TB_GETITEMRECT = 1053
    Local Const $ACCESS = BitOR(0x0008, 0x0010, 0x0400) ; VM_OPERATION, VM_READ, QUERY_INFORMATION
    Local $TBBUTTON
    If @OSArch = "X86" Then
    $TBBUTTON = DllStructCreate("int iBitmap;int idCommand;byte fsState;byte fsStyle;byte bReserved[2];dword dwData;int iString")
    Else ; X64
    $TBBUTTON = DllStructCreate("int iBitmap;int idCommand;byte fsState;byte fsStyle;byte bReserved[6];uint64 dwData;int64 iString")
    EndIf
    Local $TRAYDATA
    If @OSArch = "X86" Then
    $TRAYDATA = DllStructCreate("hwnd hwnd;uint uID;uint uCallbackMessage;dword Reserved[2];handle hIcon")
    Else
    $TRAYDATA = DllStructCreate("uint64 hwnd;uint uID;uint uCallbackMessage;dword Reserved[2];uint64 hIcon")
    EndIf
    Local $trayHwnd = _FindTrayToolbarWindow($iWin)
    If $trayHwnd = -1 Then Return SetError(1, 0, -1)
    Local $return, $err = 0
    Local $ret = DllCall("user32.dll", "dword", "GetWindowThreadProcessId", "hwnd", $trayHwnd, "dword*", 0)
    If @error Or Not $ret[2] Then SetError(2, 0, -1)
    Local $pId = $ret[2]
    Local $procHandle = DllCall("kernel32.dll", "handle", "OpenProcess", "dword", $ACCESS, "bool", False, "dword", $pId)
    If @error Or Not $procHandle[0] Then Return SetError(3, 0, -1)
    Local $lpData = DllCall("kernel32.dll", "ptr", "VirtualAllocEx", "handle", $procHandle[0], "ptr", 0, "ulong", DllStructGetSize($TBBUTTON), "dword", 0x1000, "dword", 0x04)
    If Not @error And $lpData[0] Then
    $ret = DllCall("user32.dll", "lresult", "SendMessageW", "hwnd", $trayHwnd, "uint", $TB_GETBUTTON, "wparam", $iIndex, "lparam", $lpData[0])
    If Not @error And $ret[0] Then
    DllCall("kernel32.dll", "bool", "ReadProcessMemory", "handle", $procHandle[0], "ptr", $lpData[0], "struct*", $TBBUTTON, "ulong", DllStructGetSize($TBBUTTON), "ulong*", 0)
    Switch $iInfo
    Case 2
    ; TRAYDATA structure
    DllCall("kernel32.dll", "bool", "ReadProcessMemory", "handle", $procHandle[0], "ptr", DllStructGetData($TBBUTTON, 6), "struct*", $TRAYDATA, "ulong", DllStructGetSize($TRAYDATA), "ulong*", 0)
    $return = $TRAYDATA
    Case 3
    ; tooltip
    $return = ""
    If BitShift(DllStructGetData($TBBUTTON, 7), 16) <> 0 Then
    Local $intTip = DllStructCreate("wchar[1024]")
    ; we have a pointer to a string, otherwise it is an internal resource identifier
    DllCall("kernel32.dll", "bool", "ReadProcessMemory", "handle", $procHandle[0], "ptr", DllStructGetData($TBBUTTON, 7), "struct*", $intTip, "ulong", DllStructGetSize($intTip), "ulong*", 0)
    $return = DllStructGetData($intTip, 1)
    ;else internal resource
    EndIf
    Case 4
    ; icon position
    If Not BitAND(DllStructGetData($TBBUTTON, 3), 8) Then ; 8 = TBSTATE_HIDDEN
    Local $pos[2], $RECT = DllStructCreate("int;int;int;int")
    DllCall("user32.dll", "lresult", "SendMessageW", "hwnd", $trayHwnd, "uint", $TB_GETITEMRECT, "wparam", $iIndex, "lparam", $lpData[0])
    DllCall("kernel32.dll", "bool", "ReadProcessMemory", "handle", $procHandle[0], "ptr", $lpData[0], "struct*", $RECT, "ulong", DllStructGetSize($RECT), "ulong*", 0)
    $ret = DllCall("user32.dll", "int", "MapWindowPoints", "hwnd", $trayHwnd, "ptr", 0, "struct*", $RECT, "uint", 2)
    $pos[0] = DllStructGetData($RECT, 1)
    $pos[1] = DllStructGetData($RECT, 2)
    $return = $pos
    Else
    $return = -1
    EndIf
    Case Else
    ; TBBUTTON
    $return = $TBBUTTON
    EndSwitch
    Else
    $err = 5
    EndIf
    DllCall("kernel32.dll", "bool", "VirtualFreeEx", "handle", $procHandle[0], "ptr", $lpData[0], "ulong", 0, "dword", 0x8000)
    Else
    $err = 4
    EndIf
    DllCall("kernel32.dll", "bool", "CloseHandle", "handle", $procHandle[0])
    If $err Then
    Return SetError($err, 0, -1)
    Else
    Return $return
    EndIf
    EndFunc ;==>_SysTrayGetButtonInfo

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    ;===============================================================================
    ;
    ; Function Name: _FindTrayToolbarWindow($iWin = 1)
    ; Description: Utility function for finding Toolbar window hwnd
    ; Parameter(s): $iWin
    ; | 1 - ToolbarWindow32, Win2000+
    ; | 2 - NotifyIconOverflowWindow, Win7+
    ;
    ; Requirement(s):
    ; Return Value(s): On Success - Returns Toolbar window hwnd
    ; On Failure - returns -1
    ;
    ; Author(s): Tuape, Erik Pilsits
    ;
    ;===============================================================================
    Func _FindTrayToolbarWindow($iWin = 1)
    Local $hwnd, $ret = -1
    If $iWin = 1 Then
    $hWnd = DllCall("user32.dll", "hwnd", "FindWindow", "str", "Shell_TrayWnd", "ptr", 0)
    If @error Then Return -1
    $hWnd = DllCall("user32.dll", "hwnd", "FindWindowEx", "hwnd", $hWnd[0], "hwnd", 0, "str", "TrayNotifyWnd", "ptr", 0)
    If @error Then Return -1
    If @OSVersion <> "WIN_2000" Then
    $hWnd = DllCall("user32.dll", "hwnd", "FindWindowEx", "hwnd", $hWnd[0], "hwnd", 0, "str", "SysPager", "ptr", 0)
    If @error Then Return -1
    EndIf
    $hWnd = DllCall("user32.dll", "hwnd", "FindWindowEx", "hwnd", $hWnd[0], "hwnd", 0, "str", "ToolbarWindow32", "ptr", 0)
    If @error Then Return -1
    $ret = $hwnd[0]
    ElseIf $iWin = 2 Then
    ; NotifyIconOverflowWindow for Windows 7
    $hWnd = DllCall("user32.dll", "hwnd", "FindWindow", "str", "NotifyIconOverflowWindow", "ptr", 0)
    If @error Then Return -1
    $hWnd = DllCall("user32.dll", "hwnd", "FindWindowEx", "hwnd", $hWnd[0], "hwnd", 0, "str", "ToolbarWindow32", "ptr", 0)
    If @error Then Return -1
    $ret = $hwnd[0]
    EndIf
    Return $ret
    EndFunc ;==>_FindTrayToolbarWindow

    [/autoit]

    Das Icon wird über den Titel gesucht und per'_GUICtrlToolbar_DeleteButton()' entfernt und anschließend der dazugehörige Prozess beendet.

  • Horizontal Bar Chart

    • Micha_he
    • 11. Mai 2015 um 21:59

    Ist doch aber horizontal, oder ?

  • Listview > Hilfe

    • Micha_he
    • 11. Mai 2015 um 17:03

    Wie wäre es mit:

    1. Deinem vernüftig formatierten (nicht wie in Post #6) bisherigen Beispiel-Quellcode
    2. Einer angehängten Beispiel-INI damit man das Programm testen kann und den Fehler reproduzieren kann
    3. eine Fehlerbeschreibung wo das/Dein Problem mit dem vorliegenden Code liegt

    Dann findet sich auch bestimmt jemand, der Dir eine Lösung zeigt. Denn Deine letzten beiden Post's bringen hier auch niemanden weiter... ^^

  • Version Balon-Typ

    • Micha_he
    • 9. Mai 2015 um 11:38

    Bereits kompilierte Programme, benötigen doch die eigentliche Installation gar nicht mehr und sollten auch weiter funktionieren.

    Willst Du sie aber ändern und dann neu kompilieren, musst Du die eine oder andere Funktion mal anpassen. ist doch meist nur ein paar Minuten Arbeit. Meist ändern sich nur die Namen einiger speziellen Funktionen...

    Bein anschließenden Neu kompiliert muss man aber bedenken, das die neueren AutoIt-Versionen keine NT4, später dann auch kein W2k mehr unterstützen. Ist aber wohl eher die Ausnahme.

    Ansonsten einfach die alte Installation sichern und die alten Programme mit dem Compiler aus dem Ordner dieser alten Version compilieren. Ich bin der Meinung das der Include-Ordner relativ zum Compiler genutzt wird.

  • Version Balon-Typ

    • Micha_he
    • 9. Mai 2015 um 09:43

    Kann sein, das das erst mit der V 3.3.10.x eingeführt wurde. Ich konnte im History leider nichts genaues finden. Du benutzt noch die V3.3.8.1 !

  • Eingabe per Tastaturbefehl - Monitor aus?

    • Micha_he
    • 9. Mai 2015 um 08:51

    Er braucht doch nur eine lokale Logdatei mitschreiben, in die er nach jeder Zeile bzw. nach jedem Schleifendurchlauf einen Kommentar anhängt. Später kann er sehen, bis zu welcher Zeile bzw. welchem Schleifendurchlauf das Script lief.

    Einfacher als noch eine TCP-Verbindung ins Leben zu rufen...

  • Version Balon-Typ

    • Micha_he
    • 6. Mai 2015 um 20:33

    Ist richtig, aber in den neueren AutoIt-Versionen kann Du mit z.B. '#pragma compile(ProductVersion, 1.123)' im Sourcecode die Version auch ohne Wrapper setzen und diese wird Dir dann auch mit den Windows Eigenschaften korrekt angezeigt.

    Aber der TE wollte ja das über Taskleisten-Icon angezeigt bekommen und das ist ja dann komplett etwas anderes. Dafür braucht es schon etwas mehr im Source.

    Ich glaube die einfachste Lösung ist (was ich auch das eine oder andere mal schon verwendet habe), einfach im Source die Zeile 'TraySetToolTip("Programmname V1.01")' verwenden. Wenn das Trayicon dann nicht ausgblendet wurde, hat er bereits die Lösung welche ich oben herausgelesen haben. Die VersionsNr kann er dann ja noch variabel gestalten, möglicherweise unter Einsatz von FileGetVersion(), was wiederum die ProductVersion von #pragma ausliest.

  • Eingabe per Tastaturbefehl - Monitor aus?

    • Micha_he
    • 5. Mai 2015 um 08:01
    Zitat von Peter S. Taler

    Der Rechner führt auch andere Arbeiten - auch Autoit scribte - selbstständig aus funktioniert alles (seit z.T. Jahren) reibungslos.

    Soll heißen, zur gleichen Zeit wo das betreffende Script nicht arbeitet, läuft definitiv ein anderes einwandfrei ?

    Dann fällt natürlich auch jeder Idee weg, der Rechner wäre z.B. in einen Energiesparmodus gegangen und wach erst wieder auf, wenn jemand Maus oder Tastatur verwendet. Aber das könnte man dann ja auch streichen...

  • TimeDiff soll Dauer ausgeben

    • Micha_he
    • 29. April 2015 um 14:45
    [autoit]

    FileWrite(@TempDir & "\time.txt", "Time Difference : " & $fDiff & " s")

    [/autoit]
  • FileMove. Wo liegt der Fehler ?

    • Micha_he
    • 13. April 2015 um 11:17

    Aber das macht doch das Scriptbeispiel von Homer J.S. aus Post #3 ?!

  • Pc Modell auslesen und mit IF then verknpfen

    • Micha_he
    • 8. April 2015 um 10:55

    In Deinem Anwendungsfall wäre die Verwendung von Switch wohl besser/übersichtlicher:

    [autoit]


    Switch $Modell ; diese Veriable wird geprüft
    Case $Modell_1 ; und dann mit dieser verglichen
    ;Installation für Modell 1
    Case $Modell_2
    ;Installation für Modell 2
    Case Else
    ;Installation für alle anderen Modelle
    EndSwitch

    [/autoit][autoit][/autoit][autoit][/autoit][autoit]

    ; und hier geht der normale Ablauf nach einer Installation weiter...

    [/autoit]
  • Pc Modell auslesen und mit IF then verknpfen

    • Micha_he
    • 7. April 2015 um 09:09

    Schau einfach mal in die AutoIt-Hilfe unter StringStripWS().

    Dort findest Du das gefragte. Der Befehl entfernt Leerzeichen (WS=WhiteSpace) vorn (1), hinten (2), mehrere zwischen Wörtern (4) und alle (8) oder Kombinationen aus den Einzelwerten. In deinem Anwendungsfall also vorn & hinten = 1+2 ! Egal wie lang der String in der Variablen ist.

  • Forum Problemsammlung

    • Micha_he
    • 2. April 2015 um 13:06

    Habe gerade mal AutoIt-Tags versucht zu verwenden. Im Editor ist bei mir kein Button für AutoIt verfügbar und wenn ich die 'autoit'-Tags direkt schreibe, erscheint beim Absenden folgender Fehler:
    AutoItBBCode.jpg

    Oh, gerade noch etwas gefunden. Ich kann ein Bild direkt mit dem Editor aus der Zwischenablage in den Beitrag einfügen (ohne extra eine Datei hochzuladen). Beim Senden erscheint dann ein Fehler, mein Beitrag wäre länger wie 10000 (ohne Bild sind es mal gerade 200) Zeichen !

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™