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

Beiträge von Irrlicht

  • Script-Problem Charakter setzt in der Luft die Attacke falsch ein!!

    • Irrlicht
    • 21. Mai 2011 um 12:47

    Ich glaub man ist im falschen Forum wenn man einen Bot nicht von einem kleinen Spiel (anhand des Codes) unterscheiden kann!
    Schnacko, poste doch mal das ganze Skript, ich krieg 5 errors und 38 warnings^^

  • Nach kompilieren: the requested action with this object has failed

    • Irrlicht
    • 17. Mai 2011 um 20:24

    Hallo,
    mein neues Projekt ist eigentlich fertig. Ein Windowslogon via Spracherkennung.
    Beim Laufenlassen des Skriptes läuft alles sauber:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>
    #include <GDIPlus.au3>
    #include <WinAPI.au3>
    #include <Misc.au3>
    #include <SAPIListBox.au3>

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

    Local $x1, $y1, $x2 = 0
    Local $y2 = @DesktopHeight / 2
    Local $login = False
    Local $password = IniRead(@ScriptDir & "\data.ini", "data", "pw", "hello")
    Dim $wortbox_array[1] = [$password]
    HotKeySet("0", "emergency")

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

    $oTalk = ObjCreate('SAPI.SpVoice')
    $oTalk.voice = $oTalk.GetVoices("Name=Microsoft Sam", "Language=409" ).Item(0)
    $vUser32DLL = DllOpen("User32.dll")
    $iGUIWidth = @DesktopWidth
    $iGUIHeight = @DesktopHeight
    $tSize = DllStructCreate($tagSIZE)
    $pSize = DllStructGetPtr($tSize)
    DllStructSetData($tSize, "X", $iGUIWidth)
    DllStructSetData($tSize, "Y", $iGUIHeight)
    $tSource = DllStructCreate($tagPOINT)
    $pSource = DllStructGetPtr($tSource)
    $tBlend = DllStructCreate($tagBLENDFUNCTION)
    $pBlend = DllStructGetPtr($tBlend)
    DllStructSetData($tBlend, "Alpha", 255)
    DllStructSetData($tBlend, "Format", 1)
    $hWnd = GUICreate("", $iGUIWidth, $iGUIHeight, 0, 0, 0x08000000, BitOR(0x00080000, 0x00000080))
    GUISetState()
    $hDC_Window = _WinAPI_GetDC($hWnd)
    $hDC_Buffer = _WinAPI_CreateCompatibleDC($hDC_Window)
    $hBitmap_Buffer = _WinAPI_CreateCompatibleBitmap($hDC_Window, $iGUIWidth, $iGUIHeight)
    _WinAPI_SelectObject($hDC_Buffer, $hBitmap_Buffer)
    $fenster = GUICreate("Speechlock by $2Billie", 400, 300)
    $wortbox = _GUICtrlSAPIListBox_Create(10, 10, 380, 280)
    _GUICtrlSAPIListBox_EnableSpeech($wortbox, 3)
    _GUICtrlSAPIListBox_AddArray($wortbox, $wortbox_array)
    GUISetState(@SW_HIDE, $fenster)
    _GDIPlus_Startup()
    $hGraphics = _GDIPlus_GraphicsCreateFromHDC($hDC_Buffer)
    $img = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\startscreen.jpg")
    $img2 = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\startscreen2.jpg")
    _drawgdiplus("Please say your password")
    Do

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

    If @SEC = 30 Or @SEC = 0 Then
    $oTalk.Speak("Please say your password.")
    Sleep(1000)
    EndIf
    $gettext = _GUICtrlSAPIListBox_GetText($wortbox)
    If _GUICtrlSAPIListBox_CurSelChanged($wortbox) = True Then
    $gettext = _GUICtrlSAPIListBox_GetText($wortbox)
    If $gettext = $password Then

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

    $login = True
    EndIf
    EndIf
    Until $login <> False
    _drawgdiplus("Access was admitted")
    Sleep(1000)
    $oTalk.Speak("Access was admitted.")

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

    While $x1 > (-@DesktopWidth) And $x2 < @DesktopWidth
    _GDIPlus_GraphicsClear($hGraphics)
    $x1 -= 2
    $x2 += 2
    _GDIPlus_GraphicsDrawImageRect($hGraphics, $img, $x1, $y1, @DesktopWidth, @DesktopHeight / 2)
    _GDIPlus_GraphicsDrawImageRect($hGraphics, $img2, $x2, $y2, @DesktopWidth, @DesktopHeight / 2)
    _WinAPI_UpdateLayeredWindow($hWnd, $hDC_Window, 0, $pSize, $hDC_Buffer, $pSource, 0, $pBlend, 2)
    WEnd
    If @HOUR - 12 >= 3 And @HOUR <= 12 Then $oTalk.Speak("Good morning " & @UserName)
    If @HOUR >= 13 And @HOUR <= 17 Then $oTalk.Speak("Good Day " & @UserName)
    If @HOUR >= 18 And @HOUR - 12 >= 2 Then $oTalk.Speak("Good Evening " & @UserName)
    ShellExecute("explorer.exe")

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

    Exit

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

    Func emergency()
    $open = FileOpenDialog("Chose the file, where your password was saved.", @DesktopDir, "")
    If $open = @ScriptDir & "\data.ini" Then
    _drawgdiplus("Access was admitted")
    Sleep(2000)
    While $x1 > (-@DesktopWidth) And $x2 < @DesktopWidth
    _GDIPlus_GraphicsClear($hGraphics)
    $x1 -= 2
    $x2 += 2
    _GDIPlus_GraphicsDrawImageRect($hGraphics, $img, $x1, $y1, @DesktopWidth, @DesktopHeight / 2)
    _GDIPlus_GraphicsDrawImageRect($hGraphics, $img2, $x2, $y2, @DesktopWidth, @DesktopHeight / 2)
    _WinAPI_UpdateLayeredWindow($hWnd, $hDC_Window, 0, $pSize, $hDC_Buffer, $pSource, 0, $pBlend, 2)
    WEnd
    If @HOUR - 12 >= 3 And @HOUR <= 12 Then $oTalk.Speak("Good morning " & @UserName)
    If @HOUR >= 13 And @HOUR <= 17 Then $oTalk.Speak("Good Day " & @UserName)
    If @HOUR >= 18 And @HOUR - 12 >= 2 Then $oTalk.Speak("Good Evening " & @UserName)

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

    ShellExecute("explorer.exe")
    Sleep(2000)

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

    Exit

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

    Else
    $oTalk.Speak("You have said the wrong password.")
    EndIf
    EndFunc ;==>emergency
    Func _GDIPlus_GraphicsDrawStringColor($hGraphics, $sString, $nX, $nY, $sFont = "Arial", $nSize = 10, $iFormat = 0, $iBrush = 0xFF000000)
    Local $hBrush, $iError, $hFamily, $hFont, $hFormat, $aInfo, $tLayout, $bResult
    $hBrush = _GDIPlus_BrushCreateSolid($iBrush)
    $hFormat = _GDIPlus_StringFormatCreate($iFormat)
    $hFamily = _GDIPlus_FontFamilyCreate($sFont)
    $hFont = _GDIPlus_FontCreate($hFamily, $nSize)
    $tLayout = _GDIPlus_RectFCreate($nX, $nY, 0, 0)
    $aInfo = _GDIPlus_GraphicsMeasureString($hGraphics, $sString, $hFont, $tLayout, $hFormat)
    $bResult = _GDIPlus_GraphicsDrawStringEx($hGraphics, $sString, $hFont, $aInfo[0], $hFormat, $hBrush)
    $iError = @error
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    Return SetError($iError, 0, $bResult)
    EndFunc ;==>_GDIPlus_GraphicsDrawStringColor
    Func _drawgdiplus($htext)
    _GDIPlus_GraphicsDrawImageRect($hGraphics, $img, $x1, $y1, @DesktopWidth, @DesktopHeight / 2)
    _GDIPlus_GraphicsDrawImageRect($hGraphics, $img2, $x2, $y2, @DesktopWidth, @DesktopHeight / 2)
    _GDIPlus_GraphicsDrawStringColor($hGraphics, $htext, "", @DesktopHeight / 2, "Arial", 40, 0, 0x4B0000FF)
    _WinAPI_UpdateLayeredWindow($hWnd, $hDC_Window, 0, $pSize, $hDC_Buffer, $pSource, 0, $pBlend, 2)

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

    EndFunc ;==>_drawgdiplus

    [/autoit]


    Spracherkennung funktioniert...und sonst auch alles!
    Nachdem man die au3 kompiliert hat, kommt jedoch gerade in dem Moment, in dem das Passwort erkannt wurde, ein Error:

    Zitat

    line 6640 the requested action with this object has failed


    Ich weiß echt nicht, was ich falsch mach, wo der Fehler liegt!
    Nötige Include von Peter Sean Griffin:

    Spoiler anzeigen
    [autoit]

    #include-once
    #include <IE.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region Header
    #cs
    Title: SAPIListBox UDF Library for AutoIt3
    Filename: SAPIListBox.au3
    Description: A collection of functions for creating and controlling a SAPIListBox control in AutoIT
    Author: seangriffin
    Version: V0.1
    Last Update: 21/05/10
    Requirements: AutoIt3 3.2 or higher,
    the Microsoft Speech API SDK v5.1
    Changelog:
    ---------21/05/10---------- v0.1
    Initial release.
    Note that a clipping problem currently exists in the VLC control.

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

    #ce
    #EndRegion Header
    #Region Global Variables and Constants
    Global $curr_speech_list_index = -1, $SpeechListBoxCtrl
    #EndRegion Global Variables and Constants
    #Region Core functions
    ; #FUNCTION# ;===============================================================================
    ;
    ; Name...........: _GUICtrlSAPIListBox_Create()
    ; Description ...: Creates a SAPI ListBox control.
    ; Syntax.........: _GUICtrlSAPIListBox_Create($left, $top, $width, $height, $enable_speech = True, $enable_listbox = True, $hide_listbox = False, $items = False)
    ; Parameters ....: $left - The left side of the control.
    ; $top - The top of the control.
    ; $width - The width of the control.
    ; $height - The height of the control.
    ; $enable_speech - A boolean value indicating whether to enable speech recognition.
    ; $enable_listbox - A boolean value indicating whether to enable the listbox.
    ; $hide_listbox - A boolean value indicating whether to hide the listbox.
    ; $items - An array of items to populate the listbox with.
    ; Return values .: On Success - Returns the identifier (controlID) of the new control.
    ; On Failure - Returns False.
    ; Author ........: seangriffin
    ; Modified.......:
    ; Remarks .......:
    ; Related .......:
    ; Link ..........:
    ; Example .......: Yes
    ;
    ; ;==========================================================================================
    Func _GUICtrlSAPIListBox_Create($left, $top, $width, $height, $enable_speech = True, $enable_listbox = True, $hide_listbox = False, $items = False)

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

    Local $SpeechListBox

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

    $SpeechListBox = ObjCreate("SAPI51ListBox.Sample")

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

    ; If the SAPIListBox is not a valid object (ie. the SAPI 5.1 SDK is not installed), then return False.
    if $SpeechListBox = 0 Then Return False

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

    $SpeechListBoxCtrl = GUICtrlCreateObj ($SpeechListBox, $left, $top, $width, $height)

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

    if $enable_speech = True Then

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

    _GUICtrlSAPIListBox_EnableSpeech($SpeechListBox, 1)
    Else

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

    _GUICtrlSAPIListBox_EnableSpeech($SpeechListBox, 0)
    EndIf

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

    _GUICtrlSAPIListBox_Enable($SpeechListBox, $enable_listbox)
    _GUICtrlSAPIListBox_Hide($SpeechListBox, $hide_listbox)

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

    if IsArray($items) Then _GUICtrlSAPIListBox_AddArray($SpeechListBox, $items)

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

    Return $SpeechListBox
    EndFunc

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

    ; #FUNCTION# ;===============================================================================
    ;
    ; Name...........: _GUICtrlSAPIListBox_EnableSpeech()
    ; Description ...: Enables or disables speech recognition in a SAPI ListBox control.
    ; Syntax.........: _GUICtrlSAPIListBox_EnableSpeech($SAPIListBox, $toggle)
    ; Parameters ....: $SAPIListBox - The control identifier (controlID) as returned by _GUICtrlSAPIListBox_Create.
    ; $toggle - 1 = enable
    ; 0 = disable
    ; Return values .: On Success - Returns True.
    ; On Failure - Returns False.
    ; Author ........: seangriffin
    ; Modified.......:
    ; Remarks .......:
    ; Related .......:
    ; Link ..........:
    ; Example .......: Yes
    ;
    ; ;==========================================================================================
    Func _GUICtrlSAPIListBox_EnableSpeech($SAPIListBox, $toggle)

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

    $SAPIListBox.SpeechEnabled = $toggle

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

    Return True
    EndFunc

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

    ; #FUNCTION# ;===============================================================================
    ;
    ; Name...........: _GUICtrlSAPIListBox_Enable()
    ; Description ...: Enables or disables a SAPI ListBox control.
    ; Syntax.........: _GUICtrlSAPIListBox_Enable($SAPIListBox, $toggle)
    ; Parameters ....: $SAPIListBox - The control identifier (controlID) as returned by _GUICtrlSAPIListBox_Create.
    ; $toggle - 1 = enable
    ; 0 = disable
    ; Return values .: On Success - Returns True.
    ; On Failure - Returns False.
    ; Author ........: seangriffin
    ; Modified.......:
    ; Remarks .......:
    ; Related .......:
    ; Link ..........:
    ; Example .......: Yes
    ;
    ; ;==========================================================================================
    Func _GUICtrlSAPIListBox_Enable($SAPIListBox, $toggle)

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

    $SAPIListBox.Enabled = $toggle

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

    Return True
    EndFunc

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

    ; #FUNCTION# ;===============================================================================
    ;
    ; Name...........: _GUICtrlSAPIListBox_Hide()
    ; Description ...: Hides or shows a SAPI ListBox control.
    ; Syntax.........: _GUICtrlSAPIListBox_Hide($SAPIListBox, $toggle)
    ; Parameters ....: $SAPIListBox - The control identifier (controlID) as returned by _GUICtrlSAPIListBox_Create.
    ; $toggle - 1 = hide
    ; 0 = show
    ; Return values .: On Success - Returns True.
    ; On Failure - Returns False.
    ; Author ........: seangriffin
    ; Modified.......:
    ; Remarks .......:
    ; Related .......:
    ; Link ..........:
    ; Example .......: Yes
    ;
    ; ;==========================================================================================
    Func _GUICtrlSAPIListBox_Hide($SAPIListBox, $toggle)

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

    if $toggle = 1 Then

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

    GUICtrlSetState($SpeechListBoxCtrl, $GUI_HIDE)
    Else

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

    GUICtrlSetState($SpeechListBoxCtrl, $GUI_SHOW)
    EndIf

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

    Return True
    EndFunc

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

    ; #FUNCTION# ;===============================================================================
    ;
    ; Name...........: _GUICtrlSAPIListBox_AddString()
    ; Description ...: Adds a string to the end of a SAPI ListBox control.
    ; Syntax.........: _GUICtrlSAPIListBox_AddString($SAPIListBox, $text)
    ; Parameters ....: $SAPIListBox - The control identifier (controlID) as returned by _GUICtrlSAPIListBox_Create.
    ; $text - String that is to be added.
    ; Return values .: On Success - Returns True.
    ; On Failure - Returns False.
    ; Author ........: seangriffin
    ; Modified.......:
    ; Remarks .......:
    ; Related .......:
    ; Link ..........:
    ; Example .......: Yes
    ;
    ; ;==========================================================================================
    Func _GUICtrlSAPIListBox_AddString($SAPIListBox, $text)

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

    $SAPIListBox.AddItem ($text)

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

    Return True
    EndFunc

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

    ; #FUNCTION# ;===============================================================================
    ;
    ; Name...........: _GUICtrlSAPIListBox_DeleteString()
    ; Description ...: Deletes a string from the SAPI ListBox control.
    ; Syntax.........: _GUICtrlSAPIListBox_DeleteString($SAPIListBox, $index)
    ; Parameters ....: $SAPIListBox - The control identifier (controlID) as returned by _GUICtrlSAPIListBox_Create.
    ; $index - Zero-based index of the string to be deleted.
    ; Return values .: On Success - Returns True.
    ; On Failure - Returns False.
    ; Author ........: seangriffin
    ; Modified.......:
    ; Remarks .......:
    ; Related .......:
    ; Link ..........:
    ; Example .......: Yes
    ;
    ; ;==========================================================================================
    Func _GUICtrlSAPIListBox_DeleteString($SAPIListBox, $index)

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

    $SAPIListBox.RemoveItem ($index)

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

    Return True
    EndFunc

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

    ; #FUNCTION# ;===============================================================================
    ;
    ; Name...........: _GUICtrlSAPIListBox_GetSel()
    ; Description ...: Returns the selection status of an item.
    ; Syntax.........: _GUICtrlSAPIListBox_GetSel($SAPIListBox, $index)
    ; Parameters ....: $SAPIListBox - The control identifier (controlID) as returned by _GUICtrlSAPIListBox_Create.
    ; $index - Zero-based index of the index to get the selection status for.
    ; Return values .: On Success - Returns the selection status of an item.
    ; On Failure - Returns False.
    ; Author ........: seangriffin
    ; Modified.......:
    ; Remarks .......:
    ; Related .......:
    ; Link ..........:
    ; Example .......: Yes
    ;
    ; ;==========================================================================================
    Func _GUICtrlSAPIListBox_GetSel($SAPIListBox, $index)

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

    Return $SAPIListBox.Selected ($index)
    EndFunc

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

    ; #FUNCTION# ;===============================================================================
    ;
    ; Name...........: _GUICtrlSAPIListBox_InsertString()
    ; Description ...: Inserts a string into a SAPI ListBox control.
    ; Syntax.........: _GUICtrlSAPIListBox_InsertString($SAPIListBox, $text, $index)
    ; Parameters ....: $SAPIListBox - The control identifier (controlID) as returned by _GUICtrlSAPIListBox_Create.
    ; $text - String that is to be added.
    ; $index - Specifies the zero based index of the position at which to insert the string.
    ; Return values .: On Success - Returns True.
    ; On Failure - Returns False.
    ; Author ........: seangriffin
    ; Modified.......:
    ; Remarks .......:
    ; Related .......:
    ; Link ..........:
    ; Example .......: Yes
    ;
    ; ;==========================================================================================
    Func _GUICtrlSAPIListBox_InsertString($SAPIListBox, $text, $index)

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

    $SAPIListBox.AddItem ($text, $index)

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

    Return True
    EndFunc

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

    ; #FUNCTION# ;===============================================================================
    ;
    ; Name...........: _GUICtrlSAPIListBox_SetToolTip()
    ; Description ...: Sets the tooltip for the SAPI ListBox control.
    ; Syntax.........: _GUICtrlSAPIListBox_SetToolTip($SAPIListBox, $text)
    ; Parameters ....: $SAPIListBox - The control identifier (controlID) as returned by _GUICtrlSAPIListBox_Create.
    ; $text - String that is to be added as a tooltip.
    ; Return values .: On Success - Returns True.
    ; On Failure - Returns False.
    ; Author ........: seangriffin
    ; Modified.......:
    ; Remarks .......:
    ; Related .......:
    ; Link ..........:
    ; Example .......: Yes
    ;
    ; ;==========================================================================================
    Func _GUICtrlSAPIListBox_SetToolTip($SAPIListBox, $text)

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

    $SAPIListBox.ToolTipText = $text

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

    Return True
    EndFunc

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

    ; #FUNCTION# ;===============================================================================
    ;
    ; Name...........: _GUICtrlSAPIListBox_AddArray()
    ; Description ...: Adds an array of strings to the end of a SAPI ListBox control.
    ; Syntax.........: _GUICtrlSAPIListBox_AddString($SAPIListBox, $array)
    ; Parameters ....: $SAPIListBox - The control identifier (controlID) as returned by _GUICtrlSAPIListBox_Create.
    ; $array - A one-dimensional array containing a list of string to be added.
    ; Return values .: On Success - Returns True.
    ; On Failure - Returns False.
    ; Author ........: seangriffin
    ; Modified.......:
    ; Remarks .......:
    ; Related .......:
    ; Link ..........:
    ; Example .......: Yes
    ;
    ; ;==========================================================================================
    Func _GUICtrlSAPIListBox_AddArray($SAPIListBox, $array)

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

    for $each in $array

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

    $SAPIListBox.AddItem ($each)
    Next

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

    Return True
    EndFunc

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

    ; #FUNCTION# ;===============================================================================
    ;
    ; Name...........: _GUICtrlSAPIListBox_GetCurSel()
    ; Description ...: Retrieve the index of the currently selected item.
    ; Syntax.........: _GUICtrlSAPIListBox_GetCurSel($SAPIListBox)
    ; Parameters ....: $SAPIListBox - The control identifier (controlID) as returned by _GUICtrlSAPIListBox_Create.
    ; Return values .: On Success - Returns a zero based index of the currently selected item.
    ; On Failure - Returns False.
    ; Author ........: seangriffin
    ; Modified.......:
    ; Remarks .......:
    ; Related .......:
    ; Link ..........:
    ; Example .......: Yes
    ;
    ; ;==========================================================================================
    Func _GUICtrlSAPIListBox_GetCurSel($SAPIListBox)

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

    Return $SAPIListBox.ListIndex
    EndFunc

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

    ; #FUNCTION# ;===============================================================================
    ;
    ; Name...........: _GUICtrlSAPIListBox_GetCount()
    ; Description ...: Retrieves the number of items.
    ; Syntax.........: _GUICtrlSAPIListBox_GetCount($SAPIListBox)
    ; Parameters ....: $SAPIListBox - The control identifier (controlID) as returned by _GUICtrlSAPIListBox_Create.
    ; Return values .: On Success - Returns the number of items in the list box.
    ; On Failure - Returns False.
    ; Author ........: seangriffin
    ; Modified.......:
    ; Remarks .......:
    ; Related .......:
    ; Link ..........:
    ; Example .......: Yes
    ;
    ; ;==========================================================================================
    Func _GUICtrlSAPIListBox_GetCount($SAPIListBox)

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

    Return $SAPIListBox.ListCount
    EndFunc

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

    ; #FUNCTION# ;===============================================================================
    ;
    ; Name...........: _GUICtrlSAPIListBox_GetText()
    ; Description ...: Returns the currently selected item (string), or the item (string) at the specified index
    ; Syntax.........: _GUICtrlSAPIListBox_GetText($SAPIListBox, $index = -1)
    ; Parameters ....: $SAPIListBox - The control identifier (controlID) as returned by _GUICtrlSAPIListBox_Create.
    ; $index - Specifies the zero-based index of the string to retrieve
    ; -1 (default) = return text for the currently selected item.
    ; Return values .: On Success - Returns the text of the index provided (current selection if -1).
    ; On Failure - Returns False.
    ; Author ........: seangriffin
    ; Modified.......:
    ; Remarks .......:
    ; Related .......:
    ; Link ..........:
    ; Example .......: Yes
    ;
    ; ;==========================================================================================
    Func _GUICtrlSAPIListBox_GetText($SAPIListBox, $index = -1)

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

    if $index = -1 Then

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

    Return $SAPIListBox.text
    Else

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

    Return $SAPIListBox.List($index)
    EndIf

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

    Return False
    EndFunc

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

    ; #FUNCTION# ;===============================================================================
    ;
    ; Name...........: _GUICtrlSAPIListBox_GetNewIndex()
    ; Description ...: Returns the index of the most recently added item.
    ; Syntax.........: _GUICtrlSAPIListBox_GetNewIndex($SAPIListBox)
    ; Parameters ....: $SAPIListBox - The control identifier (controlID) as returned by _GUICtrlSAPIListBox_Create.
    ; Return values .: On Success - Returns the index of the most recently added item.
    ; On Failure - Returns False.
    ; Author ........: seangriffin
    ; Modified.......:
    ; Remarks .......:
    ; Related .......:
    ; Link ..........:
    ; Example .......: Yes
    ;
    ; ;==========================================================================================
    Func _GUICtrlSAPIListBox_GetNewIndex($SAPIListBox)

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

    Return $SAPIListBox.NewIndex
    EndFunc

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

    ; #FUNCTION# ;===============================================================================
    ;
    ; Name...........: _GUICtrlSAPIListBox_Refresh()
    ; Description ...: Forces a repaint of the listbox.
    ; Syntax.........: _GUICtrlSAPIListBox_Refresh($SAPIListBox)
    ; Parameters ....: $SAPIListBox - The control identifier (controlID) as returned by _GUICtrlSAPIListBox_Create.
    ; Return values .: On Success - Returns True.
    ; On Failure - Returns False.
    ; Author ........: seangriffin
    ; Modified.......:
    ; Remarks .......:
    ; Related .......:
    ; Link ..........:
    ; Example .......: Yes
    ;
    ; ;==========================================================================================
    Func _GUICtrlSAPIListBox_Refresh($SAPIListBox)

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

    Return $SAPIListBox.Refresh()
    EndFunc

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

    ; #FUNCTION# ;===============================================================================
    ;
    ; Name...........: _GUICtrlSAPIListBox_ResetContent()
    ; Description ...: Removes all items from the SAPI list box
    ; Syntax.........: _GUICtrlSAPIListBox_ResetContent($SAPIListBox)
    ; Parameters ....: $SAPIListBox - The control identifier (controlID) as returned by _GUICtrlSAPIListBox_Create.
    ; Return values .: On Success - Returns True.
    ; On Failure - Returns False.
    ; Author ........: seangriffin
    ; Modified.......:
    ; Remarks .......:
    ; Related .......:
    ; Link ..........:
    ; Example .......: Yes
    ;
    ; ;==========================================================================================
    Func _GUICtrlSAPIListBox_ResetContent($SAPIListBox)

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

    $SAPIListBox.Clear()

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

    Return False
    EndFunc

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

    ; #FUNCTION# ;===============================================================================
    ;
    ; Name...........: _GUICtrlSAPIListBox_CurSelChanged()
    ; Description ...: Returns an indication as to whether the current selection in the listbox has changed (since the last time function was run).
    ; Syntax.........: _GUICtrlSAPIListBox_CurSelChanged($SAPIListBox)
    ; Parameters ....: $SAPIListBox - The control identifier (controlID) as returned by _GUICtrlSAPIListBox_Create.
    ; Return values .: On Success - Returns a zero based index of the currently selected item.
    ; On Failure - Returns False.
    ; Author ........: seangriffin
    ; Modified.......:
    ; Remarks .......: I didn't want to write this function, but I currently don't know of any other
    ; way in AutoIT to detect if a SAPIlistbox has changed. Traditional methods,
    ; such as using a "WM_COMMAND" function or a "if $msg = $SAPIListBox then"
    ; check in the main message loop of the GUI, don't get triggered.
    ; Related .......:
    ; Link ..........:
    ; Example .......: Yes
    ;
    ; ;==========================================================================================
    Func _GUICtrlSAPIListBox_CurSelChanged($SAPIListBox)

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

    if $curr_speech_list_index <> $SAPIListBox.ListIndex() Then

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

    $curr_speech_list_index = $SAPIListBox.ListIndex()
    Return True
    EndIf

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

    Return False
    EndFunc

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

    ; #FUNCTION# ;===============================================================================
    ;
    ; Name...........: _SAPI_SpeechProperties()
    ; Description ...: Opens the SAPI Speech Properties control panel applet.
    ; Syntax.........: SAPI_SpeechProperties()
    ; Parameters ....:
    ; Return values .: On Success - Returns True.
    ; On Failure - Returns False.
    ; Author ........: seangriffin
    ; Modified.......:
    ; Remarks .......:
    ; Related .......:
    ; Link ..........:
    ; Example .......: Yes
    ;
    ; ;==========================================================================================
    Func _SAPI_SpeechProperties()

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

    Run("cmd.exe /c control.exe """ & @CommonFilesDir & "\Microsoft Shared\Speech\sapi.cpl""", @SystemDir, @SW_HIDE)

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

    Return True
    EndFunc

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


    Ansonsten ist Microsoft Speech SDK minimum 5.1 nötig(das Activex-Objekt muss auf dem >Rechner registriert sein!)
    Downloadlink: http://www.microsoft.com/downloads/info.aspx?na=46&SrcFamilyId=5E86EC97-40A7-453F-B0EE-6583171B4530&SrcDisplayLang=en&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2fB%2f4%2f3%2fB4314928-7B71-4336-9DE7-6FA4CF00B7B3%2fSpeechSDK51.exe

  • Profifrage: 64 bit Pointer auslesen, aber wie ?

    • Irrlicht
    • 17. Mai 2011 um 17:20
    Zitat von Matthias_199

    @Matthias es fast schon süß das gerade sowas von dir kommt!


    Ich finds viel amüsanter, dass die besagte Person unter dem nicknamen EliteMatthias ganze sections im nem gewissen forum unterhalten hat...

  • TCP onlinefähig machen oder ähnliches ;)

    • Irrlicht
    • 14. Mai 2011 um 15:04
    Zitat von DFPWare

    n kumpel von mir hat gemeint dass das online nicht funktioniert 8|


    Naja, bei manchen Leuten funktioniert das fast nicht :D BB, you know what I mean?^^

  • Problem mit shell(registry)/ explorer.exe

    • Irrlicht
    • 14. Mai 2011 um 14:38

    also das mit dem explorerfenster stimmt :D danke schonmal, ich schau mir den beitrag in dem forum mal an.
    Edit:
    Sehr schön!
    Einfach bei dem Key Userinit den Pfad zu der Exe eingeben und den Wert vom Shellkey bei explorer.exe lassen.
    Funktioniert einwandfrei!

  • Überprüfung ob der Zugriff auf einen Ordner möglich ist

    • Irrlicht
    • 14. Mai 2011 um 14:37

    vielleicht dircopy in kombination mit if @error ?
    kanns grad nicht testen

  • Problem mit shell(registry)/ explorer.exe

    • Irrlicht
    • 14. Mai 2011 um 14:15

    Hallo,
    ich möchte, dass mein Programm gestartet wird, bevor explorer.exe auftaucht. also direkt nach dem systemstart.
    dazu hab ich in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon den Wert von Shell auf meinen Programmnamen bzw. Pfad geändert.
    Das Programm wird auch gleich beim Systemstart ausgeführt.
    Exemplarisch so etwas:

    [autoit]

    Msgbox(0, "Hallo", "Hallo"& @username)
    Shellexecute("explorer.exe")

    [/autoit]


    Beim Blick in den Taskmanager existiert der Prozess explorer.exe dann auch. Nur leider ist keine Taskleiste zu sehen, Desktopsymbole werden auch nicht dargestellt.
    ...Das Skript is mit 32 Bit kompiliert, passt also ....
    Was sollte man ändern, damit alles klappt?

  • Kleine Online-Schnitzeljagd

    • Irrlicht
    • 10. Mai 2011 um 19:01

    die guictrl-frage war aber auch doof...

  • Bilder anschauen

    • Irrlicht
    • 10. Mai 2011 um 17:17

    Hier eine weitere Möglichkeit, ohne Skalierung :)

    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include<gdiplus.au3>
    Global Const $SS_REALSIZEIMAGE = 0x0800
    $viewer = GUICreate("viewer", 633, 447, 0, 0)
    $Button1 = GUICtrlCreateButton("Button1", 0, 420, 192, 24, $WS_GROUP)
    GUISetState(@SW_SHOW)
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    case $Button1
    $path= FileOpenDialog("Wählen Sie ein Bild.", @DesktopDir & "\", "(*.jpg;*.png)")
    $Pic1 = GUICtrlCreatePic($path, 0,0, 0, 0, $SS_REALSIZEIMAGE)
    _gdiplus_startup()
    $Imagegdi = _GDIPlus_ImageLoadFromFile($Path)
    $Width = _GDIPlus_ImageGetWidth($Imagegdi)
    $Height = _GDIPlus_ImageGetHeight($Imagegdi)
    winmove("viewer", "", "", "", $width, $height+50)
    guictrldelete($button1)
    $button1= guictrlcreatebutton("Bild hinzufügen", 0, $height, 100, 20)
    EndSwitch
    WEnd

    [/autoit]
  • [Hilfe] Wie bekomme ich es so hin?

    • Irrlicht
    • 9. Mai 2011 um 17:56

    kleine frage, was sollen das für passwörter sein :rofl:

  • Kleine Online-Schnitzeljagd

    • Irrlicht
    • 9. Mai 2011 um 11:40

    Das wären dann wohl meine :rofl:

  • Koda Form Designer Button transparent machen?

    • Irrlicht
    • 8. Mai 2011 um 20:51

    Ein einzelnes Control transparent zu machen, geht ohne weiteres glaub ich nicht. Allerdings kannst via winsettrans die ganze gui transparent machen...
    Edit: wieder mal wurde ich verbessert^^

  • Nippelboard à la TV Total

    • Irrlicht
    • 8. Mai 2011 um 16:37

    Hallo zusammen.
    Heute gibts en 5-Minutenskript, auf Verwendung besonderer Switch-Abfragen oder großartiger Arrays hab ich verzichtet..
    Wer Tv Total kennt, wird lachen. Jeder andere wahrscheinlich auch^^
    -> Die sounds werden mit den Tasten 1-7 abgespielt..

    Spoiler anzeigen
    [autoit]

    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_outfile=Nippelboard.exe
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include <GUIConstants.au3>
    #include <GDIPlus.au3>
    #include <WinAPI.au3>
    #include <Misc.au3>
    Local $brush[4]
    local $1, $2, $3, $4, $5, $6, $7=0
    $vUser32DLL = DllOpen("User32.dll")
    $iGUIWidth = @DesktopWidth
    $iGUIHeight = @DesktopHeight
    $tSize = DllStructCreate($tagSIZE)
    $pSize = DllStructGetPtr($tSize)
    DllStructSetData($tSize, "X", $iGUIWidth)
    DllStructSetData($tSize, "Y", $iGUIHeight)
    $tSource = DllStructCreate($tagPOINT)
    $pSource = DllStructGetPtr($tSource)
    $tBlend = DllStructCreate($tagBLENDFUNCTION)
    $pBlend = DllStructGetPtr($tBlend)
    DllStructSetData($tBlend, "Alpha", 255)
    DllStructSetData($tBlend, "Format", 1)
    $hWnd = GUICreate("", $iGUIWidth, $iGUIHeight, 0, 0, BitOR(0x80000000, 0x08000000), BitOR(0x00080000, 0x00000008, 0x00000080))
    GUISetState()
    $hDC_Window = _WinAPI_GetDC($hWnd)
    $hDC_Buffer = _WinAPI_CreateCompatibleDC($hDC_Window)
    $hBitmap_Buffer = _WinAPI_CreateCompatibleBitmap($hDC_Window, $iGUIWidth, $iGUIHeight)
    _WinAPI_SelectObject($hDC_Buffer, $hBitmap_Buffer)
    _GDIPlus_Startup()
    $hGraphics = _GDIPlus_GraphicsCreateFromHDC($hDC_Buffer)
    $brush[0] = _GDIPlus_BrushCreateSolid(0xFFFFFF00)
    $brush[1] = _GDIPlus_BrushCreateSolid(0xFFFF0000)
    $brush[3]= _gdiplus_brushcreatesolid(0xFF000000)
    while 1
    for $i= 0 to 600 step 100
    _GDIPlus_GraphicsFillEllipse($hgraphics, $i, 0, 60, 60, $brush[1])
    next
    _GDIPlus_GraphicsFillEllipse($hgraphics, 15, 15, 30, 30, $brush[$1])
    _GDIPlus_GraphicsFillEllipse($hgraphics, 115, 15, 30, 30, $brush[$2])
    _GDIPlus_GraphicsFillEllipse($hgraphics, 215, 15, 30, 30, $brush[$3])
    _GDIPlus_GraphicsFillEllipse($hgraphics, 315, 15, 30, 30, $brush[$4])
    _GDIPlus_GraphicsFillEllipse($hgraphics, 415, 15, 30, 30, $brush[$5])
    _GDIPlus_GraphicsFillEllipse($hgraphics, 515, 15, 30, 30, $brush[$6])
    _GDIPlus_GraphicsFillEllipse($hgraphics, 615, 15, 30, 30, $brush[$7])
    If _ispressed(31, $vuser32dll) then
    $1= 3
    Soundplay(@scriptdir&"\Das geht doch nicht.wma")
    else
    $1=0
    EndIf
    If _ispressed(32, $vuser32dll) then
    $2= 3
    Soundplay(@scriptdir&"\Der Hodensack.wma")
    else
    $2=0
    EndIf
    If _ispressed(33, $vuser32dll) then
    $3= 3
    Soundplay(@scriptdir&"\Der Döner.wma")
    else
    $3=0
    EndIf
    If _ispressed(34, $vuser32dll) then
    $4= 3
    Soundplay(@scriptdir&"\Spaß.wma")
    else
    $4=0
    EndIf
    If _ispressed(35, $vuser32dll) then
    $5= 3
    Soundplay(@scriptdir&"\Eier.wma")
    else
    $5=0
    EndIf
    If _ispressed(36, $vuser32dll) then
    $6= 3
    Soundplay(@scriptdir&"\Definitiv nein.wma")
    else
    $6=0
    EndIf
    If _ispressed(37, $vuser32dll) then
    $7= 3
    Soundplay(@scriptdir&"\Viele Namen.wma")
    else
    $7=0
    EndIf
    _WinAPI_UpdateLayeredWindow($hWnd, $hDC_Window, 0, $pSize, $hDC_Buffer, $pSource, 0, $pBlend, 2)
    wend

    [/autoit]


    Der Download mit den notwendigen Sounds ist im Anhang hinzugefügt

    Dateien

    Nippelboard.rar 873,48 kB – 469 Downloads
  • Kleine Online-Schnitzeljagd

    • Irrlicht
    • 8. Mai 2011 um 13:57

    Also das hat jetzt aber mal Spaß gemacht^^
    Hab alles rausbekommen, nur die Guictrl... frage war bisschen stange...

  • Programm Trial

    • Irrlicht
    • 7. Mai 2011 um 13:38

    1. Dann wird die Testzeit aber vorerst nochmals wiederholt^^
    2. Während der Testzeit kann der User nix machen, da sich das Skript in dieser Schleife befindet.
    -> also in die Hauptschleife der GUI reinziehn...

  • FF.au3 und der externe Zugriff auf den Cache

    • Irrlicht
    • 7. Mai 2011 um 11:08

    die keys und die dazugehörigen dateien auf der festplatte...

  • daten von ordner in anderen ordner kopieren

    • Irrlicht
    • 6. Mai 2011 um 22:49

    ziemlich naheliegend:

    [autoit]

    dirremove

    [/autoit]
  • Programm Trial

    • Irrlicht
    • 6. Mai 2011 um 22:41

    Für langfristige Trials wären Inis oder Registryeinträge zu empfehln..

  • versuch Bei Browser background zu machen?

    • Irrlicht
    • 6. Mai 2011 um 19:49

    Naja, einen unifarbenen Hintergrund erstellst ja mit

    [autoit]

    GUISetBkColor(0xFFFFFF)

    [/autoit]

    Mit dem Colorpicker bekommst die RGB-Farbtöne.
    Ein richtiges Hintergrundbild kriegst mit

    [autoit]

    Guictrlcreatepic(..)

    [/autoit]

    hin

  • versuch Bei Browser background zu machen?

    • Irrlicht
    • 6. Mai 2011 um 19:39

    was genau meinst mit background? ein hintergrundbild?

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™