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

Beiträge von lachi

  • Decodieren von \xdc (Ü) in AutoIT

    • lachi
    • 14. September 2015 um 16:53

    Jop läuft! Danke!

  • Decodieren von \xdc (Ü) in AutoIT

    • lachi
    • 14. September 2015 um 15:59

    Moin Leute,

    ich bekomme von einem Python Datei eine Ini Datei erstellt. Diese encoded das Ü als \xdc
    Charbase - Eintrag Ü

    Der Eintrag ist ein längerer String wo ich mir via RegEx mein value raushole. Resultat am Ende \xdcber uns
    Doch hier brauche ich das "Über uns"

    Kodierung der INI: UTF8 ohne BOM

    Mit BinaryToString(StringToBinary($string, 4), 1) komme ich leider nicht weiter.

    Hat spontan jemand eine Idee, was die Lösung ist?
    Note: Es können natürlich auch andere Charakter kommen als Ü
    Danke
    Mit freundlichem Gruß
    lachi

  • Problem mit den IE Functions in Virtualisierter Umgebung

    • lachi
    • 14. September 2015 um 09:21

    Moin moin,

    dein Weg wäre eine Lösung, nur finde ich die leider nicht wirklich schön :/
    Du schriebst, dass Aldi niemals den complete Status erreicht. Ja, anscheinend nicht, aber Aldi ist damit nicht die einzige Seite.
    Hier folgt gleich der Quellcode einer "umfassenden" Website (13 Zeilen inkl. Header) welche das Problem auch hat.
    Es gibt Head, Title, Body, Div, B, code und br.
    Kein Javascript, kein Css, kein irgendetwas.
    Verwende ich diese Seite als Seite 1 (getestet auf unterscheidlichen Webservern), dann kann Seite 2 nicht genutzt werden.

    Vielleicht kannst du das Problem mit der Datei in deiner Umgebung Reproduzieren.

    HTML
    <html>
    	<head>
    		<title>
    			Herzlich Willkommen
    		</title>
    	</head>
    	<body>
    		<div>
                <b>Dies ist eine </b> kurze Testseite.<br>
                Der Qullcode ist h&ouml;chst <code>Komplex</code>!! 
    		</div>
    	</body>
    </html>
    Alles anzeigen
  • Reguläre Ausdrücke Sammlung

    • lachi
    • 11. September 2015 um 14:42

    Hab gerade den Thread gesehen.
    Hier ein kurzer vollständiger IP Pattern ;)

    AutoIt
    Local $s_pattern_ip_filter = "(((25[0-5]|2[0-4]\d|[01]?\d?\d)(\.|\b)){4})"
  • Problem mit den IE Functions in Virtualisierter Umgebung

    • lachi
    • 11. September 2015 um 14:35

    Moin,

    Kanashius: Ich habe es noch mal mit _p(_IENavigate($oIE, $m, 1)) anstelle von _p(_IENavigate($oIE, $m, 0)) getestet. Hier hängt er sich dann aber für lange auf. Bei meiner Methode habe ich wenigstens nach 5 Sekunden den Timeout.

    Runa: Das wäre zu schön gewesen, leider hilft dies auch nicht :(
    Habe zum Test auch sämtliche "==" entfernt, nur bringt es keine Besserung.
    Mein Fehler tritt ja nicht an der Stelle auf. Der Timeout hat die ganze Zeit über hervorragend Funktioniert.

    Hier die letzten Zeilen aus der Console. Ein Stück Quellcode von der Aldi Website ist gekürzt.

    AutoIt: Ausgabe aus der Console
    Timer: 5095.8121 - Readystate: 1 || (Write HTML into Error Log)
    <html xmlns="http://www.w3.org/1999/xhtml"><head>
    	<title>Welcome to ALDI</title>
    [...]
    </body></html>
    Website Test: could not find string: Bing
    +>14:30:11 AutoIt3.exe ended.rc:0
    +>14:30:11 AutoIt3Wrapper Finished.
    >Exit code: 0    Time: 15.52

    Danke euch!

    Mfg lachi

  • Problem mit den IE Functions in Virtualisierter Umgebung

    • lachi
    • 11. September 2015 um 14:20

    Moin,

    ja... hälfte der Informationen vergessen :D
    Hab das Script schon zusammen gekürzt.
    Dieses Script nutze ich um Websiten zu messen. Also wie lange brauch ich um diese zu öffnen.
    Da aber zwischen dem Navigieren und dem fertig geladen noch andere Operation durchgeführt werden (Teilweise) und andererseits die _IELoadWait() Funktion auch Probleme bereitet, nutze ich nicht das warten von _IENavigate().

    Die Seite soll gerendert werden, deswegen kann ich auch kein InetRead verwenden.
    Zum Beispiel auch um weiter zu Navigieren auf der Website.

    Den Readystate lese ich aus, da ich _IENavigate nicht zuverlässig verwenden kann.

    Trotzdem danke für deine Hilfe!
    Mfg

  • Problem mit den IE Functions in Virtualisierter Umgebung

    • lachi
    • 11. September 2015 um 13:36

    Moin moin Leute,

    ich hab da mal ein recht exotisches Problem.
    Vorweg: Dieses Problem tritt bei mir nur in VMs auf, welche in ESXi oder im VMware Player 6.0.4 laufen.
    Reale Hardware und in Virtual Box sind nicht von diesem Fehler betroffen. ||
    OS: Windows 7 (32 und 64bit), Windows 8.1, Windows 10, Windows Server 2012
    Die Sprache macht keinen Unterschied.
    Es ist auch egal ob das System frisch Installiert ist (zuletzt getestet mit Windows 7) oder ob es schon eine Zeit läuft.
    UAC und Sicherheitsoptionen des IE machen ebenfalls keinen Unterschied.
    AutoIT: Getestet mit 3.3.8.1 und 3.3.14.1

    Problem: In dem angehängten Beispielskript wird ein IE gestartet, Maximiert und anschließend zwei Websiten (nacheinander) aufgerufen. Bei dieser Website sucht er nach einem Searchtext -> Gefunden: MsgBox mit Quellcode der Seite | Nicht gefunden: Neuer Schleifendurchlauf bis Timeout (5sek) durch.

    In diesem Beispiel sucht er erst nach USA auf aldi.de, anschließend bei bing.de nach Bing.
    Bing.de wird nicht abgeschlossen. Hier bekomme ich jedesmal den Quellcode von Aldi.de, zusätzlich ist der ReadyStatus auf 1.

    Setz ich Google als erste Seite, dann geht es.
    Zusätzliches Problem:
    Ich kann leider kein _IELoadWait nutzen, weil diese Funktion mehrfach gecrashed ist. Meine Vermutung ist, da er den IE am Ende auch nicht mehr schließt, dass das Objekt vom IE irgendwo/wann im Hintergrund verändert wird.

    Hat hier einer eine Idee, was das Problem sein könnte?
    Lösungsvorschläge?
    Known Bug?
    DAU und es ist ein ganz einfacher Fehler?

    Mal gucken, vielleicht habt ihr eine Idee.
    Danke euch
    Mfg

    &quot;Beispielscript&quot;
    AutoIt: Beispielskript.au3
    #region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_UseX64=n
    #AutoIt3Wrapper_Compression=4
    #AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
    ;~ #AutoIt3Wrapper_Res_requestedExecutionLevel=highesAvailable
    ;~ #AutoIt3Wrapper_Res_requestedExecutionLevel=requireAdministrator
    #endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
    
    
    #include <IE.au3>
    $oIE = _IECreate("about:blank", 0, 1, 0, 1)
    
    
    $temp = WinWait("[CLASS:IEFrame]", "", 30)
    WinActivate($temp)
    
    
    ; Maximize the Internet Explorer window.
    WinSetState($temp, "", @SW_MAXIMIZE)
    
    
    _n("http://www.aldi.de/")
    _IEReady(0, "USA", $oIE, 5)
    
    
    Sleep(4000)
    
    
    _n("www.bing.de")
    _IEReady(0, "Bing", $oIE, 5)
    
    
    _IEQuit($oIE)
    
    
    Func _IEReady($ier_id, $ier_searchtext, $ier_handler, $ier_timeout = 20)
    	Local $ier_current_runtime = TimerInit()
    	Local $ier_time_delta = 0
    
    
    	If Not (IsNumber($ier_timeout) == 1) Then
    		; If the timeout is no number (Integer or Float) set a default value
    		$ier_timeout = 20
    	EndIf
    
    
    	;DEV
    	Local $ie_readystate
    	Do
    		$ie_readystate = _IEPropertyGet($ier_handler, "readystate")
    		$ier_time_delta = TimerDiff($ier_current_runtime)
    		_p(StringFormat("Timer: %s - Readystate: %s", $ier_time_delta, $ie_readystate))
    	Until $ie_readystate >= 1 Or ($ier_time_delta >= $ier_timeout * 1000)
    	;DEV
    
    
    	Local $ier_clipboard = ""
    	Local $ier_fail = True
    	Do
    		$ier_clipboard = ""
    
    
    		; Gets the source code of the website
    		$ier_clipboard = _IEDocReadHTML($ier_handler)
    
    
    		; Gets the readystate of the website
    		$ie_readystate = _IEPropertyGet($ier_handler, "readystate")
    		$ier_time_delta = TimerDiff($ier_current_runtime)
    		_p(StringFormat("Timer: %s - Readystate: %s || (Write HTML into Error Log)", $ier_time_delta, $ie_readystate))
    		_p($ier_clipboard) ;DEV
    
    
    		; Checks if the searchtext is in the source code
    		If StringInStr($ier_clipboard, $ier_searchtext, 0) <> 0 Then
    			; Searchtext is in the Source code. Print a measage (MsgBox)
    			$ier_fail = False
    			_m($ier_clipboard)
    		Else
    			; No match
    			$ier_fail = True
    		EndIf
    
    
    		$ier_time_delta = TimerDiff($ier_current_runtime)
    		Sleep(125) ;DEV
    	Until ($ier_fail == False) Or ($ier_time_delta >= $ier_timeout * 1000)
    	If $ier_fail = False Then
    		; String Found
    		_p(StringFormat("Website Test: String %s found on Website", $ier_searchtext))
    		Return True
    	Else
    		; String not found
    		_p(StringFormat("Website Test: could not find string: %s", $ier_searchtext))
    		Return False
    	EndIf
    EndFunc   ;==>_IEReady
    
    
    Func _p($m)
    	ConsoleWrite($m & @CRLF)
    EndFunc   ;==>_p
    
    
    Func _m($m)
    	MsgBox(0, "", "String Found " & $m)
    EndFunc   ;==>_m
    
    
    Func _n($m)
    	_p(_IENavigate($oIE, $m, 0))
    	Sleep(500)
    EndFunc   ;==>_n
    Alles anzeigen
  • Skript-Zeile richtig ausgeben

    • lachi
    • 11. September 2015 um 12:29

    Probiere folgendes:
    @ScriptLineNumber
    Geht aber nur in uncompilierten Scripten

    Edit: Falsch verstanden...
    Du willst nicht die Zeilennummer

    Du kannst ConsoleWrite()nutzen oder MsgBox()

    Also zb ConsoleWrite(StringFormat("%s: $y = %s \r\n", @ScriptLineNumber, $y)) 

  • Filterbare Dropdowns

    • lachi
    • 2. Dezember 2013 um 11:58

    Guten Tag,

    ich möchte hier meine Filterbaren Dropdowns vorstellen und gleichzeitig nach Feedback fragen.
    Sie laufen noch nicht ganz flüssig, nur finde ich den Fehler leider nicht.

    Was bringt der Code?
    Über ein Array werden die Werte in die Dropdowns gegeben.
    Diese können dann einfach mit einer Eingabe gefiltert werden.
    Dies geschieht Sofort ab der ersten Eingabe.
    Wenn das Feld wieder geleert wird, dann wird auch der Filter zurückgesetzt.
    Sobald man in eines der Felder schreibt, wird der Dropdown auch Automatisch geöffnet.
    Verlässt man das Feld, schließt sich der Dropdown auch wieder.

    Array im Beispiel:
    Hallo (1.2.3)
    Baum (2.3.4)
    Katze (6.6.6)
    Haus (2.2.3)

    Gibt man z.B. ,,H" ein, so erhält man nur noch die Einträge:
    Hallo (1.2.3)
    Haus (2.2.3)

    Gibt man ein ,,2.3" ein, so erhält man
    Hallo (1.2.3)
    Baum (2.3.4)
    Haus (2.2.3)

    Probleme:
    Ab und zu fügt er beim Filter eigene Zeichen ein.
    Dazu noch wollen sich die Zeichen teilweise nicht löschen lassen.
    Hier weiß ich leider (noch) nicht, wo dran das liegt.


    Es ist auch (noch) keine UDF! Kommt vielleicht später.

    &quot;Der Quellcode&quot;
    [autoit]


    #region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_Compression=4
    #AutoIt3Wrapper_UseX64=n
    #endregion ;**** Directives created by AutoIt3Wrapper_GUI ****

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

    #region # Includes and Options
    #include-once
    #include <ComboConstants.au3>
    #include <GuiComboBox.au3>
    #include <GuiComboBoxEx.au3>
    #include <GUIConstantsEx.au3>
    #include <WinAPI.au3>
    #include <WindowsConstants.au3>

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

    ;~ Opt("MustDeclareVars", 1)
    Opt("WinTitleMatchMode", 2) ; Option for the Window find function 1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase
    Opt("TCPTimeout", 100)
    #endregion # Includes and Options

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

    #region # GUI
    ; Create the GUI
    $Form1 = GUICreate("Form1", 400, 300, 192, 124)
    ;~ $Form1 = _PMNewGUI($iGUIWidth, $iGUIHeight, $sGUITitle, $sGUITitle, $WS_POPUP, "", "", True) ; $WS_POPUP -> Without Microsoft Windows border

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

    $h_input_1 = _GUICtrlComboBox_Create($Form1, "", 15, 30, 200, 21, $CBS_DROPDOWN)
    $h_input_2 = _GUICtrlComboBox_Create($Form1, "", 15, 60, 200, 21, $CBS_DROPDOWN)
    $h_input_3 = _GUICtrlComboBox_Create($Form1, "", 15, 90, 200, 21, $CBS_DROPDOWN)

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

    ; Set fonts
    $h_GUI_ZielendpunktComboFont = _WinAPI_CreateFont(12, "", "", "", 800, 0, 0, 0, "", "", "", "", "", "")
    _WinAPI_SetFont($h_input_1, $h_GUI_ZielendpunktComboFont, False)
    _WinAPI_SetFont($h_input_2, $h_GUI_ZielendpunktComboFont, False)
    _WinAPI_SetFont($h_input_3, $h_GUI_ZielendpunktComboFont, False)

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

    Local $a_iwas[5] = ["4", "Hallo (1.2.3)", "Baum (2.3.4)", "Katze (6.6.6)", "Haus (2.2.3)"]

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

    _GUICtrlComboBox_BeginUpdate($h_input_1)
    _GUICtrlComboBox_BeginUpdate($h_input_2)
    _GUICtrlComboBox_BeginUpdate($h_input_3)

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

    For $i = 1 To $a_iwas[0] Step 1
    _GUICtrlComboBox_AddString($h_input_1, $a_iwas[$i])
    _GUICtrlComboBox_AddString($h_input_2, $a_iwas[$i])
    _GUICtrlComboBox_AddString($h_input_3, $a_iwas[$i])
    Next

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

    _GUICtrlComboBox_EndUpdate($h_input_1)
    _GUICtrlComboBox_EndUpdate($h_input_2)
    _GUICtrlComboBox_EndUpdate($h_input_3)

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

    GUISetState(@SW_SHOW)
    #endregion # GUI

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

    #region # programm

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

    ; Register functions
    GUIRegisterMsg($WM_COMMAND, "_Dropdown_Change") ; Filteroption for the Location Dropdowns

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

    Local $wait_loop = 0
    Local $last_code = 0
    Local $last_last_code = 0
    Local $last_last_last_code = 0
    Local $last_hwnd = 0
    Local $last_last_hwnd = 0

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

    While True
    If (($last_hwnd == $last_last_hwnd And (($last_hwnd == $h_input_2 Or $last_hwnd == $h_input_3) Or $last_hwnd == $h_input_1)) Or $wait_loop > 0) Then
    ; $CBN_SETFOCUS = 3
    ; $CBN_SELENDOK = 9
    ; $CBN_CLOSEUP = 8
    ; $CBN_SELENDCANCEL = 10
    ; $CBN_KILLFOCUS = 4
    If ($last_last_last_code == $CBN_SETFOCUS And $last_last_code == $CBN_SELENDOK And $last_code == $CBN_CLOSEUP) Then
    ; Click on the dropdown arrow
    $last_last_last_code = 0
    $last_last_code = 0
    $last_code = 0
    $last_hwnd = 0
    $last_last_hwnd = 0
    If _GUICtrlComboBoxEx_GetDroppedState($h_input_1) = False Then _GUICtrlComboBox_ShowDropDown($last_hwnd, True) ; Focus on Combo 1, open Dropdown
    If _GUICtrlComboBoxEx_GetDroppedState($h_input_2) = False Then _GUICtrlComboBox_ShowDropDown($last_hwnd, True) ; Focus on Combo 1, open Dropdown
    If _GUICtrlComboBoxEx_GetDroppedState($h_input_3) = False Then _GUICtrlComboBox_ShowDropDown($last_hwnd, True) ; Focus on Combo 1, open Dropdown
    ElseIf $last_code == $CBN_SETFOCUS Then
    If $wait_loop == 1 Then
    If _GUICtrlComboBoxEx_GetDroppedState($h_input_1) = False Then _GUICtrlComboBox_ShowDropDown($last_hwnd, True)
    If _GUICtrlComboBoxEx_GetDroppedState($h_input_2) = False Then _GUICtrlComboBox_ShowDropDown($last_hwnd, True)
    If _GUICtrlComboBoxEx_GetDroppedState($h_input_3) = False Then _GUICtrlComboBox_ShowDropDown($last_hwnd, True)
    Else
    $wait_loop = $wait_loop - 1
    EndIf
    EndIf
    EndIf

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

    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    EndSwitch

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

    Sleep(10)
    WEnd

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

    Exit
    #endregion # programm

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

    #region # functions

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

    Func _Dropdown_Change($hWnd, $iMsg, $iwParam, $ilParam)
    #forceref $hWnd, $iMsg
    Local $hWndFrom, $iIDFrom, $iCode
    $hWndFrom = $ilParam
    $iIDFrom = BitAND($iwParam, 0xFFFF) ; Low Word
    $iCode = BitShift($iwParam, 16) ; Hi Word

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

    $last_last_last_code = $last_last_code
    $last_last_code = $last_code
    $last_code = $iCode
    $last_last_hwnd = $last_hwnd
    $last_hwnd = $hWndFrom

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

    If $hWndFrom == $h_input_1 And $iCode == $CBN_EDITCHANGE Then _Edit_Changed($h_input_1) ; Edit in Combo 1
    If $hWndFrom == $h_input_1 And $iCode == $CBN_SETFOCUS Then $wait_loop = 3 ; Set wait loop to 3. Use for display the dropdown 1
    If $hWndFrom == $h_input_1 And $iCode == $CBN_KILLFOCUS Then _GUICtrlComboBox_ShowDropDown($h_input_1, False) ; Kill focus on Combo 1, close Dropdown

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

    If $hWndFrom == $h_input_2 And $iCode == $CBN_EDITCHANGE Then _Edit_Changed($h_input_2) ; Edit in Combo 2
    If $hWndFrom == $h_input_2 And $iCode == $CBN_SETFOCUS Then $wait_loop = 3 ; Set wait loop to 3. Use for display the dropdown 2
    If $hWndFrom == $h_input_2 And $iCode == $CBN_KILLFOCUS Then _GUICtrlComboBox_ShowDropDown($h_input_2, False) ; Kill focus on Combo 2, close Dropdown

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

    If $hWndFrom == $h_input_3 And $iCode == $CBN_EDITCHANGE Then _Edit_Changed($h_input_3) ; Edit in Combo 3
    If $hWndFrom == $h_input_3 And $iCode == $CBN_SETFOCUS Then $wait_loop = 3 ; Set wait loop to 3. Use for display the dropdown 3
    If $hWndFrom == $h_input_3 And $iCode == $CBN_KILLFOCUS Then _GUICtrlComboBox_ShowDropDown($h_input_3, False) ; Kill focus on Combo 3, close Dropdown
    EndFunc ;==>_Dropdown_Change

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

    Func _Edit_Changed($ec_handle)
    $edit_input = _GUICtrlComboBox_GetEditText($ec_handle)

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

    ; If Dropdown is closed, then open it
    If _GUICtrlComboBoxEx_GetDroppedState($ec_handle) = False Then
    _GUICtrlComboBox_ShowDropDown($ec_handle, True)
    _GUICtrlComboBox_SetEditText($ec_handle, $edit_input)
    EndIf

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

    If StringLen($edit_input) >= 3 Then ; Filtering if the String is longer then 3 characters
    Do ; Check if the user enter somethin in the dropdown. Wait until the user is ready.
    Sleep(100)
    $edit_input = _GUICtrlComboBox_GetEditText($ec_handle)
    Until StringTrimRight($edit_input, 1) = StringTrimRight(_GUICtrlComboBox_GetEditText($ec_handle), 1) Or $edit_input = StringTrimRight(_GUICtrlComboBox_GetEditText($ec_handle), 1) Or StringLen(_GUICtrlComboBox_GetEditText($ec_handle)) < 3

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

    ; Reset the content of the dropdown and insert it new
    _GUICtrlComboBox_ResetContent($ec_handle)
    _GUICtrlComboBox_SetEditText($ec_handle, $edit_input)
    For $i = 1 To $a_iwas[0] Step 1
    ; If the search string is in the LocationArray, then add this string to the new dropdown.
    If StringInStr($a_iwas[$i], $edit_input) <> 0 Or $edit_input == "" Then _GUICtrlComboBox_AddString($ec_handle, $a_iwas[$i])
    Next
    Else
    If $edit_input == "" Then
    _GUICtrlComboBox_ResetContent($ec_handle)
    _GUICtrlComboBox_SetEditText($ec_handle, $edit_input)
    For $i = 1 To $a_iwas[0] Step 1
    _GUICtrlComboBox_AddString($ec_handle, $a_iwas[$i])
    Next
    EndIf
    EndIf
    EndFunc ;==>_Edit_Changed

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

    #endregion # functions

    [/autoit]

    Danke schon einmal für Eure Aufmerksamkeit.
    Wenn Ihr Fehler findet, immer her damit.
    Verbesserungsvorschläge sind auch gern gesehen.
    Da kenne ich mich einfach nicht genug mit den Speziellen Funktionen von AutoIT aus ;)

  • Andere Schrift (-größe) für _GUICtrlComboBox_Create

    • lachi
    • 15. Oktober 2013 um 16:52

    Es war ein Versuch die Schriftgröße zu Editieren =D

    Problem ist halt: In der Hilfe steht dazu so gut wie nichts.


    So, jetzt weiß ich aber wie es klappt. Danke für die Hilfe dir.

  • Andere Schrift (-größe) für _GUICtrlComboBox_Create

    • lachi
    • 15. Oktober 2013 um 16:34

    Moin Leute.
    Ich schaffe es irgendwie nicht, dass ich der ComboBox in dem kleinen Tool hier eine andere Schrift bzw eine beliebige Schriftgröße verpassen kann.

    Hat da einer einen Tipp für mich?

    Danke schon mal.

    Die Zeile 16-19 sind meine Versuche gewesen.

    [autoit]


    #include <ComboConstants.au3>
    #include <GuiComboBox.au3>
    #include <GUIConstantsEx.au3>
    #include <WinAPI.au3>
    #include <WindowsConstants.au3>

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

    $Debug_CB = False ; Check ClassName being passed to ComboBox/ComboBoxEx functions, set to True and use a handle to another control to see it work

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

    Global $hCombo

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

    Local $hGUI

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

    ; Create GUI
    $hGUI = GUICreate("(UDF) ComboBox Create", 400, 296)
    $hCombo = _GUICtrlComboBox_Create($hGUI, "", 2, 2, 396, 296)
    ;~ _WinAPI_SetFont($hGUI, "Source Code Pro")
    ;~ _WinAPI_SetFont($hGUI, 1)
    ;~ _WinAPI_SetFont($hCombo, "Source Code Pro")
    ;~ _WinAPI_SetFont($hCombo, 1)
    GUISetState()

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

    _GUICtrlComboBox_BeginUpdate($hCombo)
    For $ii = 0 To 2 Step 1
    For $i = 0 To 255 Step 1
    _GUICtrlComboBox_AddString($hCombo, "EP: " & Random(1000, 9999, 1) & " IP: 1.2." & $ii & "." & $i)
    Next
    Next
    _GUICtrlComboBox_EndUpdate($hCombo)

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

    _WinAPI_SetWindowPos($hCombo, "", 2, 50, 396, 296, "")

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

    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()

    [/autoit]
  • HTTP Download und HTTP Proxy

    • lachi
    • 27. Mai 2013 um 16:53

    Moin,

    ich weiß zwar zurzeit nicht wieso, aber auf einmal läuft der erste Versuch.
    Er geht jetzt über den Proxy, so wie er es soll.

    Trotzdem danke euch

  • Frage zu SciTE 3.2.0

    • lachi
    • 27. Mai 2013 um 14:01

    Moin, ich weiß gerade nicht welche Version ich habe, aber ich kann das Einstellen.
    Mach einfach eine Gespeicherte Datei auf.
    Denn Strg + 1 drücken.
    Denn hast du unter General settings ein Put ,,Keep n BAK version of the edited file"
    Da ne Zeit einstellen und schon haste eine *.au3.1.bak
    BLA. Glaub meinem Vergangenheits Ich nicht.
    Natürlich stellst du damit ein, wieviele Sicherungen er Maximal anlegen soll =D


    ;)

    mfg lachi

  • GUI Tabelle Colspan ähnliches?

    • lachi
    • 6. Mai 2013 um 16:43

    Der Vorteil ist, dass ich so einfach das Array einmal durchbügel, welches eine Variable Anzahl an Einträgen hat.
    Ich muss mir keinen Kopf um Abstände usw machen und kann recht einfach nur Trennstriche ziehen.

    Und da AutoIt ja leider nicht von Haus aus ieine Tabelle Funktion mitbringt habe ich diese genommen.

    Ich hab mal ein Bild angehängt, wie das jetzt zurzeit aussieht.


    Edit:
    AUA!!!
    AUA!!!
    Meine eigene Dummheit schlägt mich!
    AUA!!!

    Ja ich habs schon.
    AUA!!!

    [autoit]


    If StringInStr($aDetailArray[$i], "|") <> 0 Then
    $adetailtemp = StringSplit($aDetailArray[$i], "|")
    GUICtrlCreateLabel($adetailtemp[1],30, (30 + ($i * 16)),120,16)
    GUICtrlCreateLabel($adetailtemp[2],150, (30 + ($i * 16)),120,16)
    Else
    GUICtrlCreateLabel($aDetailArray[$i],30, (30 + ($i * 16)),240,16)
    EndIf

    [/autoit]

    Danke für den Denkanstoß.
    Den hab ich eben gebraucht =D

    Bilder

    • asd.png
      • 9,93 kB
      • 300 × 700
  • GUI Tabelle Colspan ähnliches?

    • lachi
    • 6. Mai 2013 um 16:08

    Moin Leute,

    ich arbeite mit der Table.au3 und brauche jetzt eine Funktion wie colspan.
    Zurzeit geht es auch zwar so, dass er nach 21 Zeichen den Delimiter einfügt, damit er den ganzen String anzeigen kann, aber dabei entsteht, da es keine Raster Schrift ist, leider immer ein Spalt...
    Hat einer einen Tipp oder eine Idee, wie ich einen Colspan Ähnliche Funktion oder wie ich genau diese Zeile Breiter kriege, die ich brauche?

    &quot;Grober Lösung&quot;
    [autoit]


    ConsoleWrite($alarm & @CRLF)
    $sdetail_alert = "Alert: " & $alarm
    ConsoleWrite($sdetail_alert & @CRLF)
    $sdetail_alert = _StringInsert($sdetail_alert,"|",21)
    ConsoleWrite($sdetail_alert & @CRLF)

    [/autoit]
    &quot;Code zum Testen&quot;
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <Table.au3>
    $Form1 = GUICreate("Verdammter Müll krams dings MAN!", 615, 438, 192, 124)
    GUISetState(@SW_SHOW)

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

    $hGUIDetailTable = _GUICtrlTable_Create(30, 30, 120, 16, 10, 2, 0)
    _GUICtrlTable_Set_Text_Row($hGUIDetailTable, 1, "1|2")
    _GUICtrlTable_Set_Text_Row($hGUIDetailTable, 2, "123456789112345678921234567893|123456789112345678921234567893", "|", 1)
    _GUICtrlTable_Set_Text_Row($hGUIDetailTable, 3, "123456789112345678921234567893|123456789112345678921234567893", "|", 0)
    _GUICtrlTable_Set_Text_Row($hGUIDetailTable, 4, "123456789112345678921234567893", "|", 1)
    _GUICtrlTable_Set_Text_Row($hGUIDetailTable, 5, "123456789112345678921234567893|123456789", "|", 0)

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

    _GUICtrlTable_Set_CellColor_Column($hGUIDetailTable, 1, 0xFFFFFF)
    _GUICtrlTable_Set_CellColor_Column($hGUIDetailTable, 2, 0xCCCCCC)

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

    GUISetState(@SW_SHOW)
    StringReplace

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

    _StringInsert
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    EndSwitch
    WEnd

    [/autoit]

    Danke schonmal für euren Hirnschmalz
    mfg

  • Problem mit JavaScript in AutoIT

    • lachi
    • 4. März 2013 um 13:41

    Jops danke.
    Mit eval läufts.

  • Problem mit JavaScript in AutoIT

    • lachi
    • 4. März 2013 um 10:53

    Moin moin Leute,
    ich bräucht mal wieder eine kleine Hilfe von euch.

    Und zwar:
    Ich möchte via JavaScript ein Label ausdrucken lassen auf einem Dymo Drucker.
    Auf diesem Label steht die MAC-Adresse von einem Gerät was ich einscanne und noch 2-3 Sachen mehr, welche über ein GUI eingegeben werden können.

    Das Label usw läuft alles, nur das drucken lassen ist das Problem.
    (HBLabel.exe hatte ich schon probiert, führt aber zu Problemen, falls jemand das noch vorschlagen möchte ;) )

    Hier mal der Ausschnitt vom Code, welcher relevant ist.

    &quot;Der Code &amp; Die Ausgabe&quot;
    [autoit]


    #region JavaScript
    $s_Print_Label_Javascript = _
    "function labelprint()" & @CRLF & _
    "{" & @CRLF & _
    " try" & @CRLF & _
    " {" & @CRLF & _
    " var labelXml = new XMLHttpRequest();" & @CRLF & _
    " labelXml.open('GET', './asdqwe.label');" & @CRLF & _
    " labelXml.onreadystatechange = function() {" & @CRLF & _
    " alert(labelXml.responseText);" & @CRLF & _
    " }" & @CRLF & _
    " labelXml.send();" & @CRLF & _
    " var label = dymo.label.framework.openLabelXml(labelXml.responseText);" & @CRLF & _
    " " & @CRLF & _
    " // set label text" & @CRLF & _
    " //label.setObjectText(' Text', textTextArea.value);" & @CRLF & _
    " " & @CRLF & _
    " // select printer to print on" & @CRLF & _
    " // for simplicity sake just use the first LabelWriter printer" & @CRLF & _
    " var printers = dymo.label.framework.getPrinters();" & @CRLF & _
    " if (printers.length == 0)" & @CRLF & _
    " throw ' No DYMO printers are installed. Install DYMO printers.';" & @CRLF & _
    " " & @CRLF & _
    " var printerName = '';" & @CRLF & _
    " for (var i = 0; i < printers.length; ++i)" & @CRLF & _
    " {" & @CRLF & _
    " var printer = printers[i];" & @CRLF & _
    " if (printer.printerType == ' LabelWriterPrinter')" & @CRLF & _
    " {" & @CRLF & _
    " printerName = printer.name;" & @CRLF & _
    " break;" & @CRLF & _
    " }" & @CRLF & _
    " }" & @CRLF & _
    " " & @CRLF & _
    " if (printerName == '')" & @CRLF & _
    " throw ' No LabelWriter printers found. Install LabelWriter printer';" & @CRLF & _
    " " & @CRLF & _
    " // finally print the label" & @CRLF & _
    " label.print(printerName);" & @CRLF & _
    " }" & @CRLF & _
    " catch(e)" & @CRLF & _
    " {" & @CRLF & _
    " alert(e.message || e);" & @CRLF & _
    " };" & @CRLF & _
    "};"
    #endregion JavaScript

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

    _LabelLog("_PrintLabel()", "Print the Label", False)
    $h_Print_Label_ScrCon = ObjCreate("ScriptControl")
    $h_Print_Label_ScrCon.language = "JScript" ; auch mit "JavaScript" getestet
    $h_Print_Label_ScrCon.addcode($s_Print_Label_Javascript)
    $h_Print_Label_ScrCon.run("labelprint")

    [/autoit]

    Ausgabe:

    [autoit]


    - 10:45:07 OK _PrintLabel() Print the Label
    D:\autoit\a_Fertig\GeNiEnd2End_Label_Tool\label.au3 (568) : ==> The requested action with this object has failed.:
    $h_Print_Label_ScrCon.run("labelprint")
    $h_Print_Label_ScrCon.run("labelprint")^ ERROR
    ->10:45:07 AutoIT3.exe ended.rc:1

    [/autoit]

    Hät da einer einen Plan, wo der Fehler ist?
    Es soll funktionieren, wie in diesem Thread geschrieben wurd.

    AutoIT: Aktuell
    W7x64 SP1
    Script x86 erzwungen

    Danke schonmal für eure Zeit.
    Mfg

  • Welchen E-Mail Anbieter nutzt ihr?

    • lachi
    • 17. Januar 2013 um 12:37

    Hm cool =D
    Vielleicht liegt das daran, dass die Umfrage erweitert wurden ist?
    Aber stimmt, jetzt wo du es sagst fiel mir das auch auf.
    Amüsant, Amüsant =D

  • Wie kommt ihr auf euren Nicknamen?

    • lachi
    • 16. Januar 2013 um 13:41

    Ganz einfach, wie bist du zu deinem Nicknamen gekommen?

    Ich hab ihn seit Die Stämme.
    Brauchte was.
    Nen Kumpel war lachi456.
    Ich nannte mich lachi458, lachi459 usw.
    Kreativ^10 *hust*

    Jetzt hier lachi.

  • Welchen E-Mail Anbieter nutzt ihr?

    • lachi
    • 16. Januar 2013 um 11:07

    Mailserver bei meinem Hoster mit eigener Domain.

    EDIT: Ja ok, Gmail weil von wegen Android usw (eher erzwungen und nicht wirklich genutzt)

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™