Hallo freaky,
kannst ja mal probieren es von DoppelKlick auf Klick umzschreiben,
mfg (Auto)Bert
Hallo freaky,
kannst ja mal probieren es von DoppelKlick auf Klick umzschreiben,
mfg (Auto)Bert
hier eine Lösung für Doppelklick:
hast du das Wort Doppelklick gelesen und auch so getestet?
mfg (Auto)Bert
Hallo MrB,
so geht das Laden noch ein paar MilliSec's schneller:
#include <GUIConstantsEx.au3>
#include <GDIPlus.au3>
Global $x, $y
$gui = GUICreate("test", 1100, 900)
$path = @AppDataDir & "\Pics\sysinfo.jpg"
_GetXY($path, $x, $y)
$pic = GUICtrlCreatePic($path, 260, 10, $x, $y)
GUISetState()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
EndSelect
WEnd
Func _getxy($sFile, ByRef $ix, ByRef $iy)
Local $ret = 1
If Not FileExists($sFile) Then Return 0
_GDIPlus_Startup()
$hImage = _GDIPlus_ImageLoadFromFile($sFile)
$ix = _GDIPlus_ImageGetWidth($hImage)
$iy = _GDIPlus_ImageGetHeight($hImage)
_GDIPlus_ImageDispose($hImage)
_GDIPlus_Shutdown()
ConsoleWrite($x & " " & $y & @CRLF)
Return 1
EndFunc ;==>_getxy
mfg (Auto)Bert
Hallo Freaky,
hier eine Lösung für Doppelklick:
#include <GuiListView.au3>
#include <GUIConstantsEx.au3>
#include <Array.au3>
#include <File.au3>
#include <ListViewConstants.au3>
#include <String.au3>
#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <GuiListView.au3>
Global $item[200], $ListViewSel = -1
[/autoit] [autoit][/autoit] [autoit]#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("", 588, 377, 304, 233)
$ListView1 = GUICtrlCreateListView("Interface|Name|Status|Werbung", 0, 0, 586, 318, BitOR($LVS_SHOWSELALWAYS, $LVS_REPORT), BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES))
$Button1 = GUICtrlCreateButton("Start", 0, 320, 83, 25)
$Button2 = GUICtrlCreateButton("Delte", 88, 320, 83, 25)
$Button3 = GUICtrlCreateButton("Make", 176, 320, 83, 25)
$Button4 = GUICtrlCreateButton("Refresh", 264, 320, 83, 25)
$Button5 = GUICtrlCreateButton("", 440, 320, 139, 25)
$Button6 = GUICtrlCreateButton("Interface", 352, 320, 83, 25)
$Input1 = GUICtrlCreateInput("", 112, 352, 417, 21)
GUICtrlSetState(-1, $GUI_DISABLE)
$Combo1 = GUICtrlCreateCombo("First", 8, 352, 97, 25)
GUICtrlSetData(-1, "Second")
GUICtrlSetState(-1, $GUI_DISABLE)
$Button7 = GUICtrlCreateButton("...", 536, 352, 27, 17)
GUICtrlSetState(-1, $GUI_DISABLE)
$ListViewHwnd = GUICtrlGetHandle($ListView1)
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
For $i = 1 To 99
GUICtrlCreateListViewItem("|" & $i & "| aaaaaaaaaaaaaa|" & $i, $ListView1)
Next
GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") ;<=========================================== Bemachrichtigung Doppelklick
;_aktuelisieren()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
#cs
If _GUICtrlListView_GetSelectionMark($ListViewHwnd) <> $ListViewSel Then
_GUICtrlListView_GetSelectionMark($ListViewHwnd), True)
If _GUICtrlListView_GetItemChecked($ListView1, $ListViewSel) Then
$ListViewSel = _GUICtrlListView_GetSelectionMark($ListViewHwnd)
$ruckgabe = _GUICtrlListView_GetItemText($ListViewHwnd, $ListViewSel)
$aItemText = _GUICtrlListView_GetItemTextArray($ListView1, $ListViewSel)
ConsoleWrite($aItemText[2] & " " & $aItemText[3] & @CRLF)
_GUICtrlListView_SetItemSelected($ListView1, -1, False, False)
_GUICtrlListView_SetItemSelected($ListView1, $ListViewSel, True, True)
_GUICtrlListView_EnsureVisible($ListView1, $ListViewSel)
Sleep(Random(250, 750, 1))
EndIf
EndIf
#ce
WEnd
Func WM_NOTIFY($hWnd, $MsgID, $wParam, $lParam) ;<================== Benachrichtigung Doppelklick (Original from Chaoskeks [in ChaosExecution])
Local $tagNMHDR, $event, $hwndFrom, $code
$tagNMHDR = DllStructCreate("int;int;int", $lParam)
If @error Then Return 0
$code = DllStructGetData($tagNMHDR, 3)
If $wParam = $ListView1 Then
;ConsoleWrite($code & @CRLF)
Switch $code
Case -3
$ar = _GUICtrlListView_GetSelectedIndices($ListView1, True)
If $ar[0] > 0 Then
$iSelected = $ar[1]
ConsoleWrite($iSelected & @CRLF)
If _GUICtrlListView_GetItemChecked($ListView1, $iSelected) Then
ConsoleWrite("was selected" & @CRLF)
_GUICtrlListView_SetItemChecked($ListView1,$iSelected, False)
Else
ConsoleWrite("was not selected" & @CRLF)
_GUICtrlListView_SetItemChecked($ListView1,$iSelected, True)
EndIf
EndIf
EndSwitch
EndIf
Return $GUI_RUNDEFMSG
EndFunc ;==>WM_NOTIFY
mfg (Auto)Bert
Hallo Freaky,
genauso, ein Klick auf die Checkbox setzt den Hacken bzw. nimmt in wieder weg, jew nach vorhergehendem Zustand,
mfg (Auto)Bert
Hallo JuraX,
schau dir noch einmal meinen 1. Post an, musste editieren (war online geschrieben ohne zu testen)
mfg (Auto)Bert
Hallo JuraX,
ist doch ganz einfach.
Global $sFile ="DeinDateiPfad.INRP"
...
func SaveLV($sFile)
Local $hFileOut, $aItem
$hFileOut = FileOpen($sFile, 2)
For $j = 0 To _GUICtrlListView_GetItemCount($hListView) - 1
$aItem = _GUICtrlListView_GetItemTextString($hListView, $j)
FileWriteLine($hFileOut, $aItem)
Next
FileClose($hFileOut)
endfunc
func LoadLV($sFile)
Local $aItems
If FileExists($sFile) Then
_FileReadToArray($sFile, $aItems)
If IsArray($aItems) Then
_GUICtrlListView_DeleteAllItems($hlistview)
;_ArrayDisplay($aItems)
For $j = 1 To $aItems[0]
GUICtrlCreateListViewItem($aItems[$j], $hListView)
Next
EndIf
EndIf
endfunc
Edit: Lokale Variablendeklaration in Func's ergänzt
Edit2: DeletAllItems eingefügt
mfg (Auto)Bert
Hallo black_skorbi,
ich habe das Skript nochmals verändert (war leider fehlerhaft):
#include <file.au3>
#include <GUIConstantsEx.au3>
#include <ProgressConstants.au3>
Opt('MustDeclareVars', 1)
[/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]Local $label1, $label2, $progressbar1, $progressbar2, $button, $wait, $s, $msg, $m, $afile, $aData
Local $iSize, $iCount, $iBytesDone, $iFilesDone, $iPercent, $iDown, $bLoadIt
GUICreate("Updater", 220, 140, 100, 200)
$label1 = GUICtrlCreateLabel("Dateien", 10, 8, 200, 16)
$progressbar1 = GUICtrlCreateProgress(10, 25, 200, 20)
GUICtrlSetColor(-1, 32250); not working with Windows XP Style
$label2 = GUICtrlCreateLabel("Bytes", 10, 58, 200, 16)
$progressbar2 = GUICtrlCreateProgress(10, 75, 200, 20, $PBS_SMOOTH)
$button = GUICtrlCreateButton("Be&enden", 75, 115, 70, 20)
GUISetState()
If InetGet("http://mmorpgaming.pytalhost.com/autoit/list.txt", @ScriptDir & "\list.txt", 1) > 0 Then
If _FileReadToArray(@ScriptDir & ".\" & "list.txt", $afile) Then
;Schleife für Gesamtgröße und Anzahl der Files
For $i = 1 To $afile[0]
$aData = StringSplit($afile[$i],"|")
$bLoadIt = False
If Not FileExists(@ScriptDir & "\" & $aData[1]) Then
ConsoleWrite("Not exists yet ")
$bLoadIt = True
Else
if FileGetTime($aData[1]) < $aData[2] Then
$bLoadIt = True
ConsoleWrite("There is a newer File: " & FileGetTime($aData[1]) & " " & $aData[2])
EndIf
EndIf
if $bLoadIt Then
$iSize += InetGetSize("http://mmorpgaming.pytalhost.com/autoit/" & $aData[1], 1)
$iCount += 1
ConsoleWrite("SizeAdd " & $iSize & " " & $iCount &@CRLF)
EndIf
Next
GUICtrlSetData($label1, "0/" & $iCount & " Dateien")
For $i = 1 To $afile[0]
$aData = StringSplit($afile[$i],"|")
$bLoadIt = False
If Not FileExists(@ScriptDir & "\" & $aData[1]) Then
$bLoadIt = True
Else
if FileGetTime($aData[1]) < $aData[2] Then $bLoadIt = True
EndIf
if $bLoadIt Then
$iDown = InetGet("http://mmorpgaming.pytalhost.com/autoit/" & $aData[1], @ScriptDir & "\" & $aData[1], 1)
$iFilesDone += 1
$iPercent = $iFilesDone / $iCount * 100
GUICtrlSetData($progressbar1, $iPercent)
GUICtrlSetData($label1, $iFilesDone & "/" & $iCount & " Dateien")
$iBytesDone += $iDown
$iPercent = $iBytesDone / $iSize * 100
GUICtrlSetData($progressbar2, $iPercent)
GUICtrlSetData($label2, $iBytesDone & "/" & $iSize & " Bytes")
ConsoleWrite("Downloaded " & $aData[1] & @CRLF)
EndIf
Next
EndIf
Else
MsgBox(16, "Fehler", "Updateliste nicht gefunden!")
EndIf
Do
$msg = GUIGetMsg()
if $msg = $button Then Exit
Until $msg = $GUI_EVENT_CLOSE
ich habe es mit einer lokalen list.txt getestet, es funktioniert jetzt mit Datum List.Txt:
mfg (Auto)Bert
danke klapt supper
gerne geschehen, aber stelle bitte den Tread auch auf gelöst,
mfg (Auto)Bert
Hallo,
ich habe das Beispiel mit C:\Programme\AutoIt3\Examples\GUI\sampleAVI.avi getestet, das funktioniert,
Edit: 12 MB sind mir bei Zugang über Web'n'Walk (ca. 12 KB/s) etwas zuviel,
mfg (Auto)Bert
Hallo black_skorbi,
du hast ja das Grundgerüst, kannst es ja mit ein paar Files über das Datum testen. Wenn es klappt einfach die Logik auf Bytes übertragen,
mfg (Auto)Bert
Hallo Freaky,
ja, aber die Checkbox geht (zumindest über Style) afaik nur in 1. Spalte
#include <GUIConstantsEx.au3>
#Include <GuiListView.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 357, 366, 192, 124)
$ListView = GUICtrlCreateListView(" |Hi|Moin|xD", 0, 0, 353, 335, _
BitOR($LVS_SHOWSELALWAYS, $LVS_REPORT), BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_CHECKBOXES)) ;$LVS_SHOWSELALWAYS
; wichtig ist der Stil $LVS_Report und der eweiterte Stil $LVS_EX_Checkboxes
$CheckIt = GUICtrlCreateButton("&Check", 120, 340, 113)
For $i = 1 To 99
GUICtrlCreateListViewItem("|" & $i & "| aaaaaaaaaaaaaa|" & $i, $ListView)
Next
GUISetState(@SW_SHOW)
#endregion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $CheckIt
For $i = 0 To _GUICtrlListView_GetItemCount($ListView) - 1
;Schleifenbeginn da das erste Item den Index 0 hat von 0 bis Anzahl -1
If _GUICtrlListView_GetItemChecked($ListView, $i) Then ; wenn geChecked (angehakt) dann
$aItemText = _GUICtrlListView_GetItemTextArray($ListView, $i)
;Inhalt aller Spalten dieser Zeile dem Array $aItemText zuweisen
;$aItemText[0] enthält die Anzahl der Spalten
;$aItemText[1] Checked oder Unchecked (wir haben aber nur geChecked also keine Auswertung erforderlich)
;$aItemText[2] Hi
;$aItemText[3] Moin
;$aItemText{4]xD
ConsoleWrite($aItemText[2] & " " & $aItemText[3] & @CRLF)
; Zeile markieren, die gerade bearbeitet wird
_GUICtrlListView_SetItemSelected($ListView, -1, False, False) ; Alle entfernen (lt. Hilfe, scheint aber zu togglen)
_GUICtrlListView_SetItemSelected($ListView, $i, True, True) ; Nur den einen setzen (lt. Hilfe, scheint aber zu togglen)
; Automatisch an die Stelle hinscrollen
_GUICtrlListView_EnsureVisible($ListView, $i)
sleep(random(250,750,1)) ;wieder löschen
EndIf
Next
EndSwitch
WEnd
viel Spass damit,
Edit: Einträge auf 99 erhöht, damit der Effekt von _GUICtrlListView_EnsureVisible sichtbar wird
mfg (Auto)Bert
Hallo
das er nur im TXT-EDITOR funktioniert ist doof wie stell ich das ein dass es auch in PPP WORD OPEN OFFICE etc. funktioniert
hört sich so an, als wenn du einen Spass-Virus zum Erschrecken von Lehrer etc. basteln möchtest, also Forenregeln lesen und vorallem beachten,
mfg (Auto)Bert
Hallo
poste doch das Skript, dann kann man nachschauen,
mfg (Auto)Bert
Hallo
der Index ist eine neagtive Zahl von -1 bis Anzahl der Icons *-1.
[-1] 1. Icon
[-2] 2. Icon
[-n] n. Icon
Das Skript sieh dann so aus:
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include-once
;Declares the PIN
_PIN_Win(-1,-1)
Global $_PIN
[/autoit] [autoit][/autoit] [autoit]#Region GUI\Func
Func _PIN_Win($left = -1, $top = -1, $timeout = "")
If Not IsNumber($timeout) And Not $timeout == "" Or $timeout < 0 Then Return SetError(1, 0, 0)
If $left < -1 Or $top < -1 Then Return SetError(1, 0, 0)
Local $btn, $msg, $btn1, $btn2, $btn3, $btn4, $btn5, $btn6, $btn7, $btn8, $btn9, $btn0, $E, $OldCoord, $begin, $activate
$activate = 1
If $timeout == 0 Or $timeout == "" Then $activate = 0
$OldCoord = Opt("GUICoordMode", 0)
[/autoit] [autoit][/autoit] [autoit]$_PIN = "" ;PIN beeing deleted
$begin = TimerInit() ;the timer beeing started
GUICreate("", 138, 182, $left, $top)
;Button1
$btn1 = GUICtrlCreateButton("", -1, -1, 37, 37, 0x0040)
GUICtrlSetImage(-1, @ScriptDir & "\Icons.dll", -2)
;Button2
$btn2 = GUICtrlCreateButton("", 37, -1, 37, 37, 0x0040)
GUICtrlSetImage(-1, @ScriptDir & "\Icons.dll", -3)
;Button3
$btn3 = GUICtrlCreateButton("", 37, -1, 37, 37, 0x0040)
GUICtrlSetImage(-1, @ScriptDir & "\Icons.dll", -4)
;Button4
$btn4 = GUICtrlCreateButton("", -74, 37, 37, 37, 0x0040)
GUICtrlSetImage(-1, @ScriptDir & "\Icons.dll", -5)
;Button5
$btn5 = GUICtrlCreateButton("", 37, -1, 37, 37, 0x0040)
GUICtrlSetImage(-1, @ScriptDir & "\Icons.dll", -6)
;Button6
$btn6 = GUICtrlCreateButton("", 37, -1, 37, 37, 0x0040)
GUICtrlSetImage(-1, @ScriptDir & "\Icons.dll", -7)
;Button7
$btn7 = GUICtrlCreateButton("", -74, 37, 37, 37, 0x0040)
GUICtrlSetImage(-1, @ScriptDir & "\Icons.dll", -8)
;Button8
$btn8 = GUICtrlCreateButton("", 37, -1, 37, 37, 0x0040)
GUICtrlSetImage(-1, @ScriptDir & "\Icons.dll", -9)
;Button9
$btn9 = GUICtrlCreateButton("", 37, -1, 37, 37, 0x0040)
GUICtrlSetImage(-1, @ScriptDir & "\Icons.dll", -10)
;Button0
$E = GUICtrlCreateButton("", -74, 37, 37, 37, 0x0040)
GUICtrlSetImage(-1, @ScriptDir & "\Icons.dll", -0)
;E-Button
$btn0 = GUICtrlCreateButton("", 37, -1, 37, 37, 0x0040)
GUICtrlSetImage(-1, @ScriptDir & "\Icons.dll", -11)
;C-Button (OK-Button)
$btn = GUICtrlCreateButton("", 37, -1, 37, 37, 0x0040)
GUICtrlSetImage(-1, @ScriptDir & "\Icons.dll", -12)
GUISetState()
;Check which buttons are pressed and react proportionally
$msg = 0
While 1
$msg = GUIGetMsg()
If $msg == $GUI_EVENT_CLOSE Then Exit
Select
Case $msg = $btn
ExitLoop
Case $msg = $btn1
$_PIN &= 1
Case $msg = $btn2
$_PIN &= 2
Case $msg = $btn3
$_PIN &= 3
Case $msg = $btn4
$_PIN &= 4
Case $msg = $btn5
$_PIN &= 5
Case $msg = $btn6
$_PIN &= 6
Case $msg = $btn7
$_PIN &= 7
Case $msg = $btn8
$_PIN &= 8
Case $msg = $btn9
$_PIN &= 9
Case $msg = $btn0
$_PIN &= 0
Case $msg = $E
$_PIN = ""
Case $timeout < TimerDiff($begin) And $activate == 1
ExitLoop
EndSelect
WEnd
GUIDelete()
Opt("GUICoordMode", $OldCoord)
EndFunc
#EndRegion GUI/Func
mfg (Auto)Bert
Das kannst du so lösen:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
;Anzeigen
Global $Levelanzeige = "1"
Global $Questanzeige = "0"
Global $Namensanzeige = ""
Global $Goldanzeige = "0"
Global $ExpAnzeige = "0"
Global $BenutzerPic = ""
;Ende Anzeigen
$Exit = TrayCreateItem("Schließen")
$Form1 = GUICreate("Dragonfight *Programmed By Masterakio1995*", 637, 453, 354, 282)
$Tab1 = GUICtrlCreateTab(0, 0, 636, 452)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("Information")
GUICtrlSetState(-1, $GUI_SHOW)
$Label1 = GUICtrlCreateLabel("Benutzterbild", 48, 32, 65, 17)
Global $Pic1 = GUICtrlCreatePic($BenutzerPic, 8, 56, 161, 153, BitOR($SS_NOTIFY, $WS_GROUP))
$Label2 = GUICtrlCreateLabel("Name:", 232, 32, 35, 17)
$Label3 = GUICtrlCreateLabel($Namensanzeige, 184, 56, 140, 20)
$Button1 = GUICtrlCreateButton("Ändern", 328, 56, 57, 25, 0)
$Button2 = GUICtrlCreateButton("Ändern", 48, 216, 83, 25, 0)
$Label4 = GUICtrlCreateLabel("Level:", 472, 32, 33, 17)
$Label5 = GUICtrlCreateLabel($Levelanzeige, 424, 56, 140, 20)
$Label6 = GUICtrlCreateLabel("Gold:", 232, 96, 29, 17)
$Label7 = GUICtrlCreateLabel($Goldanzeige, 184, 120, 140, 20)
$Label8 = GUICtrlCreateLabel("Erfahrungspunkte:", 328, 152, 91, 17)
$Label9 = GUICtrlCreateLabel($ExpAnzeige, 296, 184, 164, 20)
$Label10 = GUICtrlCreateLabel("Anzahl erfolgreicher Quests:", 424, 96, 136, 17)
$Label11 = GUICtrlCreateLabel($Questanzeige, 424, 120, 140, 20)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button2
Global $BenutzerPic = FileOpenDialog("Wähle deine Benutzterbild", @DesktopDir & "\", "(*.jpg)(*.bmp)", 1 + 4)
ConsoleWrite($BenutzerPic & @CRLF)
GUICtrlSetImage($Pic1, $BenutzerPic)
EndSwitch
WEnd
mfg (Auto)Bert
Hallo Baaam,
zu
Hilfe-Download: http://translation.autoit.de/autoitinfo/hil…nd-06_02_10.zip
Edit: Formatierung korrigiert
mfg (Auto)Bert
Hallo masteraki,
erzeuge das Bild-Control so:
[autoit]Global $Pic1 = GUICtrlCreatePic($BenutzerPic, 8, 56, 161, 153, BitOR($SS_NOTIFY, $WS_GROUP))
[/autoit]mfg (Auto)Bert