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

Beiträge von i2c

  • Grub mit Linux auf einer 2. Festplatte erstellen

    • i2c
    • 6. Dezember 2010 um 20:51

    In der Grub Konsole müsste das in etwa so aussehen:
    Boot Partition wählen

    Code
    root (hd1,x)


    Grub installieren

    Code
    setup (hd1)

    Festplatten sind in Grub 0 basiert, die erste wäre also hd0.

  • Mal wieder ein kleines Logigproblem

    • i2c
    • 6. Dezember 2010 um 18:08

    Wird das hier ein Rekordversuch in Doppelpostings?
    Man kann Beiträge bearbeiten.

  • IniWrite Pfad Problem

    • i2c
    • 6. Dezember 2010 um 12:30
    [autoit]

    FileWrite($IniFile,"")

    [/autoit]
  • String Verarbeitung

    • i2c
    • 6. Dezember 2010 um 12:03
    Spoiler anzeigen
    [autoit]


    #include <array.au3>
    #include <File.au3>
    Dim $aResult[1][2]
    $sFile = @ScriptDir & "\test.txt"

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

    For $i = 2 To _FileCountLines($sFile)
    $sLine = FileReadLine($sFile, $i)
    ConsoleWrite($sLine & @CRLF)
    If StringInStr($sLine, "PC010", 1) And StringInStr($sLine, "Aktiv", 1) Then
    $aTmp = StringSplit($sLine, ";", 1)
    If IsArray($aTmp) And $aTmp[0] = 30 Then
    $iIndex = _ArraySearch($aResult, $aTmp[4], 0, 0, 1, 0, 1, 0)
    If $iIndex = -1 Then
    _Array2DAdd($aResult, $aTmp[4] & "|1")
    ElseIf $iIndex >= 0 Then
    $aResult[$iIndex][1] += 1
    EndIf
    EndIf
    EndIf
    Next

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

    _ArrayDisplay($aResult)

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

    ;------------------------------------------------------------------------------------------------------------
    ;
    ; Function _Array2DAdd(ByRef $avArray, $sValue='')
    ;
    ; Description Redim Array Size and add an Array element at last position
    ; Works with any occurences in 2nd Dimension
    ; Works also with 1D-Array
    ;
    ; Parameter $avArray Given Array
    ; optional $sValue Value of new Element, parts must be seperate with '|'
    ;
    ; Return Succes -1
    ; Failure 0 and set @error
    ; @error = 1 given array is not array
    ; @error = 2 given parts of Element too less/much
    ;
    ; Author BugFix ([email='bugfix@autoit.de'][/email])
    ;------------------------------------------------------------------------------------------------------------
    Func _Array2DAdd(ByRef $avArray, $sValue = '')
    If (Not IsArray($avArray)) Then
    SetError(1)
    Return 0
    EndIf
    Local $i
    Local $UBound2nd = UBound($avArray, 2)
    If @error = 2 Then
    ReDim $avArray[UBound($avArray) + 1]
    $avArray[UBound($avArray) - 1] = $sValue
    Else
    Local $arValue
    ReDim $avArray[UBound($avArray) + 1][$UBound2nd]
    If $sValue = '' Then
    For $i = 0 To $UBound2nd - 2
    $sValue &= '|'
    Next
    EndIf
    $arValue = StringSplit($sValue, '|')
    If $arValue[0] <> $UBound2nd Then
    SetError(2)
    Return 0
    EndIf
    For $i = 0 To $UBound2nd - 1
    $avArray[UBound($avArray) - 1][$i] = $arValue[$i + 1]
    Next
    EndIf
    Return -1
    EndFunc ;==>_Array2DAdd

    [/autoit]
  • ControlMove und float

    • i2c
    • 6. Dezember 2010 um 10:09

    Versteh ich nicht wirklich.

    [autoit]

    $f = 1.8
    ConsoleWrite(Floor($f) & @CRLF)
    ConsoleWrite(Floor($f)+1 & @CRLF)

    [/autoit]
  • ControlMove und float

    • i2c
    • 6. Dezember 2010 um 09:38

    Nein, es gibt nur ganze Pixel.

  • variabe aus webseite (PHP) holen

    • i2c
    • 5. Dezember 2010 um 19:37

    Ok, jetzt hab ich's verstanden. In einer Art Administrationspanel sollen Daten festgelegt werden die dann von den (AutoIt)Clients verarbeitet werden.

    Möglichkeit 1: Das Adminpanel legt die Daten in einer Textdatei ab. Bei mehreren Datensätzen vlt. sogar im INI Format. Die Clients holen sich die Daten dann per InetRead().
    Möglichkeit 2: Das Adminpanel legt die Datensätze in einer Datenbank ab. Ein 2tes PHP-Skript wird von den Clients angesprochen und holt die notwendigen Daten wieder aus der Datenbank und stellt sie zur Verfügung. Bei mehreren Datensätzen kann man hierbei durch Parameter die Ausgabe steuern.

    Eine direkte Verbindung der Clients zum MySQL-Server würde ich vermeiden. Sicherheit ... und so.

  • variabe aus webseite (PHP) holen

    • i2c
    • 5. Dezember 2010 um 19:04

    Ich bin verwirrt. Das dort oben ist kein PHP Quellcode sondern HTML.

    Wohin soll das führen? So wie du es beschreibst, ruft jemand deine Seite auf, trifft eine Auswahl bei den radios und dein AutoIt Skript liest dann aus, was gewählt wurde. Sehr ... komisch. Zumal dein Skript ja nie den Seiteninhalt des Benutzers zu sehen bekommt.

    Zum Thema MySQL und AutoIt: https://autoit.de/index.php?page…ight=mysql+ohne

  • Bilder verkleinern

    • i2c
    • 5. Dezember 2010 um 13:53
    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    #include <WinAPI.au3>

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

    _ImageResize(@DesktopDir & "\Chrysanthemum.jpg", @DesktopDir & "\Chrysanthemum_resized.jpg", @DesktopWidth, @DesktopHeight)

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

    ; #FUNCTION# =========================================================================================
    ; Name...........: _ImageResize
    ; Description....: Resize an image and optionally convert it to the format you want.
    ; Syntax.........: _ImageResize($sInImage, $sOutImage, $iW, $iH)
    ; Parameters ....: $sInImage - Full path to the image to resize / convert.
    ; In types: *.bmp, *.gif, *.ico, *.jpg, *.jpeg, *.png, *.tif, *.tiff
    ; $sOutImage - Full path where to save the resized / converted image.
    ; Out types: *.bmp, *.gif, *.jpg, *.jpeg, *.png, *.tif, *.tiff
    ; $iW - Width to resize image to.
    ; $iH - Height to resize image to.
    ; Return values .: Success - Return 1 and @error 0
    ; Failure - Return 0 and @error 1~5
    ; @error 1 = In File does not exist
    ; @error 2 = In File format not supported
    ; @error 3 = Out File path does not exist
    ; @error 4 = Out file format not supported
    ; @error 5 = Resize Width or Height not an integer
    ; Author ........: smashly
    ; ====================================================================================================
    Func _ImageResize($sInImage, $sOutImage, $iW, $iH)
    Local $sOP, $sOF, $sInExt, $Ext, $hBitmap, $hImage1, $hImage2, $hGraphic, $CLSID, $i = 0
    Local $sType = "BMP|GIF|ICO|JPG|JPEG|PNG|TIF|TIFF"

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

    If Not FileExists($sInImage) Then Return SetError(1, 0, 0)
    $sInExt = StringUpper(StringTrimLeft($sInImage, StringInStr($sInImage, ".", 0, -1)))
    If Not StringRegExp($sInExt, "\A(" & $sType & ")\z", 0) Then Return SetError(2, 0, 0)

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

    ;OutFile path, to use later on.
    $sOP = StringLeft($sOutImage, StringInStr($sOutImage, "\", 0, -1))
    If Not FileExists($sOP) Then Return SetError(3, 0, 0)

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

    ;OutFile name, to use later on.
    $sOF = StringTrimLeft($sOutImage, StringInStr($sOutImage, "\", 0, -1))

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

    ;OutFile extension , to use for the encoder later on.
    $Ext = StringUpper(StringTrimLeft($sOutImage, StringInStr($sOutImage, ".", 0, -1)))
    If Not StringRegExp($Ext, "\A(" & $sType & ")\z", 0) Or $Ext = "ICO" Then Return SetError(4, 0, 0)

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

    If Not IsInt($iW) And Not IsInt($iH) Then Return SetError(5, 0, 0)

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

    ; WinAPI to create blank bitmap at the width and height to put your resized image on.
    $hBitmap = _WinAPI_CreateBitmap($iW, $iH, 1, 32)

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

    ;Start GDIPlus
    _GDIPlus_Startup()

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

    ;Get the handle of blank bitmap you created above as an image
    $hImage1 = _GDIPlus_BitmapCreateFromHBITMAP($hBitmap)

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

    ;Load the image you want to resize.
    $hImage2 = _GDIPlus_ImageLoadFromFile($sInImage)

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

    ;Get the graphic context of the blank bitmap
    $hGraphic = _GDIPlus_ImageGetGraphicsContext($hImage1)

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

    ;Draw the loaded image onto the blank bitmap at the size you want
    _GDIPlus_GraphicsDrawImageRect($hGraphic, $hImage2, 0, 0, $iW, $iH)

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

    ;Get the encoder of to save the resized image in the format you want.
    $CLSID = _GDIPlus_EncodersGetCLSID($Ext)

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

    ;Generate a number for out file that doesn't already exist, so you don't overwrite an existing image.
    Do
    $i += 1
    Until (Not FileExists($sOP & $i & "_" & $sOF))

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

    ;Prefix the number to the begining of the output filename
    $sOutImage = $sOP & $i & "_" & $sOF

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

    ;Save the new resized image.
    _GDIPlus_ImageSaveToFileEx($hImage1, $sOutImage, $CLSID)

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

    ;Clean up and shutdown GDIPlus.
    _GDIPlus_ImageDispose($hImage1)
    _GDIPlus_ImageDispose($hImage2)
    _GDIPlus_GraphicsDispose($hGraphic)
    _WinAPI_DeleteObject($hBitmap)
    _GDIPlus_Shutdown()
    Return SetError(0, 0, 1)
    EndFunc ;==>_ImageResize

    [/autoit]
  • Netzwerk Befehl

    • i2c
    • 5. Dezember 2010 um 12:11

    https://autoit.de/index.php?page=Thread&amp;threadID=11263

  • Happy Birthday Pee und Funkey

    • i2c
    • 4. Dezember 2010 um 13:05

    Externer Inhalt www.youtube.com
    Inhalte von externen Seiten werden ohne deine Zustimmung nicht automatisch geladen und angezeigt.
    Durch die Aktivierung der externen Inhalte erklärst du dich damit einverstanden, dass personenbezogene Daten an Drittplattformen übermittelt werden. Mehr Informationen dazu haben wir in unserer Datenschutzerklärung zur Verfügung gestellt.

    und alles Gute funkey! :party:

  • GUICtrlSetOnEvent() Hilfe Edit: GDIPlus schrift

    • i2c
    • 2. Dezember 2010 um 18:03
    Spoiler anzeigen
    [autoit]

    #include <array.au3>
    #include <GUIConstants.au3>
    Opt("GUIOnEventMode", 1)
    #region - GUI Create
    GUICreate('', 100, 100)
    $button1 = GUICtrlCreateButton("1", 8, 8)
    GUICtrlSetOnEvent(-1, "_run")
    $button2 = GUICtrlCreateButton("2", 8, 40)
    GUICtrlSetOnEvent(-1, "_run")
    GUISetState()
    #endregion - GUI Create

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

    #region - GUI SelectLoop
    While 1
    Sleep(100)
    WEnd
    #endregion - GUI SelectLoop

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

    Func _run()
    Switch @GUI_CtrlId
    Case $button1
    _button(1)
    Case $button2
    _button(2)
    _button2(2)
    EndSwitch
    EndFunc ;==>_run

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

    Func _button($param)
    MsgBox(0, 0, "_button(): ausgelöst von Button " & $param)
    EndFunc ;==>_button

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

    Func _button2($param)
    MsgBox(0, 0, "_button2(): ausgelöst von Button " & $param)
    EndFunc ;==>_button2

    [/autoit]
  • If-Befehl will nicht!

    • i2c
    • 2. Dezember 2010 um 17:19
    &quot;ungetestet&quot;
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    Opt("GUIOnEventMode", 1)
    #Region ### START Koda GUI section ### Form=g:\projekte\tataria\main.kxf
    $Form2 = GUICreate("Form2", 915, 456, 193, 124)
    GUISetOnEvent($GUI_EVENT_CLOSE, "Form2Close")
    $Label1 = GUICtrlCreateLabel("IMEI:", 28, 32, 29, 17)
    $Input1 = GUICtrlCreateInput("", 65, 29, 121, 21, BitOR($ES_AUTOHSCROLL,$ES_NUMBER))
    GUICtrlSetLimit(-1, 15)
    $Label2 = GUICtrlCreateLabel("Modell: ", 18, 63, 41, 17)
    $Input2 = GUICtrlCreateInput("", 66, 60, 121, 21)
    $Label3 = GUICtrlCreateLabel("Name:", 21, 93, 35, 17)
    $Input3 = GUICtrlCreateInput("", 66, 90, 121, 21)
    $Button1 = GUICtrlCreateButton("Suchen", 54, 375, 75, 25, $WS_GROUP)
    GUICtrlSetOnEvent(-1, "Button1Click")
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    Sleep(100) ;Schleife
    WEnd

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

    Func Button1Click() ;Auf Suchen gedrückt

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

    $IMEI = GUICtrlRead($Input1)
    $Modell = GUICtrlRead($Input2)
    $Name = GUICtrlRead($Input3)

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

    If $IMEI <> "" Then;Funktioniert einwandfrei!!!
    $SearchIMEI = IniReadSection("test.txt",$IMEI)
    GUICtrlSetData($Input2,$SearchIMEI[1][1])
    GUICtrlSetData($Input3,$SearchIMEI[2][1])
    ElseIf $Modell <> "" Then;Funktioniert NICHT!
    $SearchModell = IniReadSection("test.txt",$Modell)
    GUICtrlSetData($Input1,$SearchModell[1][1])
    GUICtrlSetData($Input3,$SearchModell[2][1])
    EndIf

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

    EndFunc
    Func Form2Close()
    Exit
    EndFunc

    [/autoit]
  • Combobox: Angezeigter Wert vs. Tatsächlicher Wert

    • i2c
    • 2. Dezember 2010 um 16:48
    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>
    #include <ComboConstants.au3>
    #include <GuiComboBoxEx.au3>
    #region - GUI Create
    GUICreate('', 200, 100)
    $Combo1 = GUICtrlCreateCombo("bla", 8, 8, 100, Default, $CBS_DROPDOWNLIST)
    GUICtrlSetData(-1, "blub|blubber")
    $Button = GUICtrlCreateButton("klick", 8, 35)
    GUISetState()
    #endregion - GUI Create

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

    #region - GUI SelectLoop
    While 1
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
    Exit
    Case $msg = $Button
    $index = _GUICtrlComboBoxEx_GetCurSel(GUICtrlGetHandle($Combo1))
    MsgBox(0, 0, $index)
    EndSelect
    WEnd
    #endregion - GUI SelectLoop

    [/autoit]
  • Inventarliste erstellen MySQL Datenbank

    • i2c
    • 2. Dezember 2010 um 14:24

    Und die Fehlermeldungen lauten?

    Möglicherweise erlaubt 1&1 den Datenbankzugriff nur über localhost, also nicht von aussen.

  • DeskStream

    • i2c
    • 1. Dezember 2010 um 08:43

    _ScreenCapture_Capture() speichert das Bild lokal. ;)

    Code
    _ScreenCapture_Capture([$sFileName = "" [, $iLeft = 0 [, $iTop = 0 [, $iRight = -1 [, $iBottom = -1 [, $fCursor = True]]]]]])
  • Problem mit Koda Plattform Befehl Send mit Inputbox

    • i2c
    • 28. November 2010 um 19:11

    Schau dir mal das Hilfebeispiel zu GUICtrlRead() an.
    Ein Button wäre dann auch ganz praktisch.

  • Ping

    • i2c
    • 28. November 2010 um 15:38

    http://translation.autoit.de/onlinehilfe/functions/Ping.htm

  • Ping

    • i2c
    • 28. November 2010 um 15:24
    [autoit]

    Ping()

    [/autoit]
  • Ueberpruefen ob Prozess reagiert

    • i2c
    • 28. November 2010 um 15:06

    Vlt. lässt sich auch SendMessageTimeout benutzen (fuFlag = SMTO_ABORTIFHUNG)

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™