Jop läuft! Danke!
Beiträge von lachi
-
-
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 -
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.
-
-
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 ConsoleTimer: 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
-
Moin,
ja... hälfte der Informationen vergessen
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 -
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.1Problem: 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"Beispielscript"
AutoIt: Beispielskript.au3
Alles anzeigen#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
-
Probiere folgendes:
@ScriptLineNumber
Geht aber nur in uncompilierten ScriptenEdit: Falsch verstanden...
Du willst nicht die ZeilennummerDu kannst ConsoleWrite()nutzen oder MsgBox()
Also zb ConsoleWrite(StringFormat("%s: $y = %s \r\n", @ScriptLineNumber, $y))
-
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.
"Der Quellcode"
[autoit]
[/autoit] [autoit][/autoit] [autoit]
#region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_UseX64=n
#endregion ;**** Directives created by AutoIt3Wrapper_GUI ****#region # Includes and Options
[/autoit] [autoit][/autoit] [autoit]
#include-once
#include <ComboConstants.au3>
#include <GuiComboBox.au3>
#include <GuiComboBoxEx.au3>
#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>;~ Opt("MustDeclareVars", 1)
[/autoit] [autoit][/autoit] [autoit]
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#region # GUI
[/autoit] [autoit][/autoit] [autoit]
; 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$h_input_1 = _GUICtrlComboBox_Create($Form1, "", 15, 30, 200, 21, $CBS_DROPDOWN)
[/autoit] [autoit][/autoit] [autoit]
$h_input_2 = _GUICtrlComboBox_Create($Form1, "", 15, 60, 200, 21, $CBS_DROPDOWN)
$h_input_3 = _GUICtrlComboBox_Create($Form1, "", 15, 90, 200, 21, $CBS_DROPDOWN); Set fonts
[/autoit] [autoit][/autoit] [autoit]
$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)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)
[/autoit] [autoit][/autoit] [autoit]
_GUICtrlComboBox_BeginUpdate($h_input_2)
_GUICtrlComboBox_BeginUpdate($h_input_3)For $i = 1 To $a_iwas[0] Step 1
[/autoit] [autoit][/autoit] [autoit]
_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_GUICtrlComboBox_EndUpdate($h_input_1)
[/autoit] [autoit][/autoit] [autoit]
_GUICtrlComboBox_EndUpdate($h_input_2)
_GUICtrlComboBox_EndUpdate($h_input_3)GUISetState(@SW_SHOW)
[/autoit] [autoit][/autoit] [autoit]
#endregion # GUI#region # programm
[/autoit] [autoit][/autoit] [autoit]; Register functions
[/autoit] [autoit][/autoit] [autoit]
GUIRegisterMsg($WM_COMMAND, "_Dropdown_Change") ; Filteroption for the Location DropdownsLocal $wait_loop = 0
[/autoit] [autoit][/autoit] [autoit]
Local $last_code = 0
Local $last_last_code = 0
Local $last_last_last_code = 0
Local $last_hwnd = 0
Local $last_last_hwnd = 0While True
[/autoit] [autoit][/autoit] [autoit]
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$nMsg = GUIGetMsg()
[/autoit] [autoit][/autoit] [autoit]
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitEndSwitch
[/autoit] [autoit][/autoit] [autoit]Sleep(10)
[/autoit] [autoit][/autoit] [autoit]
WEndExit
[/autoit] [autoit][/autoit] [autoit]
#endregion # programm#region # functions
[/autoit] [autoit][/autoit] [autoit]Func _Dropdown_Change($hWnd, $iMsg, $iwParam, $ilParam)
[/autoit] [autoit][/autoit] [autoit]
#forceref $hWnd, $iMsg
Local $hWndFrom, $iIDFrom, $iCode
$hWndFrom = $ilParam
$iIDFrom = BitAND($iwParam, 0xFFFF) ; Low Word
$iCode = BitShift($iwParam, 16) ; Hi Word$last_last_last_code = $last_last_code
[/autoit] [autoit][/autoit] [autoit]
$last_last_code = $last_code
$last_code = $iCode
$last_last_hwnd = $last_hwnd
$last_hwnd = $hWndFromIf $hWndFrom == $h_input_1 And $iCode == $CBN_EDITCHANGE Then _Edit_Changed($h_input_1) ; Edit in Combo 1
[/autoit] [autoit][/autoit] [autoit]
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 DropdownIf $hWndFrom == $h_input_2 And $iCode == $CBN_EDITCHANGE Then _Edit_Changed($h_input_2) ; Edit in Combo 2
[/autoit] [autoit][/autoit] [autoit]
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 DropdownIf $hWndFrom == $h_input_3 And $iCode == $CBN_EDITCHANGE Then _Edit_Changed($h_input_3) ; Edit in Combo 3
[/autoit] [autoit][/autoit] [autoit]
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_ChangeFunc _Edit_Changed($ec_handle)
[/autoit] [autoit][/autoit] [autoit]
$edit_input = _GUICtrlComboBox_GetEditText($ec_handle); If Dropdown is closed, then open it
[/autoit] [autoit][/autoit] [autoit]
If _GUICtrlComboBoxEx_GetDroppedState($ec_handle) = False Then
_GUICtrlComboBox_ShowDropDown($ec_handle, True)
_GUICtrlComboBox_SetEditText($ec_handle, $edit_input)
EndIfIf StringLen($edit_input) >= 3 Then ; Filtering if the String is longer then 3 characters
[/autoit] [autoit][/autoit] [autoit]
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; Reset the content of the dropdown and insert it new
[/autoit] [autoit][/autoit] [autoit]
_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#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 -
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.
-
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]
[/autoit][autoit][/autoit][autoit]
#include <ComboConstants.au3>
#include <GuiComboBox.au3>
#include <GUIConstantsEx.au3>
#include <WinAPI.au3>
#include <WindowsConstants.au3>$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
[/autoit][autoit][/autoit][autoit][/autoit][autoit]
$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()_GUICtrlComboBox_BeginUpdate($hCombo)
[/autoit][autoit][/autoit][autoit]
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)_WinAPI_SetWindowPos($hCombo, "", 2, 50, 396, 296, "")
[/autoit][autoit][/autoit][autoit][/autoit][autoit]; Loop until user exits
[/autoit]
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete() -
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
-
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 einstellenund schon haste eine *.au3.1.bak
BLA. Glaub meinem Vergangenheits Ich nicht.
Natürlich stellst du damit ein, wieviele Sicherungen er Maximal anlegen soll =Dmfg lachi
-
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.
[autoit]
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)
EndIfDanke für den Denkanstoß.
Den hab ich eben gebraucht =D -
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?"Grober Lösung"
[autoit]
[/autoit]
ConsoleWrite($alarm & @CRLF)
$sdetail_alert = "Alert: " & $alarm
ConsoleWrite($sdetail_alert & @CRLF)
$sdetail_alert = _StringInsert($sdetail_alert,"|",21)
ConsoleWrite($sdetail_alert & @CRLF)"Code zum Testen"
[autoit]#include <GUIConstantsEx.au3>
[/autoit] [autoit][/autoit] [autoit]
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Table.au3>
$Form1 = GUICreate("Verdammter Müll krams dings MAN!", 615, 438, 192, 124)
GUISetState(@SW_SHOW)$hGUIDetailTable = _GUICtrlTable_Create(30, 30, 120, 16, 10, 2, 0)
[/autoit] [autoit][/autoit] [autoit]
_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)_GUICtrlTable_Set_CellColor_Column($hGUIDetailTable, 1, 0xFFFFFF)
[/autoit] [autoit][/autoit] [autoit]
_GUICtrlTable_Set_CellColor_Column($hGUIDetailTable, 2, 0xCCCCCC)GUISetState(@SW_SHOW)
[/autoit] [autoit][/autoit] [autoit]
StringReplace_StringInsert
[/autoit] [autoit][/autoit] [autoit]
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitEndSwitch
[/autoit]
WEndDanke schonmal für euren Hirnschmalz
mfg -
Jops danke.
Mit eval läufts. -
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.
"Der Code & Die Ausgabe"
[autoit]
[/autoit] [autoit][/autoit] [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_LabelLog("_PrintLabel()", "Print the Label", False)
[/autoit]
$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")Ausgabe:
[autoit]
[/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:1Hät da einer einen Plan, wo der Fehler ist?
Es soll funktionieren, wie in diesem Thread geschrieben wurd.AutoIT: Aktuell
W7x64 SP1
Script x86 erzwungenDanke schonmal für eure Zeit.
Mfg -
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 -
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.
-
Mailserver bei meinem Hoster mit eigener Domain.
EDIT: Ja ok, Gmail weil von wegen Android usw (eher erzwungen und nicht wirklich genutzt)