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. funkey

Beiträge von funkey

  • Transparente Combobox (OwnCombo)

    • funkey
    • 8. September 2010 um 21:47

    Hab mal wieder was gebastelt.
    Das ganze ist noch ausbaufähig, ich weiß, aber bereits einsetzbar.

    Viel Spaß!

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>

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

    Opt("GUIOnEventMode", 1)

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

    Global $VisToggle = 0

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

    GUICreate("OwnCombo-Test", 400, 200)
    GUISetOnEvent(-3, "_Exit")

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

    GUICtrlCreatePic(StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", 0, -1)) & "Examples\GUI\msoobe.jpg", 0, 0, 400, 200, 0)

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

    GUICtrlCreateLabel("OwnCombo", 20, 50, 100, 20, 0x201)
    GUICtrlSetBkColor(-1, -2)
    GUICtrlCreateLabel("Standard Combo", 220, 50, 100, 20, 0x201)
    GUICtrlSetBkColor(-1, -2)

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

    Global $hOwnCombo = _OwnCombo_Create("Hello1|Hello2|Hello3|Hello4|Hello5", 20, 80, 100, 80, -2)

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

    GUICtrlCreateCombo("", 220, 80, 100, 80)
    GUICtrlSetData(-1, "Hello1|Hello2|Hello3|Hello4|Hello5", "Hello1") ; add other item snd set a new default
    GUICtrlSetBkColor(-1, -2)

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

    GUISetState()

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

    While 1
    Sleep(20000)
    WEnd

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

    Func _OwnCombo_Create($sText, $iLeft, $iTop, $iWidth, $iHeight, $iColor = -1)
    Local $hInput, $hList, $hButton, $aText
    $aText = StringSplit($sText, "|")
    $hList = GUICtrlCreateListView("OwnCombo", $iLeft, $iTop + 18, $iWidth, $iHeight, BitOR(0x4000, 0x8000, 0x4, 0x8), BitOR(0x8, 0x20, 0x200))
    GUICtrlSendMsg(-1, 4167, 0, 1)
    GUICtrlSendMsg(-1, 4126, 0, $iWidth - 4)
    GUICtrlSetState(-1, $GUI_HIDE)
    $hButton = GUICtrlCreateButton("u", $iLeft + $iWidth - 18, $iTop + 2, 16, 16, Default, 0x20)
    GUICtrlSetOnEvent(-1, "_OwnCombo_ShowHide")
    GUICtrlSetFont(-1, 10, Default, 0, "Marlett")
    $hInput = GUICtrlCreateLabel($aText[1], $iLeft, $iTop, $iWidth, 20, 0x1200)
    If $iColor <> -1 Then
    GUICtrlSetBkColor($hInput, $iColor)
    GUICtrlSetBkColor($hList, $iColor)
    EndIf
    For $i = 1 To $aText[0]
    GUICtrlCreateListViewItem($aText[$i], $hList)
    GUICtrlSetOnEvent(-1, "_OwnCombo_SetSelText")
    Next
    GUICtrlSetState($hInput, $GUI_FOCUS)
    Return $hList
    EndFunc

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

    Func _OwnCombo_ShowHide()
    Local $CtrlID = @GUI_CtrlId - 1
    $VisToggle = Not $VisToggle
    GUICtrlSetState($CtrlID, $GUI_FOCUS)
    If $VisToggle Then
    GUICtrlSetState($CtrlID, $GUI_SHOW)
    Else
    GUICtrlSetState($CtrlID, $GUI_HIDE)
    EndIf
    EndFunc

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

    Func _OwnCombo_SetSelText()
    $VisToggle = 0
    GUICtrlSetState($hOwnCombo + 2, $GUI_FOCUS)
    GUICtrlSetData($hOwnCombo + 2, StringTrimRight(GUICtrlRead(GUICtrlRead($hOwnCombo)), 1))
    GUICtrlSetState($hOwnCombo, $GUI_HIDE)
    EndFunc

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

    Func _Exit()
    Exit
    EndFunc

    [/autoit] [autoit][/autoit] [autoit][/autoit]
  • GUIRegisterMsg Problem!

    • funkey
    • 8. September 2010 um 14:37

    Wofür GuiRegisterMsg?

    Spoiler anzeigen
    [autoit]

    #include <GuiMenu.au3>
    #include <GuiConstantsEx.au3>
    #include <WinAPI.au3>
    #include <WindowsConstants.au3>

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

    Global Enum $idOpen = 1000, $idSave, $idInfo

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

    $hGUI = GUICreate("Menu", 400, 300)
    $hLabel = GUICtrlCreateLabel("",0,0,400,300,0, $GUI_WS_EX_PARENTDRAG)
    GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
    $hMenu = GUICtrlCreateContextMenu($hLabel)
    $hMenuOpen = GUICtrlCreateMenuItem("Open", $hMenu)
    $hMenuSave = GUICtrlCreateMenuItem("Save", $hMenu)
    $hMenuInfo = GUICtrlCreateMenuItem("Info", $hMenu)

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

    GUISetState()

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

    ; Loop until user exits
    Global $msg

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

    While 1
    $msg = GUIGetMsg()
    Switch $msg
    Case $hMenuOpen
    _WinAPI_ShowMsg ("Open")
    Case $hMenuSave
    _WinAPI_ShowMsg ("Save")
    Case $hMenuInfo
    _WinAPI_ShowMsg ("Info")
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

    [/autoit]
  • peethebee ist B.Sc.

    • funkey
    • 2. September 2010 um 17:30

    Gratuliere!! Tolle Leistung! :thumbup::thumbup:
    Wir sind auch stolz auf dich!!

  • SysListView32 - bei dem Prog TweakUI

    • funkey
    • 25. August 2010 um 16:52

    Hab mal die Änderung der Registrywerte umgesetzt.

    Spoiler anzeigen
    [autoit]

    Local $Papierkorb = "{645FF040-5081-101B-9F08-00AA002F954E}"
    Local $InternetExplorer = "{871C5380-42A0-1069-A2EA-08002B30309D}"
    Local $Netzwerkumgebung = "{208D2C60-3AEA-1069-A2D7-08002B30309D}"
    Local $EigeneDateien = "{450D8FBA-AD25-11D0-98A8-0800361B1103}"
    Local $Arbeitsplatz = "{20D04FE0-3AEA-1069-A2D8-08002B30309D}"

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

    Local $RegKeyName = "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu"
    Local $Hide = 1

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

    RegWrite($RegKeyName, $Papierkorb, "REG_DWORD", $Hide)
    RegWrite($RegKeyName, $InternetExplorer, "REG_DWORD", $Hide)
    RegWrite($RegKeyName, $Netzwerkumgebung, "REG_DWORD", $Hide)
    RegWrite($RegKeyName, $EigeneDateien, "REG_DWORD", $Hide)
    RegWrite($RegKeyName, $Arbeitsplatz, "REG_DWORD", $Hide)

    [/autoit]
  • Mehrere Fragen/Probleme

    • funkey
    • 25. August 2010 um 12:17

    [ offen ] CPU Auslastung

    Spoiler anzeigen
    [autoit]

    ;----------------------------------
    #region
    #AutoIt3Wrapper_UseX64=n
    #endregion
    ;----------------------------------
    #include <GuiConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <INet.au3>
    #include <Date.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>

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

    ; GUI
    $title = "Red Dragon Tool"
    $font="Times New Roman FETT"
    $font2="Times New Roman FETT KURSIV"
    $PublicIP = _GetIP()
    $username = @UserName
    $osversion = @OSVersion & " , " & @OSType & " , " & @OSArch & " , " & @OSBuild
    GuiCreate($title, 300, 380)
    GUISetBkColor(0xff0000)

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

    ;-----------------------
    Local Const $wbemFlagReturnImmediately = 0x10
    Local Const $wbemFlagForwardOnly = 0x20
    ;-----------------------

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

    Global $blink = True
    $Label1 = GUICtrlCreateLabel("", 55, 195, 100, 12)
    $Label2 = GUICtrlCreateLabel("", 55, 210, 100, 12)
    ;---------------------------------------Datum
    _date()

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

    GUISetState(@SW_SHOW)

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

    AdlibRegister("_date", 1000)
    ;---------------------------------------Uhr
    _time()

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

    GUISetState(@SW_SHOW)

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

    AdlibRegister("_time", 1000)
    ;---------------------------------------

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

    ; GROUP WITH RADIO BUTTONS
    GuiCtrlCreateGroup("Spiele", 170, 25, 80, 150)
    GUICtrlSetColor(-1, 0x0000FF)
    GUICtrlSetFont (-1,8.5, -1, -1, $font)
    GuiCtrlCreateGroup("Infos", 50, 175, 200, 120)
    GUICtrlSetFont (-1,8.5, -1, -1, $font)
    ;---------------------------------------------
    $Spiel_1 = GuiCtrlCreateRadio("Cabal", 180, 40, 55)
    ;---------------------------------------------
    $spiel_2 = GuiCtrlCreateRadio("CSS", 180, 60, 55)
    ;---------------------------------------------
    $spiel_3 = GuiCtrlCreateRadio("C.A.", 180, 80, 55)
    ;---------------------------------------------
    $spiel_4 = GuiCtrlCreateRadio("Shift", 180, 100, 55)
    ;---------------------------------------------
    $spiel_5 = GuiCtrlCreateRadio("Alien S.", 180, 120, 55)
    ;---------------------------------------------
    $spiel_6 = GuiCtrlCreateRadio("Pinball", 180, 140, 55)
    ;---------------------------------------------
    GUICtrlCreateGroup ("",-99,-99,1,1) ;close group

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

    ; BUTTON
    $button_1 = GuiCtrlCreateButton("OK", 50, 300, 100)
    $button_2 = GuiCtrlCreateButton("Schließen", 150, 300, 100)

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

    $button_3 = GuiCtrlCreateButton("C:\ (Windows)", 50, 75, 100)
    $button_4 = GuiCtrlCreateButton("D:\ (Filme)", 50, 100, 100)
    $button_5 = GuiCtrlCreateButton("E:\ (Musik)", 50, 125, 100)
    $button_6 = GuiCtrlCreateButton("F:\ (Daten)", 50, 150, 100)
    ;Menü
    $Menu1 = GUICtrlCreateMenu ("Hintergrundfarbe")
    $Menu1_1 = GUICtrlCreateMenuitem ("Rot", $Menu1)
    $Menu1_2 = GUICtrlCreateMenuitem ("Blau", $Menu1)
    $Menu1_3 = GUICtrlCreateMenuitem ("Gelb", $Menu1)
    $Menu1_4 = GUICtrlCreateMenuitem ("Schwarz", $Menu1)
    $Menu1_5 = GUICtrlCreateMenuitem ("Grün", $Menu1)
    $Menu1_6 = GUICtrlCreateMenuitem ("Pink", $Menu1)
    $Menu1_7 = GUICtrlCreateMenuitem ("Violett", $Menu1)
    $Menu1_8 = GUICtrlCreateMenuitem ("Braun", $Menu1)
    $Menu1_9 = GUICtrlCreateMenuitem ("Weiß", $Menu1)
    $Menu1_r = GUICtrlCreateMenuitem ("Random", $Menu1)
    ;Label
    GuiCtrlCreateLabel("RED DRAGON", 50, 25,120)
    GUICtrlSetFont (-1,11, -1, -1, $font2)
    GuiCtrlCreateLabel("Tool", 50, 40,100,12)
    GUICtrlSetFont (-1,10, -1, -1, $font2)
    GuiCtrlCreateLabel("IP: " & $PublicIP, 55, 265,100,12)
    GuiCtrlCreateLabel("", 55, 221,100,5)
    GuiCtrlCreateLabel($username, 55, 230,100,12)
    GuiCtrlCreateLabel($osversion, 55, 280,175,12)
    GuiCtrlCreateLabel("CPU Kerne: " & _GetCoreCount(), 55, 250,175,12)

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

    ; (c)
    GuiCtrlCreateLabel("© Xilent", 120, 350,100,12)

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

    ; GUI MESSAGE LOOP
    GuiSetState()
    While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $button_1
    If $Spiel_1 And GUICtrlRead($Spiel_1) = $GUI_CHECKED Then
    Run("C:\Program Files\Games-Masters.com\CABAL Online (EU)\cabal.exe")
    ElseIf $Spiel_2 And GUICtrlRead($Spiel_2) = $GUI_CHECKED Then
    Run("")
    ElseIf $Spiel_3 And GUICtrlRead($Spiel_3) = $GUI_CHECKED Then
    Run("C:\Nexon\Combat Arms EU\CombatArms.exe")
    ElseIf $Spiel_4 And GUICtrlRead($Spiel_4) = $GUI_CHECKED Then
    Run("C:\Program Files\Electronic Arts\Need for Speed SHIFT\shift.exe")
    ElseIf $Spiel_5 And GUICtrlRead($Spiel_5) = $GUI_CHECKED Then
    Run("C:\Users\Sascha\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Steam")
    ElseIf $Spiel_6 And GUICtrlRead($Spiel_6) = $GUI_CHECKED Then
    Run("C:\Program Files\Microsoft Games\Pinball\PINBALL.exe")
    EndIf
    Case $msg = $button_2
    Exit
    Case $msg = $button_3
    Run(@ComSpec & " /c " & 'start C:\', "", @SW_HIDE)
    Case $msg = $button_4
    Run(@ComSpec & " /c " & 'start D:\', "", @SW_HIDE)
    Case $msg = $button_5
    Run(@ComSpec & " /c " & 'start E:\', "", @SW_HIDE)
    Case $msg = $button_6
    Run(@ComSpec & " /c " & 'start F:\', "", @SW_HIDE)
    Case $msg = $GUI_EVENT_CLOSE
    Exit
    Case $msg = $Menu1_1
    AdlibUnRegister("_Random_BG")
    GUISetBkColor(0xff0000)
    Case $msg = $Menu1_2
    AdlibUnRegister("_Random_BG")
    GUISetBkColor(0x0000FF)
    Case $msg = $Menu1_3
    AdlibUnRegister("_Random_BG")
    GUISetBkColor(0xFFFF00)
    Case $msg = $Menu1_4
    AdlibUnRegister("_Random_BG")
    GUISetBkColor(0x000000)
    Case $msg = $Menu1_5
    AdlibUnRegister("_Random_BG")
    GUISetBkColor(0x00FF00)
    Case $msg = $Menu1_6
    AdlibUnRegister("_Random_BG")
    GUISetBkColor(0xFF00FF)
    Case $msg = $Menu1_7
    AdlibUnRegister("_Random_BG")
    GUISetBkColor(0x800080)
    Case $msg = $Menu1_8
    AdlibUnRegister("_Random_BG")
    GUISetBkColor(0x800000)
    Case $msg = $Menu1_9
    AdlibUnRegister("_Random_BG")
    GUISetBkColor(0xFFFFFF)
    Case $msg = $Menu1_r
    AdlibRegister("_Random_BG", 1000)
    _Random_BG()
    EndSelect
    WEnd

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

    Func _Random_BG()
    GUISetBkColor(Random(100, 0xFFFFFF, 1))
    EndFunc

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

    ;----------------------------------------------------------Uhr
    Func _time()
    If $blink Then
    GUICtrlSetData($Label1, @HOUR & ':' & @MIN & ':' & @SEC)
    $blink = Not $blink
    Else
    GUICtrlSetData($Label1, @HOUR & ':' & @MIN & ':' & @SEC)
    $blink = Not $blink
    EndIf
    EndFunc ;==>_time
    ;---------------------------------------------------------------Datum
    Func _date()
    If $blink Then
    GUICtrlSetData($Label2, @MDAY & '.' & @MON & '.' & @YEAR)
    $blink = Not $blink
    Else
    GUICtrlSetData($Label2, @MDAY & '.' & @MON & '.' & @YEAR)
    $blink = Not $blink
    EndIf
    EndFunc ;==>_time
    ;-------------------------------------------------------------------
    Func _GetCoreCount(Const $Computer = "127.0.0.1")
    $WMIConnect = ObjGet('winmgmts:{impersonationLevel=impersonate}!\\' & $Computer & '\root\CIMV2')
    If Not IsObj($WMIConnect) Then Return SetError(-1, @error, 0)
    $ObjList = $WMIConnect.ExecQuery('SELECT Name FROM Win32_PerfRawData_PerfOS_Processor', 'WQL', $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
    If Not IsObj($ObjList) Then Return SetError(-2, @error, 0)
    $iReturn = 0
    For $ObjItem In $ObjList
    If StringInStr($ObjItem.Name, "_Total") = 0 Then $iReturn += 1
    Next
    Return $iReturn
    EndFunc ;==>_GetCoreCount
    ;---------------------------------

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

    ;==============================================
    ; Sen - CpuAuslastung
    ; Return: Cpu Auslastung (%)
    ;==============================================
    Func CpuAuslastung()
    Global $wbemFlagReturnImmediately = 0x10
    Global $wbemFlagForwardOnly = 0x20
    Global $wbemFlags = $wbemFlagReturnImmediately + $wbemFlagForwardOnly
    Global $strComputer = @ComputerName

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

    Global $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
    Global $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_Processor", "WQL", $wbemFlags)

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

    $n = 0
    $c = 0
    $sMsg = ""
    For $objItem In $colItems
    $sMsg &= "cpu%" & $objItem.LoadPercentage
    $n += 1
    Next

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

    $CpuAuslastung = StringSplit($sMsg, "cpu%", 1)

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

    For $n = "0" To $CpuAuslastung[0]
    $c += $CpuAuslastung[$n]
    Next

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

    Return (Round($c / $CpuAuslastung[0], 0) & "%")
    EndFunc ;==>CpuAuslastung

    [/autoit]
  • MsgBox mit Hilfe-Button

    • funkey
    • 24. August 2010 um 11:00

    Hab noch die passende Struktur dazu erstellt: $tagHELPINFO

    Spoiler anzeigen
    [autoit]

    Global Const $MB_HELP = 0x4000

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

    ; #STRUCTURE# ===================================================================================================================
    ; Name...........: $tagHELPINFO
    ; Description ...: Contains information about an item for which context-sensitive Help has been requested
    ; Fields ........: Size - The structure size, in bytes
    ; ContextType - The type of context for which Help is requested. This member can be one of the following values:
    ; HELPINFO_WINDOW = 1: Help requested for a control or window.
    ; HELPINFO_MENUITEM = 2: Help requested for a menu item.
    ; CtrlID - The identifier of the window or control if ContextType is HELPINFO_WINDOW,
    ; or identifier of the menu item if ContextType is HELPINFO_MENUITEM
    ; ItemHandle - The identifier of the child window or control if ContextType is HELPINFO_WINDOW,
    ; or identifier of the associated menu if ContextType is HELPINFO_MENUITEM.
    ; ContextID - The help context identifier of the window or control.
    ; PointX - X position that of the mouse at the time the event occurred
    ; PointY - Y position that of the mouse at the time the event occurred
    ; Author ........: funkey
    ; Remarks .......:
    ; ===============================================================================================================================
    Global Const $tagHELPINFO = "uint Size;int ContextType;int CtrlID;handle ItemHandle;dword ContextID;int PointX;int PointY"

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

    Global $Toggle = False

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

    $hGui = GUICreate("Application")
    GUISetState()

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

    $hGuiHelp = GUICreate("Help-GUI", 200, 100, -1, -1, 0x80880000, 0x00000080)
    GUICtrlCreateLabel("Please press the OK button!", 10, 10)
    GUIRegisterMsg(0x0053, "_Help") ;WM_HELP

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

    Sleep(1000)
    $ret = MsgBox($MB_HELP, "Hello","This is a test", 0, $hGui)
    GUISetState(@SW_HIDE, $hGuiHelp)
    Sleep(1000)

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

    Func _Help($hWnd, $Msg, $wParam, $lParam)
    Local $tInfo, $ContextType, $CtrlID, $ItemHandle, $ContextID, $X, $Y
    ; $hWnd is the parent window handle for this MsgBox

    Local $tInfo = DllStructCreate($tagHELPINFO, $lParam)
    $ContextType = DllStructGetData($tInfo, "ContextType")
    $CtrlID = DllStructGetData($tInfo, "CtrlID")
    $ItemHandle = HWnd(DllStructGetData($tInfo, "ItemHandle"))
    $ContextID = DllStructGetData($tInfo, "ContextID")
    $X = DllStructGetData($tInfo, "PointX")
    $Y = DllStructGetData($tInfo, "PointY")

    $Toggle = Not $Toggle
    If $Toggle Then
    WinMove($hGuiHelp, "", $X + 10, $Y + 10)
    GUISetState(@SW_SHOW, $hGuiHelp)
    Else
    GUISetState(@SW_HIDE, $hGuiHelp)
    EndIf
    EndFunc

    [/autoit]
  • MsgBox mit Hilfe-Button

    • funkey
    • 24. August 2010 um 09:28

    Da ich bis vor 30 Minuten nicht wusste, dass es das gibt, hier ein kleines Beispiel für euch.
    Vllt kann das ja mal nützlich sein.

    Spoiler anzeigen
    [autoit]

    Global Const $MB_HELP = 0x4000
    Global $Toggle = False

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

    $hGui = GUICreate("Application")
    GUISetState()

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

    $hGuiHelp = GUICreate("Help-GUI", 200, 100, @DesktopWidth - 400, -1, 0)
    GUICtrlCreateLabel("Please press the OK button!", 10, 10)
    GUIRegisterMsg(0x0053, "_Help") ;WM_HELP

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

    Sleep(1000)
    $ret = MsgBox($MB_HELP, "Hello","This is a test", 0, $hGui)
    GUISetState(@SW_HIDE, $hGuiHelp)
    Sleep(1000)

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

    Func _Help($hWnd, $Msg, $wParam, $lParam)
    ConsoleWrite("Help button was pressed" & @cr)
    $Toggle = Not $Toggle
    If $Toggle Then
    GUISetState(@SW_SHOW, $hGuiHelp)
    Else
    GUISetState(@SW_HIDE, $hGuiHelp)
    EndIf
    EndFunc

    [/autoit]
  • Verknüpfung zum Ordner

    • funkey
    • 24. August 2010 um 08:27

    Probier mal den letzten Backslash im erstem Parameter wegzulassen.

  • Systemwiederherstellung aktivieren/deaktivieren

    • funkey
    • 23. August 2010 um 16:47

    Hab nicht viel Erfahrung mit VBS, aber ich hoffe, dass es so im groben passt.

    Spoiler anzeigen
    [autoit]


    #region srdisableallbutsystemdrive.vbs
    ;~ $WshShell = ObjCreate("WScript.Shell")
    ;~ $objSysRestore = ObjGet("winmgmts:\\.\root\default:SystemRestore")
    ;~ $objWMIService = ObjGet("winmgmts:\\.\root\cimv2")
    ;~ $colDrives = $objWMIService.ExecQuery("Select * From Win32_LogicalDisk Where DriveType = 3")
    ;~ For $objDrive In $colDrives
    ;~ If $objDrive.DeviceID <> EnvGet("SYSTEMDRIVE") Then
    ;~ $objSysRestore.Disable($objDrive.DeviceID & "\")
    ;~ EndIf
    ;~ Next
    #endregion srdisableallbutsystemdrive.vbs

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

    #region systemrestoreenable.vbs
    ;~ If $CmdLine[0] > 0 Then
    ;~ $Drive = $CmdLine[1]
    ;~ Else
    ;~ $Drive = ""
    ;~ EndIf
    #endregion systemrestoreenable.vbs

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

    #region systemrestoredisable.vbs
    ;~ $obj = ObjGet("winmgmts:{impersonationLevel=impersonate}!root/default:SystemRestore")
    ;~ If $obj.Enable($Drive) = 0 Then
    ;~ MsgBox(0, "Success", "")
    ;~ Else
    ;~ MsgBox(0, "Failed", "")
    ;~ EndIf
    #endregion systemrestoredisable.vbs

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

    #region createrestorepoint.vbs
    ;~ $IRP = ObjGet("winmgmts:\\.\root\default:Systemrestore")
    ;~ $MYRP = $IRP.createrestorepoint("new_point", 0, 100)
    #endregion createrestorepoint.vbs

    [/autoit]
  • Datei verschieben

    • funkey
    • 18. August 2010 um 14:53
    Spoiler anzeigen
    [autoit]

    FileMove(@DesktopDir & "\sebastianlog.html", "C:\Dokumente und Einstellungen\Sebastian\Eigene Dateien\Eigene Musik")

    [/autoit]


    AspirinJunkie: Du hast natürlich recht!

  • _cmdline

    • funkey
    • 18. August 2010 um 14:47

    Sieht gut und nützlich aus! :thumbup:
    Werde ich sicher mal verwenden.
    Danke.

  • [Beispiel] SnapShot's from WebCam ver.: 0.8.1.3

    • funkey
    • 18. August 2010 um 14:28

    Nice, aber bei mir sehen alle Bilder gleich aus. Das erste Bild passt, danach sind alles nur noch Kopien im Ordner enthalten. ?(

  • Daten in CSV schreiben

    • funkey
    • 18. August 2010 um 13:19

    Schau dir mal meinen CSV-Editor an. ;)

    CSV-Editor V0.8 (Stand 23.04.2010)

  • Funktion um die Funktionen einer DLL aufzulisten

    • funkey
    • 13. August 2010 um 20:52

    Danke für das Lob.

    Hab die Funktion jetzt noch leicht erweitert, sie sollte nun ein wenig besser laufen.

    PrideRage: Die Parameter können nicht ausgelesen werden. Leider.
    @kleiner27: Den DLL-Export-Viewer hab ich schon länger im Einsatz.

  • wxWindowClassNR

    • funkey
    • 13. August 2010 um 15:44

    Geht das?

    [autoit]

    Opt("WinTitleMatchMode",4)
    $sText = WinGetText("[CLASS:wxWindowClassNR]")
    MsgBox(0,"",$sText)

    [/autoit]

    Edit: Die Klammer kannst du auch selber zumachen!

  • Funktion um die Funktionen einer DLL aufzulisten

    • funkey
    • 12. August 2010 um 21:45

    Hab mal schnell eine Funktion gebastelt, die die Funktionen einer DLL als Array oder als String zurückgibt. Das ganze ist nicht ganz bugfrei und ohne Fehlerbehandlung. Außerdem funktioniert es wahrscheinlich nur bei 32Bit DLL's.

    Vllt findet es der eine oder andere ganz nützlich, dann könnte ich bestimmt noch ein bischen Zeit opfern um es zu verbessern.

    Spoiler anzeigen
    [autoit]

    #Include <Array.au3>

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

    $DLLFile = FileOpenDialog("Choose DLL file", @SystemDir, "DLL files (*.dll)", 3)
    if @error Then Exit

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

    $aNames = _DLLGetFunctionNames($DLLFile)
    If @error Then Exit ConsoleWrite($DLLFile & ": Fault " & @error & @CR)

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

    ;~ $sNames = _DLLGetFunctionNames($DLLFile, 1)
    ;~ ConsoleWrite($sNames & @CRLF)

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

    _ArrayDisplay($aNames, StringTrimLeft($DLLFile, StringInStr($DLLFile, "\", 0, -1)))

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

    Func _DLLGetFunctionNames($sFileName, $ParamResult = 0)
    ;funkey Aug, 12th, 2010
    ;$ParamOutput: 0 --> Result is array
    ; 1 --> Result is string
    Local $hFile = FileOpen($sFileName, 0)
    If $hFile = -1 Then Return SetError(1) ; file error
    Local $sFile = FileRead($hFile)
    FileClose($hFile)
    Local $iStartPos, $iEndPos, $sFunctionNames, $aFunctionNames
    Local $DLLName = StringTrimLeft($sFileName, StringInStr($sFileName, "\", 0, -1))
    For $i = 1 To 99
    $iStartPos = StringInStr($sFile, $DLLName & Chr(0), 0, -$i)
    If $iStartPos = 0 Then Return SetError(2) ;search error
    $sFunctionNames = StringTrimLeft($sFile, $iStartPos - 2)
    $sFunctionNames = StringTrimLeft($sFunctionNames, StringInStr($sFunctionNames, "dll") + 3)
    $iEndPos = StringInStr($sFunctionNames, Chr(0) & Chr(0))
    $sFunctionNames = StringLeft($sFunctionNames, $iEndPos - 1)
    If StringInStr($sFunctionNames, Chr(0) & Chr(0x90)) Then $sFunctionNames = StringLeft($sFunctionNames, StringInStr($sFunctionNames, Chr(0) & Chr(0x90)) - 1)
    $aFunctionNames = StringSplit($sFunctionNames, Chr(0), 2)
    If UBound($aFunctionNames) > 0 And StringStripWS($aFunctionNames[0], 8) <> "" Then ExitLoop
    Next
    Switch $ParamResult
    Case 0
    Return $aFunctionNames
    Case 1
    Return StringReplace($sFunctionNames, Chr(0), @CRLF)
    EndSwitch
    EndFunc

    [/autoit]
  • _GetUniqueFileName

    • funkey
    • 6. August 2010 um 04:54

    Danke, sowas kann man immer mal gebrauchen. :thumbup:
    Ist ähnlich wie _FileGetNextBackup für meinen CSV-Editor.

    Spoiler anzeigen
    [autoit]

    Func _FileGetNextBackup($sFile)
    ;funkey 2010, April, 02
    Local $NextFile
    Local $sExt = _FileGetExt($sFile)
    For $i = 1 To 999
    $NextFile = StringFormat(StringTrimRight($sFile, StringLen($sExt)) & "(%003i)." & $sExt, $i)
    If Not FileExists($NextFile) Then ExitLoop
    Next
    Return $NextFile
    EndFunc ;==>_FileGetNextBackup

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

    Func _FileGetExt($sFileName)
    Local $sExt = StringTrimLeft($sFileName, StringInStr($sFileName, ".", 0, -1))
    If StringInStr($sExt, "\") Or StringInStr($sExt, "/") Then Return "" ;no extension
    Return $sExt
    EndFunc ;==>_FileGetExt

    [/autoit]
  • Class name ändern

    • funkey
    • 22. Juli 2010 um 15:04

    Wenn du ohne UPX kompilierst, dann kannst du die GUI_Class einfach mit einem Hex-Editor ändern. Hab es gerade probiert, funktioniert einwandfrei.
    Mit diesem Wissen könnte man das auch mittels AutoIt umsetzen. ;)

  • 5000x BugFix

    • funkey
    • 22. Juli 2010 um 13:54

    Auch von mir noch herzliche Gratulation zum 5000. Post, oder besser noch vielen Dank für die 5000!!
    Mach weiter so! :thumbup:

  • Text aus Word mit Formatierung in Outlook kopieren

    • funkey
    • 15. Juli 2010 um 16:05

    Wieso die Datei nicht einfach anhängen?

    [ gelöst ] Outlook E-Mail mit Attachment senden

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™