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

Beiträge von Manlius

  • GUI "mit" MsgBox

    • Manlius
    • 25. Juli 2009 um 00:03

    Hey Leute,
    hab ein kleines Problem mit einer GUI. Und zwar soll das Programm aus einer Combobox etwas auslesen, wenn man auf einen Button klickt. Wenn dann etwas "falsches" in der Combobox steht, soll eine MsgBox kommen wo drin steht: "Achtung dies kann zu Fehlern führen! Programm wirklich ausführen?". Wenn man dann auf "Ja" klickt, soll das Programm ganz normal ausgeführt werden. Dies ist kein Problem. Aber wenn man dann auf "Abbrechen" klickt, soll man wieder normal zur GUI zurückkommen und zwar ohne das nach dem Klick auf den Button die Funktion ausgeführt wird:

    Spoiler anzeigen
    [autoit]


    GUICreate ("hallo",500,500,50,50)
    GUISetState (@SW_SHOW)
    $button = Guictrlcreatebutton ("Start",50,50,50,-1)
    $combobox = GUICtrlCreateCombo ("Profil",100,100,100,-1)
    GUICtrlSetData (-1,"Abgefahren|Noch brauchbar")
    ;die GUI in meinem Programm is allerdings um einiges länger...

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

    While 1
    $msg = Guigetmsg ()
    If $msg = $button Then
    If Guictrlread ($combobox) = "Profil" Then
    $msgbox = MsgBox (1,"Fehler","Achtung dies kann zu Fehlern führen! Programm wirklich ausführen?")
    If $msgbox = 1 Then
    GUIDelete ()
    EndIf
    If $msgbox = 2 Then
    ;?!?!?!?!?!
    EndIf
    EndIf
    Hotkeyset ("{F5}","Start")
    Hotkeyset ("{ESC}","Ende")
    EndIf
    WEnd

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

    While 1
    Sleep (50)
    WEnd

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

    Func Start ()
    ToolTip ("Start",0,0)
    ;usw
    EndFunc

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

    Func Ende ()
    Exit
    EndFunc

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

    Danke

    LG
    Manlius

  • Problem mit UDF

    • Manlius
    • 21. Juni 2009 um 20:26

    Kann man jetzt noch irgendwie verhindern, dass wenn die AdlibEnable Funktion an der Reihe ist, dass dann die _Timer_SetTimer Funktin nicht dazwischen funkt?!
    Weil in meinem Script, sieht das so aus:

    Spoiler anzeigen
    [autoit]


    If $funk1 = 1 Then
    AdlibEnable ("funk1",1000)
    EndIf
    If $1 Or $2 Or $3 Or $4 Or $5 = 1 Then
    $hwnd = GUICreate ("hallo")
    $nTimer = _Timer_SetTimer ($hwnd,3000,"funk2")
    EndIf

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

    Func funk1 ()
    PixelSearch (307,28,307,28,0x221D16,5)
    If Not @error Then
    usw... (hier kommt was längeres hin)
    Endif
    Endfunc

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

    Func funk2 ($hwnd, $Msg, $iIDTimer, $dwTime)
    $p = PixelGetColor (742,189)
    If $p = 0xFFFBFF Then
    usw....
    Endif
    Endfunc

    [/autoit]
  • Or

    • Manlius
    • 21. Juni 2009 um 00:30

    Hey Leute,
    kann man eigentlich "Or" als Ersatz von Random nehmen?!
    Hier is ein Script:

    Spoiler anzeigen
    [autoit]

    HotKeySet ("{F5}" , "Start")
    HotKeySet ("{ESC}" ,"Ende")

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

    $5 = "hallo "
    $6 = "hi "
    $7 = "huhu "

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

    While 1
    Sleep (1000)
    WEnd

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

    Func Start ()
    MsgBox (0,$5,$5 Or $6 Or $7)
    EndFunc

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

    Func Ende ()
    Exit
    EndFunc

    [/autoit]

    Das Problem hierbei ist, dass dann in der MsgBox "True" steht.
    Was stimmt an dem Script nicht?

    Danke

    LG
    Manlius

  • Problem mit UDF

    • Manlius
    • 16. Juni 2009 um 20:43

    Ah ok thx hab den Fehler jetzt gefunden. Jetzt zeigt´s auf jedenfall nicht mehr die fehlermeldung an.
    Ich will _Timer_SetTimer als AdlibEnable Ersatz nehmen. Aber iwie check ich das in der Hilfe nicht. Die erste Angabe von der Funktion:

    Handle zu dem Fenster, welches zu dem Timer gehört.
    Dieses Fenster muß zu dem aufgerufenen Thread gehören

    Ich habe in meinem Sript keine GUI oder ähnliches...
    Was muss ich dann hier schreiben?!: _Timer_SetTimer (hier,3000,"Adlib Ersatz")

  • Problem mit UDF

    • Manlius
    • 16. Juni 2009 um 20:29

    wasn ein Obfuscator?!

  • Problem mit UDF

    • Manlius
    • 16. Juni 2009 um 18:43

    Das Timers UDF sieht so aus:

    Spoiler anzeigen
    [autoit]

    #include-once

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

    ; #INDEX# =======================================================================================================================
    ; Title .........: Timers
    ; AutoIt Version: 3.2.3++
    ; Language: English
    ; Description ...: An application uses a timer to schedule an event for a window after a specified time has elapsed.
    ; Each time the specified interval (or time-out value) for a timer elapses, the system notifies the window
    ; associated with the timer. Because a timer's accuracy depends on the system clock rate and how often the
    ; application retrieves messages from the message queue, the time-out value is only approximate.
    ; Author ........: Gary Frost
    ; ===============================================================================================================================

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

    ; #VARIABLES# ===================================================================================================================
    Global $_Timers_aTimerIDs[1][3]
    ; ===============================================================================================================================

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

    ; ===============================================================================================================================
    ; #CURRENT# =====================================================================================================================
    ;_Timer_Diff
    ;_Timer_GetIdleTime
    ;_Timer_GetTimerID
    ;_Timer_Init
    ;_Timer_KillAllTimers
    ;_Timer_KillTimer
    ;_Timer_SetTimer
    ; ===============================================================================================================================

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

    ; #INTERNAL_USE_ONLY#============================================================================================================
    ;_Timer_QueryPerformanceCounter
    ;_Timer_QueryPerformanceFrequency
    ; ===============================================================================================================================

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _Timer_Diff
    ; Description ...: Returns the difference in time from a previous call to _Timer_Init
    ; Syntax.........: _Timer_Diff($iTimeStamp)
    ; Parameters ....: $iTimeStamp - Timestamp returned from a previous call to _Timer_Init().
    ; Return values .: Success - Returns the time difference (in milliseconds) from a previous call to _Timer_Init().
    ; Author ........: Gary Frost, original by Toady
    ; Modified.......:
    ; Remarks .......:
    ; Related .......: _Timer_Diff
    ; Link ..........;
    ; Example .......; Yes
    ; ===============================================================================================================================
    Func _Timer_Diff($iTimeStamp)
    Return 1000 * (_Timer_QueryPerformanceCounter() - $iTimeStamp) / _Timer_QueryPerformanceFrequency()
    EndFunc ;==>_Timer_Diff

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

    ; #FUNCTION#;===============================================================================
    ; Name...........: _Timer_GetIdleTime
    ; Description ...: Returns the number of ticks since last user activity (i.e. KYBD/Mouse)
    ; Syntax.........: _Timer_GetIdleTime()
    ; Parameters ....: None
    ; Return values .: Success - integer ticks since last (approx. milliseconds) since last activity
    ; Failure - Sets @extended = 1 if rollover occurs (see remarks)
    ; Author ........: PsaltyDS at http://www.autoitscript.com/forum
    ; Modified.......:
    ; Remarks .......: The current ticks since last system restart will roll over to 0 every 50 days or so,
    ; which makes it possible for last user activity to be before the rollover, but run time
    ; of this function to be after the rollover. If this happens, @extended = 1 and the
    ; returned value is ticks since rollover occured.
    ; Related .......:
    ; Link ..........;
    ; Example .......; Yes
    ;;==========================================================================================
    Func _Timer_GetIdleTime()
    ; Get ticks at last activity
    Local $tStruct = DllStructCreate("uint;dword");
    DllStructSetData($tStruct, 1, DllStructGetSize($tStruct));
    DllCall("user32.dll", "int", "GetLastInputInfo", "ptr", DllStructGetPtr($tStruct))

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

    ; Get current ticks since last restart
    Local $avTicks = DllCall("Kernel32.dll", "int", "GetTickCount")

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

    ; Return time since last activity, in ticks (approx milliseconds)
    Local $iDiff = $avTicks[0] - DllStructGetData($tStruct, 2)
    If $iDiff >= 0 Then
    ; Normal return
    Return $iDiff
    Else
    ; Rollover of ticks counter has occured
    Return SetError(0, 1, $avTicks[0])
    EndIf
    EndFunc ;==>_Timer_GetIdleTime

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _Timer_GetTimerID
    ; Description ...: Returns the Timer ID from $iwParam
    ; Syntax.........: _Timer_GetTimerID($iwParam)
    ; Parameters ....: $iwParam - Specifies the timer identifier event.
    ; Return values .: Success - The Timer ID
    ; Failure - 0
    ; Author ........: Gary Frost
    ; Modified.......:
    ; Remarks .......:
    ; Related .......: _Timer_SetTimer
    ; Link ..........;
    ; Example .......; Yes
    ; ===============================================================================================================================
    Func _Timer_GetTimerID($iwParam)
    Local $_iTimerID = Dec(Hex($iwParam, 8)), $iMax = UBound($_Timers_aTimerIDs) - 1
    For $x = 1 To $iMax
    If $_iTimerID = $_Timers_aTimerIDs[$x][1] Then Return $_Timers_aTimerIDs[$x][0]
    Next
    Return 0
    EndFunc ;==>_Timer_GetTimerID

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _Timer_Init
    ; Description ...: Returns a timestamp (in milliseconds).
    ; Syntax.........: _Timer_Init()
    ; Parameters ....:
    ; Return values .: Success - Returns a timestamp number (in milliseconds).
    ; Author ........: Gary Frost, original by Toady
    ; Modified.......:
    ; Remarks .......:
    ; Related .......: _Timer_Diff
    ; Link ..........;
    ; Example .......; Yes
    ; ===============================================================================================================================
    Func _Timer_Init()
    Return _Timer_QueryPerformanceCounter()
    EndFunc ;==>_Timer_Init

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _Timer_KillAllTimers
    ; Description ...: Destroys all the timers
    ; Syntax.........: _Timer_KillAllTimers($hWnd)
    ; Parameters ....: $hWnd - Handle to the window associated with the timers.
    ; |This value must be the same as the hWnd value passed to the _Timer_SetTimer function that created the timer
    ; Return values .: Success - True
    ; Failure - False
    ; Author ........: Gary Frost
    ; Modified.......: Squirrely1
    ; Remarks .......: The _Timer_KillAllTimers function does not remove WM_TIMER messages already posted to the message queue
    ; Related .......: _Timer_KillTimer, _Timer_SetTimer
    ; Link ..........;
    ; Example .......; Yes
    ; ===============================================================================================================================
    Func _Timer_KillAllTimers($hWnd)
    Local $iResult, $hCallBack = 0, $iNumTimers = $_Timers_aTimerIDs[0][0]
    If $iNumTimers Then
    For $x = $iNumTimers To 1 Step -1
    If IsHWnd($hWnd) Then
    $iResult = DllCall("user32.dll", "int", "KillTimer", "hwnd", $hWnd, "int", $_Timers_aTimerIDs[$x][1])
    If @error Then Return SetError(-1, -1, False)
    Else
    $iResult = DllCall("user32.dll", "int", "KillTimer", "hwnd", $hWnd, "int", $_Timers_aTimerIDs[$x][0])
    If @error Then Return SetError(-1, -1, False)
    EndIf
    $hCallBack = $_Timers_aTimerIDs[$x][2]
    If $hCallBack <> 0 Then DllCallbackFree($hCallBack)
    $_Timers_aTimerIDs[0][0] -= 1
    Next
    ReDim $_Timers_aTimerIDs[1][3]
    Else
    Return False
    EndIf
    Return $iResult[0] <> 0
    EndFunc ;==>_Timer_KillAllTimers

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _Timer_KillTimer
    ; Description ...: Destroys the specified timer
    ; Syntax.........: _Timer_KillTimer($hWnd, $iTimerID)
    ; Parameters ....: $hWnd - Handle to the window associated with the specified timer.
    ; |This value must be the same as the hWnd value passed to the _Timer_SetTimer function that created the timer
    ; $iTimerID - Specifies the timer to be destroyed
    ; Return values .: Success - True
    ; Failure - False
    ; Author ........: Gary Frost
    ; Modified.......: Squirrely1
    ; Remarks .......: The _Timer_KillTimer function does not remove WM_TIMER messages already posted to the message queue
    ; Related .......: _Timer_KillAllTimers, _Timer_SetTimer
    ; Link ..........; @@MsdnLink@@ KillTimer
    ; Example .......; Yes
    ; ===============================================================================================================================
    Func _Timer_KillTimer($hWnd, $iTimerID)
    Local $iResult[1] = [0], $hCallBack = 0, $iUBound = UBound($_Timers_aTimerIDs) - 1
    For $x = 1 To $iUBound
    If $_Timers_aTimerIDs[$x][0] = $iTimerID Then
    If IsHWnd($hWnd) Then
    $iResult = DllCall("user32.dll", "int", "KillTimer", "hwnd", $hWnd, "int", $_Timers_aTimerIDs[$x][1])
    Else
    $iResult = DllCall("user32.dll", "int", "KillTimer", "hwnd", $hWnd, "int", $_Timers_aTimerIDs[$x][0])
    EndIf
    If @error Then Return SetError(-1, -1, False)
    If $iResult[0] = 0 Then Return SetError(-1, -1, False)
    $hCallBack = $_Timers_aTimerIDs[$x][2]
    If $hCallBack <> 0 Then DllCallbackFree($hCallBack)
    For $i = $x To $iUBound - 1
    $_Timers_aTimerIDs[$i][0] = $_Timers_aTimerIDs[$i + 1][0]
    $_Timers_aTimerIDs[$i][1] = $_Timers_aTimerIDs[$i + 1][1]
    $_Timers_aTimerIDs[$i][2] = $_Timers_aTimerIDs[$i + 1][2]
    Next
    ReDim $_Timers_aTimerIDs[UBound($_Timers_aTimerIDs - 1)][3]
    $_Timers_aTimerIDs[0][0] -= 1
    ExitLoop
    EndIf
    Next
    Return $iResult[0] <> 0
    EndFunc ;==>_Timer_KillTimer

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

    ; #INTERNAL_USE_ONLY#============================================================================================================
    ; Name...........: _Timer_QueryPerformanceCounter
    ; Description ...: Retrieves the current value of the high-resolution performance counter
    ; Syntax.........: _Timer_QueryPerformanceCounter()
    ; Parameters ....:
    ; Return values .: Success - Current performance-counter value, in counts
    ; Failure - -1
    ; Author ........: Gary Frost
    ; Modified.......:
    ; Remarks .......:
    ; Related .......: _Timer_QueryPerformanceFrequency
    ; Link ..........; @@MsdnLink@@ QueryPerformanceCounter
    ; Example .......;
    ; ===============================================================================================================================
    Func _Timer_QueryPerformanceCounter()
    Local $tperf = DllStructCreate("int64")
    DllCall("kernel32.dll", "int", "QueryPerformanceCounter", "ptr", DllStructGetPtr($tperf))
    If @error Then Return SetError(-1, -1, -1)
    Return DllStructGetData($tperf, 1)
    EndFunc ;==>_Timer_QueryPerformanceCounter

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

    ; #INTERNAL_USE_ONLY#============================================================================================================
    ; Name...........: _Timer_QueryPerformanceFrequency
    ; Description ...: Retrieves the current value of the high-resolution performance counter
    ; Syntax.........: _Timer_QueryPerformanceFrequency()
    ; Parameters ....:
    ; Return values .: Success - Current performance-counter frequency, in counts per second
    ; Failure - 0
    ; Author ........: Gary Frost
    ; Modified.......:
    ; Remarks .......: If the installed hardware does not support a high-resolution performance counter, the return can be zero.
    ; Related .......: _Timer_QueryPerformanceCounter
    ; Link ..........; @@MsdnLink@@ QueryPerformanceCounter
    ; Example .......;
    ; ===============================================================================================================================
    Func _Timer_QueryPerformanceFrequency()
    Local $tperf = DllStructCreate("int64")
    DllCall("kernel32.dll", "int", "QueryPerformanceFrequency", "ptr", DllStructGetPtr($tperf))
    If @error Then Return SetError(-1, -1, 0)
    Return DllStructGetData($tperf, 1)
    EndFunc ;==>_Timer_QueryPerformanceFrequency

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

    ; #FUNCTION# ====================================================================================================================
    ; Name...........: _Timer_SetTimer
    ; Description ...: Creates a timer with the specified time-out value
    ; Syntax.........: _Timer_SetTimer($hWnd[, $iElapse = 250[, $sTimerFunc = ""[, $iTimerID = -1]]])
    ; Parameters ....: $hWnd - Handle to the window to be associated with the timer.
    ; |This window must be owned by the calling thread
    ; $iElapse - Specifies the time-out value, in milliseconds
    ; $sTimerFunc - Function name to be notified when the time-out value elapses
    ; $iTimerID - Specifies a timer identifier.
    ; |If $iTimerID = -1 then a new timer is created
    ; |If $iTimerID matches an existing timer then the timer is replaced
    ; |If $iTimerID = -1 and $sTimerFunc = "" then timer will use WM_TIMER events
    ; Return values .: Success - Integer identifying the new timer
    ; Failure - 0
    ; Author ........: Gary Frost
    ; Modified.......: Squirrely1
    ; Remarks .......:
    ; Related .......: _Timer_KillTimer, _Timer_KillAllTimers, _Timer_GetTimerID
    ; Link ..........; @@MsdnLink@@ SetTimer
    ; Example .......; Yes
    ; ===============================================================================================================================
    Func _Timer_SetTimer($hWnd, $iElapse = 250, $sTimerFunc = "", $iTimerID = -1)
    Local $iResult[1], $pTimerFunc = 0, $hCallBack = 0, $iIndex = $_Timers_aTimerIDs[0][0] + 1
    If $iTimerID = -1 Then ; create a new timer
    ReDim $_Timers_aTimerIDs[$iIndex + 1][3]
    $_Timers_aTimerIDs[0][0] = $iIndex
    $iTimerID = $iIndex + 1000
    For $x = 1 To $iIndex
    If $_Timers_aTimerIDs[$x][0] = $iTimerID Then
    $iTimerID = $iTimerID + 1
    $x = 0
    EndIf
    Next
    If $sTimerFunc <> "" Then ; using callbacks, if $sTimerFunc = "" then using WM_TIMER events
    $hCallBack = DllCallbackRegister($sTimerFunc, "none", "hwnd;int;int;dword")
    If $hCallBack = 0 Then Return SetError(-1, -1, 0)
    $pTimerFunc = DllCallbackGetPtr($hCallBack)
    If $pTimerFunc = 0 Then Return SetError(-1, -1, 0)
    EndIf
    $iResult = DllCall("user32.dll", "int", "SetTimer", "hwnd", $hWnd, "int", $iTimerID, "int", $iElapse, "ptr", $pTimerFunc)
    If @error Then Return SetError(-1, -1, 0)
    If $iResult[0] = 0 Then Return SetError(-1, -1, 0)
    $_Timers_aTimerIDs[$iIndex][0] = $iResult[0] ; integer identifier
    $_Timers_aTimerIDs[$iIndex][1] = $iTimerID ; timer id
    $_Timers_aTimerIDs[$iIndex][2] = $hCallBack ; callback identifier, need this for the Kill Timer
    Else ; reuse timer
    For $x = 1 To $iIndex - 1
    If $_Timers_aTimerIDs[$x][0] = $iTimerID Then
    If IsHWnd($hWnd) Then $iTimerID = $_Timers_aTimerIDs[$x][1]
    $hCallBack = $_Timers_aTimerIDs[$x][2]
    If $hCallBack <> 0 Then ; call back was used to create the timer
    $pTimerFunc = DllCallbackGetPtr($hCallBack)
    If $pTimerFunc = 0 Then Return SetError(-1, -1, 0)
    EndIf
    $iResult = DllCall("user32.dll", "int", "SetTimer", "hwnd", $hWnd, "int", $iTimerID, "int", $iElapse, "ptr", $pTimerFunc)
    If @error Then Return SetError(-1, -1, 0)
    If $iResult[0] = 0 Then Return SetError(-1, -1, 0)
    ExitLoop
    EndIf
    Next
    EndIf
    Return $iResult[0]
    EndFunc ;==>_Timer_SetTimer

    [/autoit]
  • Problem mit UDF

    • Manlius
    • 16. Juni 2009 um 18:11

    Hat niemand eine Lösung?! :(

  • Problem mit UDF

    • Manlius
    • 15. Juni 2009 um 21:00

    Hey Leute,
    ich hab ein Problem mit dem UDF Timers.au3. ICh brauche dieses Include für die Funktion: _Timer_SetTimer.
    Ich kenne mich mit UDFs nicht aus. Die sind mir zu schwer. Auf jedenfall sagt mein SciTe folgendes:

    C:\Programme\AutoIt3\Include\Timers.au3 (282) : ==> Badly formatted "Func" statement.:
    $hCallBack = DllCallbackRegister($sTimerFunc, "none", "hwnd;int;int;dword")

    Danke

    Manlius

  • Adlib Enable

    • Manlius
    • 14. Juni 2009 um 20:26

    Bei mir gibt´s in der Hilfe die Funktion: _Timer_SetTimer nicht... ?(?(?(

  • Adlib Enable

    • Manlius
    • 14. Juni 2009 um 19:37

    Hey Leute,
    kann das sein, dass in einem Script nicht 2mal ein Adlib Enable stehen darf?!
    Ich hab nämlich in einem von meinen Scripten 2 Adlib Enable Funktionen drinnen und komischerweise ruft es immer nur eine auf?!
    Das erste Adlib Enable wird alle 20.000 ms aufgerufen und das 2. alle 30.000 ms.
    Danke
    Manlius

  • For...Next Frage

    • Manlius
    • 6. Juni 2009 um 20:22

    Hey Leute,
    ich habe ein kleines Problem in einem Script.

    Spoiler anzeigen
    [autoit]


    Global $recht = 630
    Global $recht1 = 242
    Global $recht2 = 795
    Global $recht3 = 565

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

    Local $ar_farbe[14]
    $ar_farbe[1] = 0xFFFFFF
    $ar_farbe[2] = 0x6C6C68
    $ar_farbe[3] = 0x4E4C4B
    $ar_farbe[4] = 0x474B28
    $ar_farbe[5] = 0xFFFFDC
    $ar_farbe[6] = 0xCAAC8F
    $ar_farbe[7] = 0x6E5653
    $ar_farbe[8] = 0xA5B6A0
    $ar_farbe[9] = 0x6A5B31
    $ar_farbe[10] = 0x817548
    $ar_farbe[11] = 0x9294A7
    $ar_farbe[12] = 0xABA57F
    $ar_farbe[13] = 0x595367

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

    Global $ar_farbe_name[14]
    $ar_farbe_name[0] = "Blau"
    $ar_farbe_name[1] = "Bunt"
    $ar_farbe_name[2] = "Gelb"
    $ar_farbe_name[3] = "Rot"
    $ar_farbe_name[4] = "Weiss"
    $ar_farbe_name[5] = "Lila"
    $ar_farbe_name[6] = "Schwarz"
    $ar_farbe_name[7] = "Pink"
    $ar_farbe_name[8] = "Orange"
    $ar_farbe_name[9] = "Gruen"
    $ar_farbe_name[10] = "Braun"
    $ar_farbe_name[11] = "Hellblau"
    $ar_farbe_name[12] = "Dunkelblau"
    $ar_farbe_name[13] = "Grau"

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

    ;hier is halt die GUI, in der $ausnahme 1-3 Comboboxen sind

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

    For $a = 1 to 13
    If $ausnahme1 = $ar_farbe_name[$a] Then
    $ar_farbe[$a] = "deaktiviert"
    EndIf
    Next
    For $b = 1 to 13
    If $ausnahme2 = $ar_farbe_name[$b] Then
    $ar_farbe$b] = "deaktiviert"
    EndIf
    Next
    For $c = 1 to 13
    If $ausnahme3 = $ar_farbe_name[$c] Then
    $ar_farbe[$c] = "deaktiviert"
    EndIf
    Next

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

    For $f = 1 to 13
    If $ar_farbe[$f] = "deaktiviert" Then ;hier is mein Problem
    Next ;wie kann ich das machen, dass wenn eine Farbe deaktiviert ist, dass dann das Script bei der nächsten ;For-Schleife anfängt???
    EndIf ;??
    $farbe = PixelSearch ($recht,$recht1,$recht2,$recht3,$ar_farbe[$f])
    If Not @error Then
    MouseClick ("right",$farbe[0],$farbe[1],1)
    EndIf
    Next

    [/autoit] [autoit][/autoit] [autoit][/autoit]
  • Farbe Speichern in Ini

    • Manlius
    • 24. Mai 2009 um 01:57

    Hey Leute,
    wenn ich eine Farbe in einer Ini speichere, speichert es das 0x vorne dran nich mit. Und deshalb is die Farbe in der Ini dann nutzlos, weil sie ja nicht mehr stimmt. Wie kann ich das machen, dass das 0x auch vorne dran steht?! Hier is mein Script:

    Spoiler anzeigen
    [autoit]

    $farbe = 0x0055E6
    $wait = 100

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

    Opt('PixelCoordMode', 2)
    Opt('MouseCoordMode', 2)

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

    HotKeySet ("{F5}","Start")
    HotKeySet ("{ESC}","Ende")

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

    While 1
    Sleep (100)
    WEnd

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

    Func Ende ()
    Exit
    EndFunc

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

    Func Start ()
    $zafa = IniRead (@scriptdir&"\test.ini","Saves","Farbe",0)

    If $zafa = 0 Then
    IniWrite (@scriptdir&"\test.ini","Saves","Farbe",Hex ($farbe))
    Sleep ($wait)
    EndIf

    $zafa5 = IniRead (@scriptdir&"\test.ini","Saves","Farbe",0)
    $pix = PixelSearch (0,0,1000,1000,$zafa5)
    EndFunc

    [/autoit]
  • WinExists Ubound

    • Manlius
    • 18. April 2009 um 13:22

    Hallo Leute,
    ich würde mir gerne ein Script machen, dass in eine Ini schreibt, welche Programme offen sind bzw. welche geöffnet wurden.
    Bis jetzt sieht das bei mir so aus:

    Spoiler anzeigen
    [autoit]

    Global $pro[0] = $partyfans
    $pro[1] = $metin
    $pro[2] = $nostale
    $pro[3] = $web
    $pro[4] = $icq
    $pro[5] = $outlook
    Global $partyfans = "partyfans.com - Community - Mozilla Firefox"
    $metin = "Metin2"
    $nostale = "Nostale"
    $web = "WEB.DE - E-Mail - Suche - DSL - Modem - Shopping - Entertainment - Mozilla Firefox"
    $icq = "ICQ"
    $outlook = "Outlook Express"
    Global $ubound_pro = UBound ($pro)
    Global $end_ubound_pro = $ubound_pro -1

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

    For $i = 1 to $end_ubound_pro
    WinExists ($pro[$i])
    Next

    [/autoit]

    Wie kann ich das nun machen, dass das in ne Ini geschrieben wird wenn eines dieser Fenster geöffnet ist??

    Danke

  • Datei in Rar bzw. Zip verpacken

    • Manlius
    • 9. April 2009 um 21:21

    Bei dem macht mein SciTe "Dicke Backen":

    C:\Programme\AutoIt3\Include\Zip-UDF.au3 (12) : ==> The requested action with this object has failed.:
    $oDir.CopyHere($addFile)
    $oDir.CopyHere($addFile)^ ERROR
    >Exit code: 1 Time: 0.644

    Edit: OK hat sich geklärt. Das mit dem UDF von Stilgar funktioniert jetzt!
    Danke

  • Datei in Rar bzw. Zip verpacken

    • Manlius
    • 9. April 2009 um 21:08

    Achso okay das wusste ich nicht.
    Also bei mit sieht das jetzt so aus:

    Spoiler anzeigen
    [autoit]


    #Include<Zip.au3>

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

    _FileToARchive (@scriptdir&"\Beeper.exe",@ScriptDir&"\Beeper6.zip")

    [/autoit]

    Das funktioniert aber nicht. Error oder so zeigt die Console nicht an und es öffnet sich auch ein cmd fenster, welches nach ner halben Sekunde oder so wieder verschwindet.

  • Datei in Rar bzw. Zip verpacken

    • Manlius
    • 9. April 2009 um 20:31

    Also bei dem "Meine ZIP UDF" muss man diese Code da als Include benutzen oder wie?!?!
    Die 7z Datei hab ich in den Ordner C:\Programme\7-Zip gespeichert. Also so wie´s in dem Code steht...

  • Datei in Rar bzw. Zip verpacken

    • Manlius
    • 9. April 2009 um 12:34

    Muss man das checken, wie das da gehen soll?! xD

  • Datei in Rar bzw. Zip verpacken

    • Manlius
    • 9. April 2009 um 10:19

    Hallo Leute,
    ich möchte mir gerne eine Datei über AutoIt senden.
    Leider blockiert der Outlook Express die Datei bzw. löscht sie ganz aus der E-Mail.
    Jetzt meine Frage: Ist es möglich, dass AutoIt die Datei vorher in eine Rar oder in eine Zip Datei verpackt?
    Also gibt es da irgendein Befehl dafür?
    Danke

    LG
    Manlius

  • Maussteuerprogramm

    • Manlius
    • 6. April 2009 um 21:49

    Hallo Leute,
    da meine Maus aus welchen Gründen auch immer oft ausfällt, habe ich gedacht, dass ich mir doch einfach ein Programm programmieren könnte, womit ich meine Maus per Tastatur steuern kann. Leider ist das Programm nicht ganz flüssig. Wie könnte ich das ganze schneller machen?

    Spoiler anzeigen
    [autoit]

    HotKeySet ("{Right}","rechts")
    HotKeySet ("{Left}","links")
    HotKeySet ("{up}","hoch")
    HotKeySet ("{down}","runter")
    HotKeySet ("{ESC}","Ende")

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

    While 1
    $mouse = MouseGetPos ()
    WEnd

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

    Func rechts ()
    MouseMove ($mouse[0] +10,$mouse[1],1000)
    EndFunc

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

    Func links ()
    MouseMove ($mouse[0] -10,$mouse[1],1000)
    EndFunc

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

    Func hoch ()
    MouseMove ($mouse[0] ,$mouse[1] -10,1000)
    EndFunc

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

    Func runter ()
    MouseMove ($mouse[0] ,$mouse[1] +10,1000)
    EndFunc

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

    Func Ende ()
    Exit
    EndFunc

    [/autoit]

    Danke

    LG
    Manlius

  • Zur GUI zurückleiten

    • Manlius
    • 12. März 2009 um 19:01

    Hey Leute,
    wenn man in meinem Script in einer Gui und hier wiederum in eine Inputbox eine Zahl größer als 4 eingibt, soll eine MsgBox kommen und man soll zur Gui zurück geleitet werden.
    Wenn alles ordnungsgemäß verläuft, soll die GUI geschlossen werden.
    Wie soll ich das anstellen?!
    Bis jetzt sieht das ganze so aus:

    Spoiler anzeigen
    [autoit]


    #include <GUIConstants.au3>

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

    $gui = GUICreate ("Meine GUI",400,300,-1,-1)
    GUISetState ()
    Opt ("GUICoordMode",1)
    GUISetBkColor (0x0162FA)
    $button = GUICtrlCreateButton ("Start",150,190,100,30)
    $input = GUICtrlCreateInput ("Zahl zwischen 1 und 4",120,220,150,-1)

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

    While 1
    $input1 = GUictrlread ($input)
    $msg = GUIgetmsg ()
    If $msg = $button Then
    If $input1 > 4 Then
    MsgBox (0,"Fehler","Die Zahl darf nicht größer als 4 sein!!! Du wirst zurück in die Gui geleitet")
    EndIf
    HotKeySet ("{F5}" , "Start")
    HotKeySet ("{ESC}" ,"Ende")
    GUIDelete ()
    EndIf
    WEnd

    [/autoit]

    Danke
    Manlius

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™