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

Beiträge von RR04

  • Anfängerschwierigkeiten (Checkbox, Button etc.)

    • RR04
    • 1. April 2013 um 09:27

    Hi,
    ich habe in Post #7 noch eine Anpassung vorgenommen und meiner alten Ausführung gegeübergestellt. ;)

  • Problem mit If-Abfrage

    • RR04
    • 1. April 2013 um 09:10

    Hi,
    werden hier Variablen mehrfach vergeben? ;)

    [autoit]


    $path = @ScriptDir & "\PICS\"
    $path = @ScriptDir & "\INI\"

    [/autoit]
  • Anfängerschwierigkeiten (Checkbox, Button etc.)

    • RR04
    • 30. März 2013 um 19:40

    ... sollte auch funktionieren ;)

    [autoit]


    Func _Auswertung()
    Local $result = GUICtrlRead($basis)
    If BitAND(GUICtrlRead($filter), $GUI_CHECKED) Then $result = GUICtrlRead($basis) * GUICtrlRead($faktor) / 100
    MsgBox("0", "Ergebnis", "Ihr gewünschtes Ergebnis lautet: " & $result)
    EndFunc ;==>_Auswertung

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

    ;i Mit der Anpassung wird "GUICtrlRead($basis)" nur einmal gelesen!
    Func _Auswertung()
    Local $result = GUICtrlRead($basis)
    If BitAND(GUICtrlRead($filter), $GUI_CHECKED) Then $result *= GUICtrlRead($faktor) / 100
    MsgBox("0", "Ergebnis", "Ihr gewünschtes Ergebnis lautet: " & $result)
    EndFunc ;==>_Auswertung
    ; Ende

    [/autoit]
  • Funktion aufrufen wenn Tab Item angeklick wurde

    • RR04
    • 28. März 2013 um 06:46

    Hier noch eine andere Möglichkeit. ;)

    [autoit]


    $title = "TabSwitch - Tut"
    Global $tate = 0, $TabSheet[2]
    GUICreate($title, 600, 450)
    $button = GUICtrlCreateButton($title, 10, 10, 200, 25)
    $bnClose = GUICtrlCreateButton($title & " Beenden", 390, 10, 200, 25)
    $Tab = GUICtrlCreateTab(10, 50, 580, 390)
    $TabSheet[0] = GUICtrlCreateTabItem("TabItem 1")
    $btnX = GUICtrlCreateButton("Button X", 72, 168, 121, 22)
    $TabSheet[1] = GUICtrlCreateTabItem("TabItem 2")
    GUICtrlCreateLabel("Vorname", 30, 110, 60, 17)
    GUICtrlCreateInput("Input 1", 100, 110, 80, 21)
    GUICtrlCreateLabel("Nachname", 30, 150, 60, 17)
    GUICtrlCreateInput("Input 2", 100, 150, 80, 21)

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

    GUICtrlCreateLabel("Straße", 30, 190, 60, 17)
    GUICtrlCreateInput("Input 3", 100, 190, 80, 21)
    GUICtrlCreateLabel("Hausnr.", 30, 230, 60, 17)
    GUICtrlCreateInput("Input 4", 100, 230, 80, 21)

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

    GUICtrlCreateLabel("PLZ", 30, 270, 60, 17)
    GUICtrlCreateInput("Input 5", 100, 270, 80, 21)
    GUICtrlCreateLabel("Ort", 30, 310, 60, 17)
    GUICtrlCreateInput("Input 6", 100, 310, 80, 21)
    $btnRead = GUICtrlCreateButton("Eingaben einlesen", 72, 380, 121, 22)
    GUISetState(@SW_SHOW)

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

    While True
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case -3, $bnClose, $btnX
    MsgBox(64, $title, "Viel Spaß wünscht RR04 !" & @TAB, 3)
    ExitLoop
    Case $button
    $tate = BitXOR($tate, 0, 1)
    For $k = 0 To 1 ;i statisch kein Ubound
    GUICtrlSetState($TabSheet[$tate], 16)
    GUICtrlSetData($button, "Wechseln zu TabItem " & BitXOR($tate, 0, 1) + 1)
    Next
    EndSwitch
    WEnd
    ; Ende

    [/autoit]
  • StringRegExp / String splitten

    • RR04
    • 9. März 2013 um 09:32

    Alcros,
    eieiei stimmt. War mein Ding. ;)

    @m-obi,
    dann ist das auch falsch?
    http://translation.autoit.de/onlinehilfe/fu…StringSplit.htm

  • StringRegExp / String splitten

    • RR04
    • 9. März 2013 um 09:01
    [autoit]


    ;i Schau dir mal StringSplit in der dt. Hilfe an.
    ;i Besonders die Beschreibung.
    Local $tring = "ID1 F2 A3"
    Local $array = StringSplit($tring, "")
    MsgBox(0, "", $array[0] & $array[1] & $array[2] & $array[3] & $array[4] _
    & $array[5] & $array[6] & $array[7] & $array[8] & $array[9])
    MsgBox(0, "", $array[1] & $array[2] & $array[3] & @CRLF & $array[5] _
    & $array[6] & @CRLF & $array[8] & $array[9])
    Exit
    ; Ende

    [/autoit]
  • String mit Sonderzeichen "&" in GUICtrlCreateLabel wie formatieren?

    • RR04
    • 24. Februar 2013 um 15:03

    So ? ;)

    [autoit]


    #region ### START Koda GUI section ###
    GUICreate("Kaufm. Und", 250, 250, 361)
    ;i & als Schriftzeichen
    $Label = GUICtrlCreateLabel("Friendly && Fire", 10, 50, 75, 20)
    ;i & mit Tastenkombi "Alt+S" die Aktion auslösen
    $Button = GUICtrlCreateButton("&Set Settings", 11, 100, 75, 25)
    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

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

    While True
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case -3 ;$GUI_EVENT_CLOSE
    ExitLoop
    Case $Button
    $var = "Friendly "
    $var &= "Fire "
    ;i ...und auch hier.
    MsgBox(64, "Strings addiert", $var & @TAB)
    EndSwitch
    WEnd
    ; Ende

    [/autoit]
  • Combox auslesen und in Edit anderen wert schreiben.

    • RR04
    • 23. Februar 2013 um 10:01

    Hi !
    Es ist auch möglich mehrere Werte zu unterscheiden, als nur ja oder nein.

    Spoiler anzeigen
    [autoit]


    GUICreate("Combo-Tut", 280, 80)
    $cmbCombo = GUICtrlCreateCombo("", 10, 5, 260, 20)
    GUICtrlSetData($cmbCombo, "|Fall 1|Fall 2|Fall 3")
    $btnEx = GUICtrlCreateButton("Example 1-3", 190, 40, 80, 22)
    GUISetState()

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

    While True
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case -3 ;i $GUI_EVENT_CLOSE
    ExitLoop
    Case $btnEx
    ;i Example 1
    MsgBox(0, "1. Example", GUICtrlRead($cmbCombo))

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

    ;i Example 2
    $comboRead = GUICtrlRead($cmbCombo)
    If $comboRead = "Fall 1" Then
    MsgBox(64, "2. Example", "Der Erste.")
    ElseIf $comboRead = "Fall 2" Then
    MsgBox(64, "2. Example", "Der Zweite.")
    ElseIf $comboRead = "Fall 3" Then
    MsgBox(64, "2. Example", "Der Dritte.")
    Else
    MsgBox(48, "2. Example", "Der Ausnahmefall.")
    EndIf

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

    ;i Example 3
    $comboRead = GUICtrlRead($cmbCombo)
    $Flag = 64
    $sHeader = "3. Example"
    Switch $comboRead
    Case "Fall 1"
    $Msg = "Der Erste."
    Case "Fall 2"
    $Msg = "Der Zweite."
    Case "Fall 3"
    $Msg = "Der Dritte."
    Case Else
    $Flag = 48
    $sHeader = "Oh oh"
    $Msg = "Keiner der definierten Fälle !"
    EndSwitch
    MsgBox($Flag, $sHeader, StringFormat("%s \n\n %s", $comboRead, $Msg) & @TAB)
    EndSwitch
    WEnd
    ; Ende

    [/autoit]


    Da der User Deines Scriptes eine weitere Einstellungsmöglichkeit hat:

    Spoiler anzeigen
    [autoit]


    #include <ComboConstants.au3>
    #include <EditConstants.au3>
    #region ### START Koda GUI section ###
    GUICreate("Server Settings", 237, 439, 361, 122)
    $Combo = GUICtrlCreateCombo("", 9, 69, 145, 25, BitOR($GUI_SS_DEFAULT_COMBO, $CBS_DROPDOWNLIST))
    GUICtrlSetData(-1, "Yes|No")
    GUICtrlCreateLabel("Friendly Fire", 9, 48, 60, 17)
    $Edit = GUICtrlCreateEdit("", 6, 187, 210, 89, BitOR($GUI_SS_DEFAULT_EDIT, $ES_READONLY))
    $Button = GUICtrlCreateButton("Set Settings", 11, 120, 75, 25)
    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

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

    While True
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case -3
    ExitLoop
    Case $Button
    $s = 'SetSetting friendly_fire '
    $read = GUICtrlRead($Combo)
    Switch $read
    Case "Yes"
    $write = 1
    Case "No"
    $write = 0
    Case Else
    $write = "keine Eingabe"
    EndSwitch
    GUICtrlSetData($Edit, $s & $write)
    EndSwitch
    WEnd
    ; Ende

    [/autoit]

    Dateien

    Combo-Tut.au3 1,25 kB – 368 Downloads
  • Problem mit GuiCtrlCreateAvi

    • RR04
    • 22. Februar 2013 um 19:00

    Hallo !
    Das Umwandeln kannst Du mit VirtualDub machen.
    Im Anhang ist noch ein Beispiel mit AVI. ;)

    Spoiler anzeigen
    [autoit]


    Example()

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

    Func Example()
    Local $avi, $buttonstart, $buttonstop, $msg

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

    GUICreate("GUICtrlCreateAvi-Tut", 360, 200)
    $avi = GUICtrlCreateAvi(@ScriptDir & "\RDgo.avi", 10, 10, 10)
    $buttonstart = GUICtrlCreateButton("Start", 95, 150, 75, 22)
    $buttonstop = GUICtrlCreateButton("Stopp", 195, 150, 75, 22)

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

    GUISetState()
    ; Die Schleife wiederholt sich, bis der Benutzer eine Beenden-Aktion auslöst
    While True
    $msg = GUIGetMsg()
    Switch $msg
    Case -3
    ExitLoop
    Case $buttonstart
    GUICtrlSetState($avi, 1)
    Case $buttonstop
    GUICtrlSetState($avi, 0)
    EndSwitch
    WEnd
    EndFunc ;==>Example
    ; Ende

    [/autoit]

    Dateien

    AutoIt-AVI.zip 17,25 kB – 379 Downloads
  • Problem mit GuiCtrlCreateAvi

    • RR04
    • 22. Februar 2013 um 08:19

    Hi !
    Das ist hier zutreffend:
    Auch Dein ??.avi Format ist besonders wichtig.
    Also nicht der 90 min. Spielfilm, sonder das URavi mit denen die Animationen abgespielt werden, ist hier gemeint.

    Im Link ist ein tut das funktionieren sollte.

    Du hast den AVI-Film mit Codec usw. .
    AVI ist hier ein Container-Format, sprich Du musst den Film umwandeln oder einen anderen Player verwenden. ;)

  • Problem mit GuiCtrlCreateAvi

    • RR04
    • 21. Februar 2013 um 19:39

    Hi,

    hier ein Link zur Hilfe:
    http://translation.autoit.de/onlinehilfe/fu…rlCreateAvi.htm

    Weiterhin könnte die Windowsversion wichtig sein.
    Auch Dein ??.avi Format ist besonders wichtig. Also nicht der 90 min. Spielfilm, sonder das URavi mit denen die Animationen abgespielt werden, ist hier gemeint.

  • Combobox Problem

    • RR04
    • 14. Februar 2013 um 15:24
    [autoit]


    GUICreate("Combo-Tut", 200, 80)
    $map = GUICtrlCreateCombo("", 0, 5)
    GUICtrlSetData($map, "|Test 1|Test 2|Test 3")
    $Button = GUICtrlCreateButton("Button", 100, 40, 75, 22)
    GUISetState()

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

    While True
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case -3 ;i $GUI_EVENT_CLOSE
    ExitLoop
    Case $Button
    ;i Example 1
    MsgBox(0, "1. Example", GUICtrlRead($map))
    ;i Example 2
    $var = GUICtrlRead($map)
    Switch $var
    Case "Test 1"
    $Msg = "Das Erste"
    Case "Test 2"
    $Msg = "Das Zweite"
    Case "Test 3"
    $Msg = "Das Dritte"
    Case Else
    $Msg = "Eine Eingabe ist erforderlich !"
    EndSwitch
    MsgBox(0, "2. Example", $Msg)
    EndSwitch
    WEnd
    ; Ende

    [/autoit]

    Dateien

    Combo-Tut1.au3 695 Byte – 341 Downloads
  • Adobe Photoshop C2 kostenlos downloaden

    • RR04
    • 1. Februar 2013 um 09:10

    Update zur Verwendung von Adobe Photoshop CS2, siehe Post #1. ;)

  • Flackerndes GUI bei Aktualisierung der Label

    • RR04
    • 27. Januar 2013 um 16:55

    name22
    Ja, ganz glücklich bin ich mit dieser Lösung auch nicht. Denn bei größeren Fonts wird das Flackern auch stärker.
    Ja, es geht mehr, wie uns Oscar gezeigt hat, dennoch ist es praktikabel je nach Zweck des Einsatzes.

  • Flackerndes GUI bei Aktualisierung der Label

    • RR04
    • 27. Januar 2013 um 16:44

    Uhrzeit mit Sekunden (1Sek. = 1000 ms) anzeigen. So reicht es aus, die Anzeige alle 1000 ms neu zu zeichnen. ;)

    [autoit]


    GUICreate("Uhr", 160, 50)
    Global $Label = GUICtrlCreateLabel("", 10, 10, 140, 30)
    GUICtrlSetFont(-1, 20, 800, 0, "Arial")

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

    GUISetState()

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

    AdlibRegister("_timeSet", 1000)

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

    While True
    $msg = GUIGetMsg()
    Switch $msg
    Case -3
    ExitLoop
    EndSwitch
    WEnd

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

    Func _timeSet()
    GUICtrlSetData($Label, @HOUR & " : " & @MIN & " : " & @SEC)
    EndFunc ;==>_timeSet
    ; Ende

    [/autoit]
  • Werte in INI Datei ändern?

    • RR04
    • 27. Januar 2013 um 09:32

    Hi, die Lösung von i2c etwas angepasst. ;)

    [autoit]


    _message(1)
    _message(2)
    _message(3)
    _message(4)
    _message(5)
    Exit

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

    Func _message($var)
    Local $flag, $msg
    Switch $var
    Case 1
    $flag = 0
    $msg = "blabla"
    Case 2
    $flag = 16
    $msg = "Oh oh !"
    Case 3
    $flag = 32
    $msg = "usw."
    Case 4
    $flag = 48
    $msg = "tralala"
    Case 5
    $flag = 64
    $msg = "usw."
    EndSwitch
    MsgBox($flag, "", $msg & @TAB)
    EndFunc ;==>_message
    ; Ende

    [/autoit]
  • EmptyDllCreator

    • RR04
    • 23. Januar 2013 um 20:30

    EmptyDllCreator, gab es den nicht schon einmal vor einiger Zeit ? :!:

    [autoit]


    #NoTrayIcon

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

    Global $bEmptyDll = "0x4D5A80000100000004001000FFFF0000400100000000000040000000000000" & _
    "0000000000000000000000000000000000000000000000000000000000800000000E1FBA0E00B" & _
    "409CD21B8014CCD21546869732070726F6772616D2063616E6E6F742062652072756E20696E20" & _
    "444F53206D6F64652E0D0A240000000000000000504500004C010300B170B04D0000000000000" & _
    "000E0000E210B0101450000000000000000000000000000000000100000001000000000400000" & _
    "10000000020000010000000000000004000000000000000010000000020000929700000200400" & _
    "10010000000100000000001000000000000000000100000000010000000000000000000000000" & _
    "00000000000000000000000000000000000000000000000000000010000000000000000000000" & _
    "00000000000000000000000000000000000000000000000000000000000000000000000000000" & _
    "000000000000000000000000000000000000000000000000000000000000000000000000002E7" & _
    "46578740000000000000000100000000000000002000000000000000000000000000020000060" & _
    "2E656461746100000000000000100000000000000002000000000000000000000000000040000" & _
    "0402E72656C6F6300000000000000100000000000000002000000000000000000000000000040" & _
    "00000200000000000000000000000000000000" ;Created with FASM (Flat Assembler)

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

    Global $hMainGui = GUICreate("EmptyDllCreator", 250, 48)
    Global $hMainCreate = GUICtrlCreateButton("Create empty Dll", 8, 8, 234, 32)
    GUISetState()

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

    While 1
    Switch GUIGetMsg()
    Case -3
    Exit
    Case $hMainCreate
    $sSave = FileSaveDialog("EmptyDllCreator", "", "Dynamic Link Libary (*.dll)", 18, "", $hMainGui)
    If @error Then ContinueLoop

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

    If StringRight($sSave, 4) <> ".dll" Then $sSave &= ".dll"

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

    $hFile = FileOpen($sSave, 18) ;Binary mode + Write mode (Erease old Content)
    FileWrite($hFile, $bEmptyDll)
    FileClose($hFile)
    Exit
    EndSwitch
    WEnd
    ;Ende

    [/autoit]
  • Progressbar für FileCopy

    • RR04
    • 14. Januar 2013 um 06:03

    Hi, hier habe ich gerade was gefunden. ;)

    _FileCopyProgress

  • [Tutorial] Sauber Programmieren

    • RR04
    • 12. Januar 2013 um 11:37

    @chess

    Spoiler anzeigen
    [autoit]


    ; Example 1

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

    ; Eigentlich ist es OK, viele andere
    ; und auch ich machen es so.
    ; Doch wird hier impliziert,
    ; dass auch Example 2 richtig sein könnte
    ; (habe ich hier schon gesehen).

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

    ; Also besser gleich Example 3 !

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

    While 1
    $iMsg = GUIGetMsg()
    Switch $iMsg
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

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

    ; Example 2
    While 2
    $iMsg = GUIGetMsg()
    Switch $iMsg
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

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

    ; Example 3
    While True ;<<<--- Korrekt!
    $iMsg = GUIGetMsg()
    Switch $iMsg
    Case $GUI_EVENT_CLOSE
    ExitLoop ;<<<--- Korrekt!
    EndSwitch
    WEnd
    ; Ende

    [/autoit]
  • INCLUDE~Beschreibungen

    • RR04
    • 9. Januar 2013 um 20:38

    Hi, Autoit sucht den Registry-Eintrag.
    Das ist aber schon bekannt. ;)

    Spoiler anzeigen
    [autoit]


    #include <ComboConstants.au3>
    #include <Date.au3>
    ;#include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>

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

    GUICreate("My GUI combo") ; will create a dialog boxthat when displayed is centered
    Global $cmb_item = GUICtrlCreateCombo("", 10, 10, 90, 120, $CBS_DROPDOWNLIST); create first item
    GUICtrlSetData(-1, "Autoit|SciTE|OrganizeIncludes", "Autoit"); add other item snd set a new default
    Global $label = GUICtrlCreateLabel(_NowDate(), 150, 10, 90, 20, $SS_SUNKEN)
    GUISetState()
    ; Run the GUI until the dialog is closed
    While True
    $msg = GUIGetMsg()
    Switch $msg
    Case -3 ;$GUI_EVENT_CLOSE
    ExitLoop
    Case $cmb_item
    GUICtrlSetData($label, GUICtrlRead($cmb_item))
    EndSwitch
    WEnd
    ; Ende

    [/autoit]

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™