Hallo inferior,
poste doch einfach das Skript, dann wird es einfacher
mfg (Auto)Bert
Hallo inferior,
poste doch einfach das Skript, dann wird es einfacher
mfg (Auto)Bert
Hallo dtex,
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
Global $sLVdat = @ScriptDir & "\LV_Daten.Dat"
[/autoit] [autoit][/autoit] [autoit]GuiCreate("DKP Manager",300,500,100,100)
$check = 0
$input_name=GUICtrlCreateInput("", 15, 15, 110, 20)
$input_dkp=GUICtrlCreateInput("", 140, 15, 60, 20)
$button_create=GUICtrlCreateButton("Add char", 210, 15, 75, 20)
$liste=GUICtrlCreateListView("Name|DKP", 15, 50, 270, 400,-1, $LVS_EX_FULLROWSELECT)
GUICtrlSendMsg($liste,$LVM_SETCOLUMNWIDTH, 0, 160)
GUICtrlSendMsg($liste,$LVM_SETCOLUMNWIDTH, 1, 110)
$button_delete=GUICtrlCreateButton("Delete character", 15, 465, 270, 20)
[/autoit] [autoit][/autoit] [autoit]GuiSetState()
[/autoit] [autoit][/autoit] [autoit]Global $B_DESCENDING[_GUICtrlListView_GetColumnCount($liste)]
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]While 1
$msg=GuiGetMsg()
If $msg=-3 Then
_saveLV()
Exit
EndIf
If $msg = $button_create then
$check = 0
For $i = 0 To _GUICtrlListView_GetItemCount($liste) - 1
If _GUICtrlListView_GetItemText($liste, $i) = GUICtrlRead($input_name) Then
_GUICtrlListView_SetItemText($liste, $i, GUICtrlRead($input_dkp), 1)
$B_DESCENDING = True
_GUICtrlListView_SimpleSort($liste, $B_DESCENDING, 1)
GUICtrlSetData($input_name, "")
GUICtrlSetData($input_dkp, "")
$check = 1
ExitLoop
EndIf
next
If $check = 0 then
GUICtrlCreateListViewItem(GUICtrlRead($input_name) & "|" & GUICtrlRead($input_dkp), $liste)
$B_DESCENDING = True
_GUICtrlListView_SimpleSort($liste, $B_DESCENDING, 1)
GUICtrlSetData($input_name, "")
GUICtrlSetData($input_dkp, "")
EndIf
endif
If $msg = $button_delete Then
If GUICtrlRead($liste) <> 0 Then
_GUICtrlListView_DeleteItemsSelected($liste)
endif
endif
Wend
Func _saveLV()
Local $sFile, $aItem, $hFileOut
$hFileOut = FileOpen($sLVdat, 2)
For $j = 0 To _GUICtrlListView_GetItemCount($Liste) - 1
$aItem = _GUICtrlListView_GetItemTextString($Liste, $j)
FileWriteLine($hFileOut, $aItem)
Next
FileClose($hFileOut)
EndFunc ;==>_saveLVs
Func _LoadLV()
Local $aItems
If FileExists($sLVdat) Then
$aItems = ""
_FileReadToArray($sLVdat, $aItems)
If IsArray($aItems) Then
For $j = 1 To $aItems[0]
GUICtrlCreateListViewItem($aItems[$j], $Liste)
Next
EndIf
EndIf
EndFunc ;==>_LoadLVs
so sollte es funktionieren, kann es aber im Moment nicht testen
mfg (Auto)Bert
mein problem: er sortiert erst ab der 3ten eingabe und dann imma abwechselnd von groß nach klein und von klein nach groß. er soll aber nur von groß nach klein-.-
need help pls.
Die Sortierrichtung wird bei jedem Aufruf von _GUICtrlListView_SimpleSort umgedreht. Du musst sie also unmittelbar vor dem Aufruf setzen:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
GuiCreate("DKP Manager",300,500,100,100)
[/autoit] [autoit][/autoit] [autoit]$input_name=GUICtrlCreateInput("", 15, 15, 110, 20)
$input_dkp=GUICtrlCreateInput("", 140, 15, 60, 20)
$button_create=GUICtrlCreateButton("Add char", 210, 15, 75, 20)
$liste=GUICtrlCreateListView("Name|DKP", 15, 50, 270, 400,-1, $LVS_EX_FULLROWSELECT)
GUICtrlSendMsg($liste,$LVM_SETCOLUMNWIDTH, 0, 160)
GUICtrlSendMsg($liste,$LVM_SETCOLUMNWIDTH, 1, 110)
$button_delete=GUICtrlCreateButton("Delete character", 15, 465, 270, 20)
[/autoit] [autoit][/autoit] [autoit]GuiSetState()
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]While 1
$msg=GuiGetMsg()
If $msg=-3 Then Exit
If $msg = $button_create then
GUICtrlCreateListViewItem(GUICtrlRead($input_name) & "|" & GUICtrlRead($input_dkp), $liste)
$B_DESCENDING = True
_GUICtrlListView_SimpleSort($liste, $B_DESCENDING, 1)
GUICtrlSetData($input_name, "")
GUICtrlSetData($input_dkp, "")
endif
Wend
mfg (Auto)Bert
ja das meine ich.... das script was du mir gegeben hast, schön und gut, aber z.b$LVS_EX_FULLROWSELECT verstehe ich garnet und deswegen suche ichn tut wo das alles nacheinander erklärt wird...mfgEdit: eig. verstehe ich fast as komplette script net... das is mein problem.
Zitat von Hilfe (Konstanten für erweiterte ListView-Stile)$LVS_EX_FULLROWSELECT 0x00000020 Wenn ein Eintrag markiert ist, werden der Eintrag und all seine Untereinträge hervorgehoben.
das heisst es wird immer die ganze Zeile markiert.
Wenn du eine Funktion nicht kennst/verstehst einfach in Scite auf F1 drücken. Die Beispiele evtl. durcharbeiten, bis du den Sinn und Zweck verstanden hast.
Hier noch einmal das Beispiel von BurakSZ etwas abgeändert und mit Kommentaren versehen:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
Global $iStatus = 0, $bFound, $B_DESCENDING
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]#region ### START Koda GUI section ### Form=
[/autoit] [autoit][/autoit] [autoit]GUICreate("A simple Beispiel", 482, 346, 192, 124)
$idListView = GUICtrlCreateListView("Name|Nummer", 8, 8, 258, 326, -1, $LVS_EX_FULLROWSELECT)
;erstellt eine Listview mit den Spaltenüberschriften
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 100)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 150)
;setzt die Spaltenbreiten
GUICtrlCreateLabel("Name hinzufügen:", 280, 16, 90, 17)
GUICtrlCreateLabel("Name:", 296, 48, 35, 17)
GUICtrlCreateLabel("Nummer:", 296, 80, 46, 17)
$idInput_Name = GUICtrlCreateInput("", 352, 48, 121, 21)
$idInput_Zahl = GUICtrlCreateInput("", 352, 80, 121, 21, BitOR($ES_AUTOHSCROLL, $ES_NUMBER))
GUICtrlSetState(-1, $GUI_DISABLE)
$idButton_Edit = GUICtrlCreateButton("Edit", 376, 112, 75, 25)
$idButton_Delete = GUICtrlCreateButton("Löschen", 276, 140, 75, 25)
GUISetState(@SW_SHOW)
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
;hier wird der Windowsnachrichtencode $WM_Notify der Funktion WM_NOTIFY zugewiesen,
;das heisst jedes mal wenn die Anwendung $WM_NOTIFY sendet, wird die func WM_Notify aufgerufen
#endregion ### END Koda GUI section ###
[/autoit] [autoit][/autoit] [autoit]While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $idButton_Edit
If $iStatus = 0 Then
GUICtrlSetState($idInput_Zahl, $GUI_ENABLE)
$iStatus = 1
Else
If GUICtrlRead($idInput_Name) = "" Or GUICtrlRead($idInput_Name) = "" Then
MsgBox(0, "Fehler", "Bitte korigieren Sie ihre Eingaben")
Else
GUICtrlSetState($idInput_Zahl, $GUI_DISABLE)
$bFound = False
;mit nicht gefunden vorbelegen
For $i = 0 To _GUICtrlListView_GetItemCount($idListView) - 1
;schleife läuft von 0 bis zur Anzahl der Listviewzeilen -1 (da bei 0 angefangen wird zu zählen)
If _GUICtrlListView_GetItemText($idListView, $i) = GUICtrlRead($idInput_Name) Then ;überprüft ob der Name der aktuelle Zeile mit dem Input übereinstimmt
;ja Eintrag besteht bereits
$bFound = True
$iMsg = MsgBox(262144 + 4, "Fehler", "Der angegebene Name besteht bereits. Wollen Sie '" & GUICtrlRead($idInput_Name) & "' den neuen Wert '" & GUICtrlRead($idInput_Zahl) & "' zuweisen?")
If $iMsg = 6 Then _GUICtrlListView_SetItemText($idListView, $i, GUICtrlRead($idInput_Zahl), 1)
;Anwender will neuen Wert zuweisen also zuweisen
ExitLoop
;es muss nicht weiter geprüft werden, da bereist gefunden === > Schleife verlassen
EndIf
Next
If Not $bFound Then
;neuer Eintrag
GUICtrlCreateListViewItem(GUICtrlRead($idInput_Name) & "|" & GUICtrlRead($idInput_Zahl), $idListView)
;erzeugt ein neues Listview-Item
EndIf
$B_DESCENDING = False
_GUICtrlListView_SimpleSort($idListView, $B_DESCENDING, 1)
;Listview sortieren
GUICtrlSetData($idInput_Name, "")
GUICtrlSetData($idInput_Zahl, "")
;Eingabefleder leeren
$iStatus = 0
EndIf
EndIf
Case $idButton_Delete
If GUICtrlRead($idListView) <> 0 Then
_GUICtrlListView_DeleteItemsSelected($idListView)
;ausgewählte(s) LV-Items löschem
Else
MsgBox(0, "Fehler", "Es wurde nichts in der ListView markiert.")
EndIf
EndSwitch
WEnd
Func WM_Notify($hWndGUI, $MsgID, $wParam, $lParam)
#forceref $hWndGUI, $MsgID, $wParam
Local $tagNMHDR, $event, $hWndFrom, $code, $aCurrentRow
$tagNMHDR = DllStructCreate("int;int;int", $lParam)
If @error Then Return
$event = DllStructGetData($tagNMHDR, 3)
Select
Case $wParam = $idListView ;prüfen ob die Benacrichtigung vom Listview kommt
Select
Case $event = $NM_CLICK ;es war ein einfacher Klick (eventuel auf Doppelklick (= $NM_DBLCLK) ändern)
If GUICtrlRead($idListView) <> 0 Then
$aCurrentRow = _GUICtrlListView_GetItemTextArray($idListView)
;Inhalt des Items inkl. aller SubItems in Array zwischenspeichern
GUICtrlSetData($idInput_Name, $aCurrentRow[1])
GUICtrlSetData($idInput_Zahl, $aCurrentRow[2])
;Arraywerte zuweisen
GUICtrlSetState($idInput_Zahl, $GUI_ENABLE)
$iStatus = 1
EndIf
EndSelect
EndSelect
$tagNMHDR = 0
$event = 0
$lParam = 0
EndFunc ;==>WM_Notify
mfg (Auto)Bert
Hallo DaisukeHideki,
Dein Skript/Deine Fragestellung sieht verdächtig nach etwas aus, was unseren Forenregeln widerspricht. Falls du denkst, dass der Verdacht unbegründet ist, erkläre bitte genau, wozu das Skript dienen soll. Bis dahin ein allgemeiner Hinweis, schau dir in der Hilfe die Verwendung und Syntax der einzelnen Funktionen an, dann kommst du selbst dahinter,
mfg (Auto)Bert
Hallo DTex,
zum sortieren solltest du noch nach dem Einfügen/Ändern einer Zeile dies einfügen:
[autoit]$B_DESCENDING = False ;evtl. auf true setzen dann wird genau umgedreht sortiert
_GUICtrlListView_SimpleSort($ListView1, $B_DESCENDING, 1)
mfg (Auto)Bert
Hallo hellboy,
wenn du Wert auf die Transparenz legst musst du (leider) mit GuiCtrlDelete arbeiten. Damit sich das Bild für die Lautstärke nicht so stark flackert natürlich nur wenn sich die Lautstärke ändert:
#cs ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]AutoIt Version: 3.3.6.1
Author: myName
Script Function:
Template AutoIt script.
#ce ----------------------------------------------------------------------------
[/autoit] [autoit][/autoit] [autoit]; Script Start - Add your code below here
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <SliderConstants.au3>
Opt('GUIOnEventMode', 1)
[/autoit] [autoit][/autoit] [autoit]Global $pplay = 1
Global $GUI_Width = 300
Global $GUI_Height = 255
Global $iOldVolume = -99
$hGUI = GUICreate("Bug?", $GUI_Width, $GUI_Height, 300, 100, -1);, BitOR($WS_EX_TOOLWINDOW, $WS_EX_WINDOWEDGE,$WS_EX_TOPMOST, $WS_EX_APPWINDOW))
GUISetBkColor(0x800000)
GUISetOnEvent(-3, "_Exit")
$movingLabel = GUICtrlCreateLabel("Bug?", 25, 40, 250, 17)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
GUICtrlSetFont(-1, 11, 800, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x00FF00)
$searchInput = GUICtrlCreateInput("", 20, 190, 170, 20)
$searchButton = GUICtrlCreateButton("Bug?", 195, 190, 50, 20)
$stopbutton = GUICtrlCreatePic(@ScriptDir & "/Daten/stop.BMP", 245, 220, 32, 32)
$pbutton = GUICtrlCreatePic(@ScriptDir & "/Daten/Play.bmp", 205, 220, 32, 32)
GUICtrlSetOnEvent(-1, "_ytplay")
$volumeslider = GUICtrlCreateSlider(10, 223, 150, 25)
GUICtrlSetData($volumeslider, 50)
GUICtrlSetBkColor(-1, 0x800000)
$volumepic = GUICtrlCreatePic(@ScriptDir & "/Daten/Volume_Middler.BMP", 160, 220, 32, 32)
GUISetState(@SW_SHOW)
While Sleep(100)
$iVolume = GUICtrlRead($volumeslider)
If $iOldVolume <> $iVolume Then
GUICtrlDelete($volumepic)
If $iVolume = 0 Then
$volumepic = GUICtrlCreatePic(@ScriptDir & "/Daten/Mute.BMP", 160, 220, 32, 32)
ElseIf $iVolume < 40 Then
$volumepic = GUICtrlCreatePic(@ScriptDir & "/Daten/Volume_Lowr.BMP", 160, 220, 32, 32)
ElseIf $iVolume < 70 Then
$volumepic = GUICtrlCreatePic(@ScriptDir & "/Daten/Volume_Middler.BMP", 160, 220, 32, 32)
ElseIf $iVolume > 70 Then
$volumepic = GUICtrlCreatePic(@ScriptDir & "/Daten/Volume_Highr.BMP", 160, 220, 32, 32)
EndIf
$iOldVolume = $iVolume
EndIf
WEnd
Func _Exit()
Exit
EndFunc ;==>_Exit
Func _ytplay()
GUICtrlDelete($pbutton)
If $pplay = 1 Then
$pbutton = GUICtrlCreatePic(@ScriptDir & "/Daten/Pause.BMP", 205, 220, 32, 32)
$pplay = 0
Else
$pbutton = GUICtrlCreatePic(@ScriptDir & "/Daten/Play.BMP", 205, 220, 32, 32)
$pplay = 1
EndIf
GUICtrlSetOnEvent($pbutton, "_ytplay")
EndFunc ;==>_ytplay
leider nur ein Workaround, vielleicht kannst du es ja auch noch mit anderen Bildformaten testen,
mfg (Auto)Bert
Hallo hellboy,
wandle die bmp 's in jpg' s dann tritt der Fehler nicht mehr auf.
mfg (Auto)Bert
Hallo MasterOfTime,
schön, dann ist dein Problem ja gelöst, schön wäre es allerdings auch wenn du den Thread auf abgeschlossen setzt. Einfach 1. Beitrag bearbeiten, Präfix (nähe Überschrift) ändern und speichern (absenden)
mfg (Auto)Bert
GUICtrlSetState($Button10, $GUI_DEFBUTTON)
[/autoit]Hallo BurakSZ,
wenn du GuiRegisterMsg nach GuiSetState definierst klappt es:
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Beispiel 2 ListView's", 266, 322)
GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
$ListView1 = GUICtrlCreateListView("Beispiel", 8, 8, 250, 150, -1, $LVS_EX_FULLROWSELECT) ; Ich habe einfach dieselben Parameter wie bei meinem Main-Skript gewählt, bei einer Spalte bring ja FULLROWSELECT nicht wirklich etwas^^
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 246)
GUICtrlCreateListViewItem("Beim Klick leere MsgBox", -1)
$ListView2 = GUICtrlCreateListView("Beispiel 2", 8, 168, 250, 150, -1, $LVS_EX_FULLROWSELECT) ;ebenso
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 246)
GUICtrlCreateListViewItem("Beim Klick leere MsgBox", -1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")
[/autoit] [autoit][/autoit] [autoit]While 1
Sleep(100)
WEnd
Func _Exit()
GUIDelete()
Exit
EndFunc
Func WM_NOTIFY($hWndGUI, $MsgID, $wParam, $lParam)
#forceref $hWndGUI, $MsgID, $wParam
Local $tagNMHDR, $event, $hWndFrom, $code, $aCurrent, $aCurrentName, $sAttrib, $iSize, $aTime, $iVersion, $aAmounts
$tagNMHDR = DllStructCreate("int;int;int", $lParam)
If @error Then Return
$event = DllStructGetData($tagNMHDR, 3)
Select
Case $wParam = $ListView1
Select
Case $event = $NM_CLICK
If GUICtrlRead($ListView2) <> 0 Then MsgBox(0, "", "")
EndSelect
Case $wParam = $ListView2 ; Gibt Error: Variable used without being declared.
Select
Case $event = $NM_CLICK
If GUICtrlRead($ListView2) <> 0 Then MsgBox(0, "", "")
EndSelect
EndSelect
$tagNMHDR = 0
$event = 0
$lParam = 0
EndFunc ;==>_WM_Notify_Events
mfg (Auto)Bert
wiso verliere ich die übersicht?
ich will einfach möglichst schnell eine antwort wenn du etwas nicht hinbekommst gibst du dann immer gleich auf und findest dich damit ab?
das ist zumindest nicht so mein ding
dann lies endlich den Post von Andy (link folgen). Da hast du eine Schritt für Schritt Anleitung,
mfg (Auto)Bert
Hallo BurakSZ,
ich verstehe den Sinn zwar nicht, hier aber eine ganz einfache Lösung:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiScroll.au3>
Dim $idRadio2[100]
#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 441, 441, 508, 269)
$Group1 = GUICtrlCreateGroup("Group1", 10, 10, 200, 200)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group4 = GUICtrlCreateGroup("Group4", 220, 220, 200, 200)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Group2", 220, 10, 200, 200)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$hGroup2 = GUICreate("", 170, 170, 235, 25, BitOR($WS_POPUP, $WS_GROUP, $WS_VSCROLL, $WS_CLIPSIBLINGS), $WS_EX_MDICHILD, $Form1)
For $i = 0 To 99
$idRadio2[$i] = GUICtrlCreateRadio("Radio " & $i, 5, $i * 25, 60, 18)
Next
GUISetState(@SW_SHOW)
GUISwitch($Form1)
$Group3 = GUICtrlCreateGroup("Group3", 10, 220, 200, 200)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg(1)
Switch $nMsg[1]
Case $Form1
Switch $nMsg[0]
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
Case $hGroup2
Exit
EndSwitch
WEnd
sobald in die Hilfsgui (mit den Radios) geklickt wird beendet sich das Programm
mfg (Auto)Bert
@ideas2code,
danke für den Tipp, das wede ich mal testen
mfg (Auto)Bert
Hallo stayawayknight,
ich habe selbst einen Web'n'Walk-Stick. Die Verbindungen reissen leider öfters ab. Im Idealfall wechselt der Button-Status von "Trennen" auf "Verbinden"
dies kommt leider nur selten vor, meist zeigt der Stick über eine LED einen Fehler an. Dann hilft nur ausstöpseln, Intelli-Guard (Virenwähter) deaktivieren wieder einstöpseln, registrieren, auf Verbinden klicken und Intelli-Guard (Virenwähter) wieder aktivieren,
mfg (Auto)Bert
Hallo ocelot,
schau dir die Hilfe zu
[autoit]controlcommand
[/autoit]an,
mfg (Auto)Bert
schön, dann ist dein Problem ja gelöst, schön wäre es allerdings auch wenn du den Thread auf gelöst setzt. Einfach 1. Beitrag bearbeiten, Präfix (nähe Überschrift) ändern und speichern (absenden)
mfg (Auto)Bert
_GUICtrlTab_SetCurFocus geht leider auch nicht.Habe mehree andre Befehle versucht, bis jetzt hat keiner gewirkt
_GUICtrlTab_SetCurFocus fubnktioniert es müssen nur die richtigen Parameter angegeben werden:
#include <ButtonConstants.au3>
#Include <GuiTab.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1_1 = GUICreate("Item Editor v1.0 | © by Kyubinoyoko", 636, 450, 274, 217)
$Tab1 = GUICtrlCreateTab(8, 8, 617, 433)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$Main = GUICtrlCreateTabItem("Main")
$Label1 = GUICtrlCreateLabel("Item Editor by Kyubinoyoko", 16, 42, 481, 44)
GUICtrlSetFont(-1, 20, 800, 0, "Comic Sans MS")
GUICtrlSetBkColor(-1, 0xFFFFFF)
$GoTo = GUICtrlCreateGroup("Go To", 16, 89, 593, 345)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$Jump1 = GUICtrlCreateButton("Gehe zu Waffen", 24, 106, 163, 25, $WS_GROUP)
$Jump2 = GUICtrlCreateButton("Gehe zu Schilde", 24, 138, 163, 25, $WS_GROUP)
$Jump3 = GUICtrlCreateButton("Gehe zu Helmets", 24, 170, 163, 25, $WS_GROUP)
$Jump4 = GUICtrlCreateButton("Gehe zu Suits", 24, 202, 163, 25, $WS_GROUP)
$Jump5 = GUICtrlCreateButton("Gehe zu Gaunts", 24, 234, 163, 25, $WS_GROUP)
$Jump6 = GUICtrlCreateButton("Gehe zu Boots", 24, 266, 163, 25, $WS_GROUP)
$Jump7 = GUICtrlCreateButton("Gehe zu Blinkwings", 24, 298, 163, 25, $WS_GROUP)
$Jump8 = GUICtrlCreateButton("Gehe zu Tickets", 24, 330, 163, 25, $WS_GROUP)
$MainRadio2 = GUICtrlCreateRadio("Hoch", 480, 313, 113, 17)
$MainRadio3 = GUICtrlCreateRadio("Normal", 480, 337, 113, 17)
$MainRadio4 = GUICtrlCreateRadio("Niedrig", 480, 361, 113, 17)
$MainGroup3 = GUICtrlCreateGroup("Item Editor Priorität", 448, 289, 137, 105)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TabSheet2 = GUICtrlCreateTabItem("Waffen")
$WaffenGroup = GUICtrlCreateGroup("Allgemein", 16, 33, 305, 217)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$WaffenInput1 = GUICtrlCreateInput("", 24, 73, 121, 22)
$WaffenLabel2 = GUICtrlCreateLabel("Itemname", 24, 57, 50, 17)
$WaffenInput2 = GUICtrlCreateInput("", 24, 121, 121, 22)
$WaffenLabel3 = GUICtrlCreateLabel("Item ID", 24, 105, 38, 17)
$WaffenInput3 = GUICtrlCreateInput("", 24, 169, 121, 22)
$WaffenLabel4 = GUICtrlCreateLabel("Iconname", 24, 153, 51, 17)
$WaffenInput4 = GUICtrlCreateInput("", 176, 73, 121, 22)
$WaffenLabel5 = GUICtrlCreateLabel("Wie oft stackbar?", 176, 57, 88, 17)
$WaffenInput5 = GUICtrlCreateInput("", 176, 169, 121, 22)
$WaffenLabel6 = GUICtrlCreateLabel("Itembeschreibung", 176, 153, 88, 17)
$WaffenInput6 = GUICtrlCreateInput("", 24, 217, 121, 22)
$WaffenLabel7 = GUICtrlCreateLabel("Preis", 24, 201, 82, 17)
$WaffenInput8 = GUICtrlCreateInput("", 176, 217, 121, 22)
$WaffenLabel8 = GUICtrlCreateLabel("benötigte Jobklasse", 176, 201, 98, 17)
$WaffenCombo2 = GUICtrlCreateCombo("", 176, 120, 121, 25)
$WaffenLabelLast = GUICtrlCreateLabel("Bei NPC kaufbar?", 176, 104, 88, 18)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$WaffenButton1 = GUICtrlCreateButton("Item erstellen", 16, 409, 595, 25, $WS_GROUP)
GUICtrlSetFont(-1, 15, 800, 0, "MS Sans Serif")
$TabShield = GUICtrlCreateTabItem("Schilde")
$ShieldGroup = GUICtrlCreateGroup("Allgemein", 16, 33, 305, 217)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$ShieldInput1 = GUICtrlCreateInput("", 24, 73, 121, 22)
$ShieldLabel2 = GUICtrlCreateLabel("Itemname", 24, 57, 50, 17)
$ShieldInput2 = GUICtrlCreateInput("", 24, 121, 121, 22)
$ShieldLabel3 = GUICtrlCreateLabel("Item ID", 24, 105, 38, 17)
$ShieldInput3 = GUICtrlCreateInput("", 24, 169, 121, 22)
$ShieldLabel4 = GUICtrlCreateLabel("Iconname", 24, 153, 51, 17)
$ShieldInput4 = GUICtrlCreateInput("", 176, 73, 121, 22)
$ShieldLabel5 = GUICtrlCreateLabel("Wie oft stackbar?", 176, 57, 88, 17)
$ShieldInput5 = GUICtrlCreateInput("", 176, 169, 121, 22)
$ShieldLabel6 = GUICtrlCreateLabel("Itembeschreibung", 176, 153, 88, 17)
$ShieldInput6 = GUICtrlCreateInput("", 24, 217, 121, 22)
$ShieldLabel7 = GUICtrlCreateLabel("Preis", 24, 201, 82, 17)
$ShieldInput8 = GUICtrlCreateInput("", 176, 217, 121, 22)
$ShieldLabel8 = GUICtrlCreateLabel("benötigte Jobklasse", 176, 201, 98, 17)
$ShieldCombo2 = GUICtrlCreateCombo("", 176, 120, 121, 25)
$ShieldLabelLast = GUICtrlCreateLabel("Bei NPC kaufbar?", 176, 104, 88, 18)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$ShieldButton1 = GUICtrlCreateButton("Item erstellen", 16, 409, 595, 25, $WS_GROUP)
GUICtrlSetFont(-1, 15, 800, 0, "MS Sans Serif")
$TabSheet4 = GUICtrlCreateTabItem("Helmets")
$HelmetGroup = GUICtrlCreateGroup("Allgemein", 16, 33, 305, 217)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$HelmetInput1 = GUICtrlCreateInput("", 24, 73, 121, 22)
$HelmetLabel2 = GUICtrlCreateLabel("Itemname", 24, 57, 50, 17)
$HelmetInput2 = GUICtrlCreateInput("", 24, 121, 121, 22)
$HelmetLabel3 = GUICtrlCreateLabel("Item ID", 24, 105, 38, 17)
$HelmetInput3 = GUICtrlCreateInput("", 24, 169, 121, 22)
$HelmetLabel4 = GUICtrlCreateLabel("Iconname", 24, 153, 51, 17)
$HelmetInput4 = GUICtrlCreateInput("", 176, 73, 121, 22)
$HelmetLabel5 = GUICtrlCreateLabel("Wie oft stackbar?", 176, 57, 88, 17)
$HelmetInput5 = GUICtrlCreateInput("", 176, 169, 121, 22)
$HelmetLabel6 = GUICtrlCreateLabel("Itembeschreibung", 176, 153, 88, 17)
$HelmetInput6 = GUICtrlCreateInput("", 24, 217, 121, 22)
$HelmetLabel7 = GUICtrlCreateLabel("Preis", 24, 201, 82, 17)
$HelmetInput8 = GUICtrlCreateInput("", 176, 217, 121, 22)
$HelmetLabel8 = GUICtrlCreateLabel("benötigte Jobklasse", 176, 201, 98, 17)
$HelmetCombo2 = GUICtrlCreateCombo("", 176, 120, 121, 25)
$HelmetLabelLast = GUICtrlCreateLabel("Bei NPC kaufbar?", 176, 104, 88, 18)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$HelmetButton1 = GUICtrlCreateButton("Item erstellen", 16, 409, 595, 25, $WS_GROUP)
GUICtrlSetFont(-1, 15, 800, 0, "MS Sans Serif")
$TabSheet5 = GUICtrlCreateTabItem("Suits")
$SuitGroup = GUICtrlCreateGroup("Allgemein", 16, 33, 305, 217)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$SuitInput1 = GUICtrlCreateInput("", 24, 73, 121, 22)
$SuitLabel2 = GUICtrlCreateLabel("Itemname", 24, 57, 50, 17)
$SuitInput2 = GUICtrlCreateInput("", 24, 121, 121, 22)
$SuitLabel3 = GUICtrlCreateLabel("Item ID", 24, 105, 38, 17)
$SuitInput3 = GUICtrlCreateInput("", 24, 169, 121, 22)
$SuitLabel4 = GUICtrlCreateLabel("Iconname", 24, 153, 51, 17)
$SuitInput4 = GUICtrlCreateInput("", 176, 73, 121, 22)
$SuitLabel5 = GUICtrlCreateLabel("Wie oft stackbar?", 176, 57, 88, 17)
$SuitInput5 = GUICtrlCreateInput("", 176, 169, 121, 22)
$SuitLabel6 = GUICtrlCreateLabel("Itembeschreibung", 176, 153, 88, 17)
$SuitInput6 = GUICtrlCreateInput("", 24, 217, 121, 22)
$SuitLabel7 = GUICtrlCreateLabel("Preis", 24, 201, 82, 17)
$SuitInput8 = GUICtrlCreateInput("", 176, 217, 121, 22)
$SuitLabel8 = GUICtrlCreateLabel("benötigte Jobklasse", 176, 201, 98, 17)
$SuitCombo2 = GUICtrlCreateCombo("", 176, 120, 121, 25)
$SuitLabelLast = GUICtrlCreateLabel("Bei NPC kaufbar?", 176, 104, 88, 18)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$SuitButton1 = GUICtrlCreateButton("Item erstellen", 16, 409, 595, 25, $WS_GROUP)
GUICtrlSetFont(-1, 15, 800, 0, "MS Sans Serif")
$TabSheet6 = GUICtrlCreateTabItem("Gaunts")
$GauntsGroup = GUICtrlCreateGroup("Allgemein", 16, 33, 305, 217)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$GauntsInput1 = GUICtrlCreateInput("", 24, 73, 121, 22)
$GauntsLabel2 = GUICtrlCreateLabel("Itemname", 24, 57, 50, 17)
$GauntsInput2 = GUICtrlCreateInput("", 24, 121, 121, 22)
$GauntsLabel3 = GUICtrlCreateLabel("Item ID", 24, 105, 38, 17)
$GauntsInput3 = GUICtrlCreateInput("", 24, 169, 121, 22)
$GauntsLabel4 = GUICtrlCreateLabel("Iconname", 24, 153, 51, 17)
$GauntsInput4 = GUICtrlCreateInput("", 176, 73, 121, 22)
$GauntsLabel5 = GUICtrlCreateLabel("Wie oft stackbar?", 176, 57, 88, 17)
$GauntsInput5 = GUICtrlCreateInput("", 176, 169, 121, 22)
$GauntsLabel6 = GUICtrlCreateLabel("Itembeschreibung", 176, 153, 88, 17)
$GauntsInput6 = GUICtrlCreateInput("", 24, 217, 121, 22)
$GauntsLabel7 = GUICtrlCreateLabel("Preis", 24, 201, 82, 17)
$GauntsInput8 = GUICtrlCreateInput("", 176, 217, 121, 22)
$GauntsLabel8 = GUICtrlCreateLabel("benötigte Jobklasse", 176, 201, 98, 17)
$GauntsCombo2 = GUICtrlCreateCombo("", 176, 120, 121, 25)
$GauntsLabelLast = GUICtrlCreateLabel("Bei NPC kaufbar?", 176, 104, 88, 18)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$GauntsButton1 = GUICtrlCreateButton("Item erstellen", 16, 409, 595, 25, $WS_GROUP)
GUICtrlSetFont(-1, 15, 800, 0, "MS Sans Serif")
$TabSheet7 = GUICtrlCreateTabItem("Boots")
$BootsGroup = GUICtrlCreateGroup("Allgemein", 16, 33, 305, 217)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$BootsInput1 = GUICtrlCreateInput("", 24, 73, 121, 22)
$BootsLabel2 = GUICtrlCreateLabel("Itemname", 24, 57, 50, 17)
$BootsInput2 = GUICtrlCreateInput("", 24, 121, 121, 22)
$BootsLabel3 = GUICtrlCreateLabel("Item ID", 24, 105, 38, 17)
$BootsInput3 = GUICtrlCreateInput("", 24, 169, 121, 22)
$BootsLabel4 = GUICtrlCreateLabel("Iconname", 24, 153, 51, 17)
$BootsInput4 = GUICtrlCreateInput("", 176, 73, 121, 22)
$BootsLabel5 = GUICtrlCreateLabel("Wie oft stackbar?", 176, 57, 88, 17)
$BootsInput5 = GUICtrlCreateInput("", 176, 169, 121, 22)
$BootsLabel6 = GUICtrlCreateLabel("Itembeschreibung", 176, 153, 88, 17)
$BootsInput6 = GUICtrlCreateInput("", 24, 217, 121, 22)
$BootsLabel7 = GUICtrlCreateLabel("Preis", 24, 201, 82, 17)
$BootsInput8 = GUICtrlCreateInput("", 176, 217, 121, 22)
$BootsLabel8 = GUICtrlCreateLabel("benötigte Jobklasse", 176, 201, 98, 17)
$BootsCombo2 = GUICtrlCreateCombo("", 176, 120, 121, 25)
$BootsLabelLast = GUICtrlCreateLabel("Bei NPC kaufbar?", 176, 104, 88, 18)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$BootsButton1 = GUICtrlCreateButton("Item erstellen", 16, 409, 595, 25, $WS_GROUP)
GUICtrlSetFont(-1, 15, 800, 0, "MS Sans Serif")
$TabSheet8 = GUICtrlCreateTabItem("Blinkwings")
$BlinkGroup = GUICtrlCreateGroup("Allgemein", 16, 33, 305, 217)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$BlinkInput1 = GUICtrlCreateInput("", 24, 73, 121, 22)
$BlinkLabel2 = GUICtrlCreateLabel("Itemname", 24, 57, 50, 17)
$BlinkInput2 = GUICtrlCreateInput("", 24, 121, 121, 22)
$BlinkLabel3 = GUICtrlCreateLabel("Item ID", 24, 105, 38, 17)
$BlinkInput3 = GUICtrlCreateInput("", 24, 169, 121, 22)
$BlinkLabel4 = GUICtrlCreateLabel("Iconname", 24, 153, 51, 17)
$BlinkInput4 = GUICtrlCreateInput("", 176, 73, 121, 22)
$BlinkLabel5 = GUICtrlCreateLabel("Wie oft stackbar?", 176, 57, 88, 17)
$BlinkInput5 = GUICtrlCreateInput("", 176, 169, 121, 22)
$BlinkLabel6 = GUICtrlCreateLabel("Itembeschreibung", 176, 153, 88, 17)
$BlinkInput6 = GUICtrlCreateInput("", 24, 217, 121, 22)
$BlinkLabel7 = GUICtrlCreateLabel("Preis", 24, 201, 82, 17)
$BlinkInput8 = GUICtrlCreateInput("", 176, 217, 121, 22)
$BlinkLabel8 = GUICtrlCreateLabel("benötigte Jobklasse", 176, 201, 98, 17)
$BlinkCombo2 = GUICtrlCreateCombo("", 176, 120, 121, 25)
$BlinkLabelLast = GUICtrlCreateLabel("Bei NPC kaufbar?", 176, 104, 88, 18)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$BlinkGroup2 = GUICtrlCreateGroup("Teleport", 344, 33, 273, 217)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$BlinkInput9 = GUICtrlCreateCombo("", 376, 73, 121, 25)
$BlinkInput10 = GUICtrlCreateInput("", 376, 121, 121, 22)
$BlinkInput11 = GUICtrlCreateInput("", 376, 169, 121, 22)
$BlinkInput12 = GUICtrlCreateInput("", 376, 217, 121, 22)
$BlinkLabel9 = GUICtrlCreateLabel("Welt", 376, 57, 26, 17)
$BlinkLabel10 = GUICtrlCreateLabel("X Koordinate", 376, 105, 65, 17)
$BlinkLabel11 = GUICtrlCreateLabel("Y Koordinate", 376, 153, 65, 17)
$BlinkLabel12 = GUICtrlCreateLabel("Z Koordinate", 376, 201, 65, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$BlinkButton1 = GUICtrlCreateButton("Item erstellen", 16, 409, 595, 25, $WS_GROUP)
GUICtrlSetFont(-1, 15, 800, 0, "MS Sans Serif")
$TabSheet9 = GUICtrlCreateTabItem("Tickets")
$TicketGroup = GUICtrlCreateGroup("Allgemein", 16, 33, 305, 217)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$TicketInput1 = GUICtrlCreateInput("", 24, 73, 121, 22)
$TicketLabel2 = GUICtrlCreateLabel("Itemname", 24, 57, 50, 17)
$TicketInput2 = GUICtrlCreateInput("", 24, 121, 121, 22)
$TicketLabel3 = GUICtrlCreateLabel("Item ID", 24, 105, 38, 17)
$TicketInput3 = GUICtrlCreateInput("", 24, 169, 121, 22)
$TicketLabel4 = GUICtrlCreateLabel("Iconname", 24, 153, 51, 17)
$TicketInput4 = GUICtrlCreateInput("", 176, 73, 121, 22)
$TicketLabel5 = GUICtrlCreateLabel("Wie oft stackbar?", 176, 57, 88, 17)
$TicketInput5 = GUICtrlCreateInput("", 176, 169, 121, 22)
$TicketLabel6 = GUICtrlCreateLabel("Itembeschreibung", 176, 153, 88, 17)
$TicketInput6 = GUICtrlCreateInput("", 24, 217, 121, 22)
$TicketLabel7 = GUICtrlCreateLabel("Preis", 24, 201, 82, 17)
$TicketInput8 = GUICtrlCreateInput("", 176, 217, 121, 22)
$TicketLabel8 = GUICtrlCreateLabel("benötigte Jobklasse", 176, 201, 98, 17)
$TicketCombo2 = GUICtrlCreateCombo("", 176, 120, 121, 25)
$TicketLabelLast = GUICtrlCreateLabel("Bei NPC kaufbar?", 176, 104, 88, 18)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TicketGroup2 = GUICtrlCreateGroup("Teleport", 344, 33, 273, 217)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$TicketInput9 = GUICtrlCreateCombo("", 376, 73, 121, 25)
$TicketInput10 = GUICtrlCreateInput("", 376, 121, 121, 22)
$TicketInput11 = GUICtrlCreateInput("", 376, 169, 121, 22)
$TicketInput12 = GUICtrlCreateInput("", 376, 217, 121, 22)
$TicketLabel9 = GUICtrlCreateLabel("Welt", 376, 57, 26, 17)
$TicketLabel10 = GUICtrlCreateLabel("X Koordinate", 376, 105, 65, 17)
$TicketLabel11 = GUICtrlCreateLabel("Y Koordinate", 376, 153, 65, 17)
$TicketLabel12 = GUICtrlCreateLabel("Z Koordinate", 376, 201, 65, 17)
$Last2Ticketlabel = GUICtrlCreateLabel("Dauer des Tickets in Minuten", 224, 312, 142, 18)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
$LastTicketGroup = GUICtrlCreateGroup("Ticketsettings", 112, 280, 401, 105)
GUICtrlSetFont(-1, 8, 400, 0, "Arial")
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$TicketButton1 = GUICtrlCreateButton("Item erstellen", 16, 409, 595, 25, $WS_GROUP)
GUICtrlSetFont(-1, 15, 800, 0, "MS Sans Serif")
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$Msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
Case $msg = $MainRadio2 And BitAND(GUICtrlRead($MainRadio2), $GUI_CHECKED) = $GUI_CHECKED
$Process = WinGetProcess("Item Editor v")
ProcessSetPriority ( $Process, 4)
Case $msg = $MainRadio3 And BitAND(GUICtrlRead($MainRadio3), $GUI_CHECKED) = $GUI_CHECKED
$Process = WinGetProcess("Item Editor v")
ProcessSetPriority ( $Process, 2)
Case $msg = $MainRadio4 And BitAND(GUICtrlRead($MainRadio4), $GUI_CHECKED) = $GUI_CHECKED
$Process = WinGetProcess("Item Editor v")
ProcessSetPriority ( $Process, 0)
case $msg = $Jump1
_GUICtrlTab_SetCurFocus($Tab1, 1)
EndSelect
WEnd
mfg (Auto)Bert
.. meint ihr so?:
[autoit]$test = InetGet("http://www.test.de" , @TempDir & "\test.txt", 1,1)
[/autoit]
sleep(2000)
$inetclose($test)
wenn du es so umänderst funktioniert es auch:
[autoit]$test = InetGet("http://www.test.de" , @TempDir & "\test.txt", 1,1)
sleep(2000)
if InetGetInfo($test,0) = 0 Then inetclose($test)
ich hatte aber eher an so etwas gedacht (Adlibregister vermieden):
#include <Date.au3>
#include <array.au3>
HttpSetUserAgent("Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 GTB6 (.NET CLR 2.0.50727)") ; User-Agent (Header) von AutoIt3 ändern, da beim Webhoster dieser gesperrt ist
[/autoit] [autoit][/autoit] [autoit]Global $nKPerSec, $tDiff, $iToDo, $iRTime, $sMSG
$sUrl = "http://www.autoit.de/index.php?page=Attachment&attachmentID=10230&h=aa527f1f9fc889dabed4de9ca0bebf755a66dd05"
Global $iSize = InetGetSize($sUrl) ;siehe Hilfe zu InetgetSize
If $iSize = 0 Then $iSize = 90000 ;Schätzwert sollte eigentlich nicht vorkommen
$hDownLoad = InetGet($sUrl, @DesktopDir & "\JaYT-DwiMP3-P.exe", 1, 1)
Global $tStart = TimerInit()
Dim $aData[3]
Dim $aKBSec[10]
$start=TimerInit()
Do
Sleep(250)
If $aData[0] > 0 Then
_CalcPerformance($aData[0], $aData[2])
TrayTip("downloading", $sMSG, 10, 16)
Else
if TimerDiff($start) >2000 Then InetClose($hDownLoad)
EndIf
$aData = InetGetInfo($hDownLoad, -1)
Until $aData[2]
$aData = InetGetInfo($hDownLoad, -1)
_CalcPerformance($aData[0], $aData[2])
InetClose($hDownLoad) ; Handle schließen um die Resourcen freizugeben.
MsgBox(0, "", "Bytes gelesen: " & $aData[0] & @CRLF & _
"Größe: " & $aData[1] & @CRLF & _
"beendet?: " & $aData[2] & @CRLF & _
"Erfolgreich?: " & $aData[3] & @CRLF & _
"@error: " & $aData[4] & @CRLF & _
"@extended: " & $aData[5] & @CRLF)
;FileDelete(@ScriptDir & "\Testdownload.htm")
[/autoit] [autoit][/autoit] [autoit]Func _CalcPerformance($iRead, $bDone)
[/autoit] [autoit][/autoit] [autoit]$tDiff = TimerDiff($tStart)
$iToDo = Round(($iSize - $iRead) / 1024, 2)
$nKBPerSec = Round($iRead / $tDiff * 1000 / 1024, 2)
$iPercent = Round($iRead / $iSize * 100, 2)
if ($iSize = 0) And Not $bDone Then
$iRTime = "unbekannt"
Else
$iRTime = Round($iToDo / $nKBPerSec, 0)
EndIf
$sMSG = Round($iRead / 1024) & "/" & Round($iSize / 1024, 0) & " KB " & " = " & $iPercent & "%" & @CRLF
$sMSG &= "durchschnittlich KB/s = " & $nKBPerSec & @CRLF ;& "aktuell: KB/s " & $nKBAct & @CRLF
If Not $bDone Then
$sMSG = $sMSG & "vermutlich zu Ende:" & StringLeft(StringRight(_DateAdd('s', $iRTime, _NowCalc()), 8), 5)
;ConsoleWrite($sMSG & @CRLF)
Else
$sMSG = $sMSG & "benötigte Zeit = " & Round($tDiff / 1000, 0)
EndIf
;if $iSize > 0 Then $sMSG = $sMSG & " sec"
EndFunc ;==>_CalcPerformance
mfg (Auto)Bert
Hallo
schau dir [ gelöst ] Gruppe oder Bereich in GUI scrollen an, da funktionierts
und hier die von mir verwendete GuiScroll.au3
#cs http://www.autoit.de/index.php?page…1092#post161092
Functions:
Scrollbar_Create($hWnd, $iBar, $iMax)
Scrollbar_Scroll($hWnd, $iBar, $iPos)
Scrollbar_GetPos($hWnd, $iBar)
Scrollbar_Step($iStep, $hWnd=0, $iBar=0)
#CE
#Include <GuiScrollBars.au3>
#include<GuiconstantsEx.au3>
#include<WindowsConstants.au3>
#include <ScrollBarConstants.au3>
Global $SCROLL_AMOUNTS[1][3]
$SCROLL_AMOUNTS[0][0] = 1
func Scrollbar_Create($hWnd, $iBar, $iMax)
Local $Size = WinGetClientSize($hWnd)
[/autoit] [autoit][/autoit] [autoit]If $iBar = $SB_HORZ Then
$Size = $Size[0]
ElseIf $iBar = $SB_VERT Then
$Size = $Size[1]
Else
Return 0
EndIf
ReDim $SCROLL_AMOUNTS[UBound($SCROLL_AMOUNTS)+1][3]
$SCROLL_AMOUNTS[UBound($SCROLL_AMOUNTS)-1][0] = $hWnd
$SCROLL_AMOUNTS[UBound($SCROLL_AMOUNTS)-1][1] = $iBar
$SCROLL_AMOUNTS[UBound($SCROLL_AMOUNTS)-1][2] = $SCROLL_AMOUNTS[0][0]
_GUIScrollBars_EnableScrollBar($hWnd, $iBar)
_GUIScrollBars_SetScrollRange($hWnd, $iBar, 0,$iMax-1)
_GUIScrollBars_SetScrollInfoPage($hWnd, $iBar, $Size)
GUIRegisterMsg($WM_VSCROLL, "WM_VSCROLL")
GUIRegisterMsg($WM_HSCROLL, "WM_HSCROLL")
Return $iMax
[/autoit] [autoit][/autoit] [autoit]EndFunc
Func Scrollbar_GetPos($hWnd, $iBar)
Local $tSCROLLINFO = _GUIScrollBars_GetScrollInfoEx($hWnd, $iBar)
[/autoit] [autoit][/autoit] [autoit]Return DllStructGetData($tSCROLLINFO, "nPos")
[/autoit] [autoit][/autoit] [autoit]EndFunc
Func Scrollbar_Scroll($hWnd, $iBar, $iPos)
Local $tSCROLLINFO = _GUIScrollBars_GetScrollInfoEx($hWnd, $iBar)
[/autoit] [autoit][/autoit] [autoit]$iCurrentPos = DllStructGetData($tSCROLLINFO, "nPos")
[/autoit] [autoit][/autoit] [autoit]DllStructSetData($tSCROLLINFO, "nPos", $iPos)
DllStructSetData($tSCROLLINFO, "fMask", $SIF_POS)
_GUIScrollBars_SetScrollInfo($hWnd, $iBar, $tSCROLLINFO)
If $iBar = $SB_VERT Then
[/autoit] [autoit][/autoit] [autoit]$iRound = 0
[/autoit] [autoit][/autoit] [autoit]for $i = 1 to UBound($SCROLL_AMOUNTS)-1
If $SCROLL_AMOUNTS[$i][0] = $hWnd And $SCROLL_AMOUNTS[$i][1] = $SB_VERT Then
$iRound = $SCROLL_AMOUNTS[$i][2]
EndIf
Next
If Not $iRound Then Return 0
[/autoit] [autoit][/autoit] [autoit]_GUIScrollBars_ScrollWindow($hWnd, 0, Round(($iCurrentPos-$iPos)/$iRound)*$iRound)
ElseIf $iBar = $SB_HORZ Then
$iRound = 0
[/autoit] [autoit][/autoit] [autoit]for $i = 1 to UBound($SCROLL_AMOUNTS)-1
If $SCROLL_AMOUNTS[$i][0] = $hWnd And $SCROLL_AMOUNTS[$i][1] = $SB_HORZ Then
$iRound = $SCROLL_AMOUNTS[$i][2]
EndIf
Next
If Not $iRound Then Return 0
[/autoit] [autoit][/autoit] [autoit]_GUIScrollBars_ScrollWindow($hWnd, Round(($iCurrentPos-$iPos)/$iRound)*$iRound, 0)
Else
Return 0
EndIf
Return 1
[/autoit] [autoit][/autoit] [autoit]EndFunc
Func Scrollbar_Step($iStep, $hWnd=0, $iBar=0)
If not $hWnd or Not $iBar Then
[/autoit] [autoit][/autoit] [autoit]$SCROLL_AMOUNTS[0][0] = $iStep
Return 1
EndIf
[/autoit] [autoit][/autoit] [autoit]$iID = 0
[/autoit] [autoit][/autoit] [autoit]for $i = 1 to UBound($SCROLL_AMOUNTS)-1
If $SCROLL_AMOUNTS[$i][0] = $hWnd And $SCROLL_AMOUNTS[$i][1] = $iBar Then
$iID = $i
ExitLoop
EndIf
Next
If Not $iID Then Return 0
[/autoit] [autoit][/autoit] [autoit]$SCROLL_AMOUNTS[$iID][2] = $iStep
[/autoit] [autoit][/autoit] [autoit]Return 1
[/autoit] [autoit][/autoit] [autoit]EndFunc
Func WM_VSCROLL($hWnd, $Msg, $wParam, $lParam)
#forceref $Msg, $wParam, $lParam
Local $nScrollCode = BitAND($wParam, 0x0000FFFF)
Local $index = -1, $yChar, $yPos
Local $Min, $Max, $Page, $Pos, $TrackPos
; Get all the vertial scroll bar information
Local $tSCROLLINFO = _GUIScrollBars_GetScrollInfoEx($hWnd, $SB_VERT)
$Min = DllStructGetData($tSCROLLINFO, "nMin")
$Max = DllStructGetData($tSCROLLINFO, "nMax")
$Page = DllStructGetData($tSCROLLINFO, "nPage")
; Save the position for comparison later on
$yPos = DllStructGetData($tSCROLLINFO, "nPos")
$Pos = $yPos
$TrackPos = DllStructGetData($tSCROLLINFO, "nTrackPos")
$iRound = 0
[/autoit] [autoit][/autoit] [autoit]for $i = 1 to UBound($SCROLL_AMOUNTS)-1
If $SCROLL_AMOUNTS[$i][0] = $hWnd And $SCROLL_AMOUNTS[$i][1] = $SB_VERT Then
$iRound = $SCROLL_AMOUNTS[$i][2]
EndIf
Next
if Not $iRound Then Return $GUI_RUNDEFMSG
[/autoit] [autoit][/autoit] [autoit]Switch $nScrollCode
Case $SB_TOP ; user clicked the HOME keyboard key
DllStructSetData($tSCROLLINFO, "nPos", $Min)
Case $SB_BOTTOM ; user clicked the END keyboard key
DllStructSetData($tSCROLLINFO, "nPos", $Max)
Case $SB_LINEUP ; user clicked the top arrow
DllStructSetData($tSCROLLINFO, "nPos", $Pos - $iRound)
Case $SB_LINEDOWN ; user clicked the bottom arrow
DllStructSetData($tSCROLLINFO, "nPos", $Pos + $iRound)
Case $SB_PAGEUP ; user clicked the scroll bar shaft above the scroll box
DllStructSetData($tSCROLLINFO, "nPos", $Pos - $Page)
Case $SB_PAGEDOWN ; user clicked the scroll bar shaft below the scroll box
DllStructSetData($tSCROLLINFO, "nPos", $Pos + $Page)
Case $SB_THUMBTRACK ; user dragged the scroll box
DllStructSetData($tSCROLLINFO, "nPos", Round($TrackPos/$iRound)*$iRound)
EndSwitch
;~ // Set the position and then retrieve it. Due to adjustments
;~ // by Windows it may not be the same as the value set.
DllStructSetData($tSCROLLINFO, "fMask", $SIF_POS)
_GUIScrollBars_SetScrollInfo($hWnd, $SB_VERT, $tSCROLLINFO)
_GUIScrollBars_GetScrollInfo($hWnd, $SB_VERT, $tSCROLLINFO)
;// If the position has changed, scroll the window and update it
$Pos = DllStructGetData($tSCROLLINFO, "nPos")
If ($Pos <> $yPos) Then
_GUIScrollBars_ScrollWindow($hWnd, 0, $yPos - $Pos)
EndIf
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_VSCROLL
Func WM_HSCROLL($hWnd, $Msg, $wParam, $lParam)
#forceref $Msg, $wParam, $lParam
Local $nScrollCode = BitAND($wParam, 0x0000FFFF)
Local $index = -1, $yChar, $yPos
Local $Min, $Max, $Page, $Pos, $TrackPos
; Get all the vertial scroll bar information
Local $tSCROLLINFO = _GUIScrollBars_GetScrollInfoEx($hWnd, $SB_HORZ)
$Min = DllStructGetData($tSCROLLINFO, "nMin")
$Max = DllStructGetData($tSCROLLINFO, "nMax")
$Page = DllStructGetData($tSCROLLINFO, "nPage")
; Save the position for comparison later on
$yPos = DllStructGetData($tSCROLLINFO, "nPos")
$Pos = $yPos
$TrackPos = DllStructGetData($tSCROLLINFO, "nTrackPos")
$iRound = 0
[/autoit] [autoit][/autoit] [autoit]for $i = 1 to UBound($SCROLL_AMOUNTS)-1
If $SCROLL_AMOUNTS[$i][0] = $hWnd And $SCROLL_AMOUNTS[$i][1] = $SB_HORZ Then
$iRound = $SCROLL_AMOUNTS[$i][2]
EndIf
Next
if Not $iRound Then Return $GUI_RUNDEFMSG
[/autoit] [autoit][/autoit] [autoit]Switch $nScrollCode
Case $SB_TOP ; user clicked the HOME keyboard key
DllStructSetData($tSCROLLINFO, "nPos", $Min)
Case $SB_BOTTOM ; user clicked the END keyboard key
DllStructSetData($tSCROLLINFO, "nPos", $Max)
Case $SB_LINEUP ; user clicked the top arrow
DllStructSetData($tSCROLLINFO, "nPos", $Pos - $iRound)
Case $SB_LINEDOWN ; user clicked the bottom arrow
DllStructSetData($tSCROLLINFO, "nPos", $Pos + $iRound)
Case $SB_PAGEUP ; user clicked the scroll bar shaft above the scroll box
DllStructSetData($tSCROLLINFO, "nPos", $Pos - $Page)
Case $SB_PAGEDOWN ; user clicked the scroll bar shaft below the scroll box
DllStructSetData($tSCROLLINFO, "nPos", $Pos + $Page)
Case $SB_THUMBTRACK ; user dragged the scroll box
DllStructSetData($tSCROLLINFO, "nPos", Round($TrackPos/$iRound)*$iRound)
EndSwitch
;~ // Set the position and then retrieve it. Due to adjustments
;~ // by Windows it may not be the same as the value set.
DllStructSetData($tSCROLLINFO, "fMask", $SIF_POS)
_GUIScrollBars_SetScrollInfo($hWnd, $SB_HORZ, $tSCROLLINFO)
_GUIScrollBars_GetScrollInfo($hWnd, $SB_HORZ, $tSCROLLINFO)
;// If the position has changed, scroll the window and update it
$Pos = DllStructGetData($tSCROLLINFO, "nPos")
If ($Pos <> $yPos) Then
_GUIScrollBars_ScrollWindow($hWnd, $yPos - $Pos, 0)
EndIf
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_HSCROLL
mfg (Auto)Bert