[Blockierte Grafik: http://img6.imagebanana.com/img/9fllzqrt/controls.png]
Reines Interesse...
Wie kriegt man das eigentlich hin?
Da ich die Bezeichnung für solche Controls nicht kenne, konnte ich nichts dazu finden.
[Blockierte Grafik: http://img6.imagebanana.com/img/9fllzqrt/controls.png]
Reines Interesse...
Wie kriegt man das eigentlich hin?
Da ich die Bezeichnung für solche Controls nicht kenne, konnte ich nichts dazu finden.
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Global $f = True
$Form1 = GUICreate("Form1", 335, 270, -1, -1,$WS_EX_TOOLWINDOW)
$Group1 = GUICtrlCreateGroup("details", 8, 248, 313, 201)
GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)
$Edit1 = GUICtrlCreateEdit("", 16, 272, 297, 169, BitOR($GUI_SS_DEFAULT_EDIT,$ES_READONLY))
GUICtrlSetData(-1, "Edit1")
GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("altes zeug", 8, 48, 313, 121)
GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)
$Edit2 = GUICtrlCreateEdit("", 16, 72, 297, 89, BitOR($ES_READONLY,$WS_VSCROLL))
GUICtrlSetData(-1, StringFormat("-> test"))
GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Label1 = GUICtrlCreateLabel("Testlabel", 8, 16, 319, 20)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)
$Button1 = GUICtrlCreateButton("v v v v details anzeigen v v v v", 8, 216, 313, 17)
GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)
$Button2 = GUICtrlCreateButton("Schließen", 128, 176, 75, 25, $BS_DEFPUSHBUTTON)
GUICtrlSetResizing(-1, $GUI_DOCKTOP+$GUI_DOCKHEIGHT)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE, $Button2
Exit
Case $Button1
Local $size = WinGetPos("[active]")
If $f Then
GUICtrlSetData($Button1, "^ ^ ^ ^ details schließen ^ ^ ^ ^")
For $i = 270 To 490 Step 5
WinMove($Form1, "", $size[0], $size[1], 335, $i) ;490 / 270
Sleep(1)
Next
Else
GUICtrlSetData($Button1, "v v v v details anzeigen v v v v")
For $i = 490 To 270 Step - 5
WinMove($Form1, "", $size[0], $size[1], 335, $i) ;490 / 270
Sleep(1)
Next
EndIf
$f = Not $f
EndSwitch
WEnd
Also ich finds schön...
Die Verwendung des OnEvent-Modes wäre dabei noch angebracht, aber nicht zwingend notwendig.
MsgBox(0, '', @ScriptFullPath)
If $CmdLine[0] <> 0 Then
FileDelete($CmdLine[1])
Else
_Move(@DesktopDir)
EndIf
Func _Move($s_Path)
FileCopy(@ScriptFullPath, $s_Path)
ShellExecute($s_Path & '\' & @ScriptName, @ScriptFullPath)
Exit
EndFunc
So könnte man es auch versuchen...
Mit FileInstall?
Bei mir funktioniert sowohl
[autoit]Send(Chr(216))
[/autoit]als auch
[autoit]Send('{ALT DOWN}{NUMPAD0}{NUMPAD2}{NUMPAD1}{NUMPAD6}{ALT UP}')
[/autoit]in Notepad, Scite und Firefox.
#include <Array.au3>
[/autoit] [autoit][/autoit] [autoit]Global $a_Array[10], $h_ButtonP, $h_ButtonM, $h_List, $s_Read
[/autoit] [autoit][/autoit] [autoit]GUICreate('', 330, 170)
$h_List = GUICtrlCreateList('', 10, 10, 200, 150)
$h_ButtonP = GUICtrlCreateButton('+', 220, 10, 100, 20)
$h_ButtonM = GUICtrlCreateButton('-', 220, 40, 100, 20)
For $i = 0 To UBound($a_Array) - 1
$a_Array[$i] = Random(100, 999, 1)
Next
_ArraySort($a_Array)
For $i = 0 To UBound($a_Array) - 1
GUICtrlSetData($h_List, $a_Array[$i] & '|')
Next
GUISetState(@SW_SHOW)
[/autoit] [autoit][/autoit] [autoit]While True
Switch GUIGetMsg()
Case -3
Exit
Case $h_ButtonP
$s_Read = GUICtrlRead($h_List)
If $s_Read = '' Then
ContinueLoop
Else
For $i = 0 To UBound($a_Array) - 1
If $s_Read = $a_Array[$i] Then
If $i < UBound($a_Array) - 1 Then
MsgBox(64, '+', $a_Array[$i + 1])
Else
MsgBox(16, '=', $a_Array[$i])
EndIf
EndIf
Next
EndIf
Case $h_ButtonM
$s_Read = GUICtrlRead($h_List)
If $s_Read = '' Then
ContinueLoop
Else
For $i = 0 To UBound($a_Array) - 1
If $s_Read = $a_Array[$i] Then
If $i > 0 Then
MsgBox(64, '-', $a_Array[$i - 1])
Else
MsgBox(16, '=', $a_Array[$i])
EndIf
EndIf
Next
EndIf
EndSwitch
WEnd
Das ist mal ein überkompliziertes Beispiel dafür... Einfacher konnte ich es irgendwie nicht darstellen.
Im Grunde brauchst du ja nur eine Zählvariable, die dem derzeit aktiven Element entspricht.
Wird [+] gedrückt, returnst du $a_Array[$i + 1] und bei [-] eben $a_Array[$i - 1].
Die wichtigen Parts im Beispiel zwischen den Zeilen 30-36 und 45-51.
Ja, das klappt natürlich auch. Ist sogar irgendwie sinnvoller.
Und wenn List dann so:
Global $a_Win, $h_GUI, $h_List, $h_Button
$a_Win = WinList()
$h_GUI = GUICreate('', 400, 300)
$h_List = GUICtrlCreateList('', 10, 10, 380, 260)
$h_Button = GUICtrlCreateButton('Mir fällt keine Bezeichnung ein', 10, 270, 380, 20)
For $i = 1 To $a_Win[0][0]
If BitAnd(WinGetState($a_Win[$i][1]), 2) And $a_Win[$i][0] <> '' Then
GUICtrlSetData($h_List, $a_Win[$i][0] & '|')
EndIf
Next
GUISetState(@SW_SHOW, $h_GUI)
[/autoit] [autoit][/autoit] [autoit]While True
Switch GUIGetMsg()
Case -3
Exit
Case $h_Button
MsgBox(0, '', GUICtrlRead($h_List))
EndSwitch
WEnd
Global $v_Input = InputBox('', 'Wie oft soll geklickt werden?')
If (Not IsInt(Number($v_Input))) Or (Number($v_Input) < 1) Then Exit MsgBox(16, 'Error', 'Die Eingabe ist ungültig.')
For $i = 1 To $v_Input
MouseClick('left', 285, 490, 1, 5)
Sleep(10000)
Next
Zeile 2 kann man auch auslassen - würde aber bei falschen Eingaben zu Fehlern führen.
Global $f_Pause = False
HotKeySet('{F3}', '_TogglePause')
HotKeySet('{ESC}', '_Exit')
While True
While Not $f_Pause
MouseClick( "left" , 285, 490 , 1 , 5)
Sleep(10000)
WEnd
WEnd
Func _TogglePause()
$f_Pause = Not $f_Pause
EndFunc
Func _Exit()
Exit
EndFunc
Schau dir mal hier das Beispiel von SEuBo an.
Alles ist erlaubt. Es gibt keine Begrenzungen.
Oder folgendes, wenn du unbedingt bei _IsPressed bleiben willst:
#include <Misc.au3>
[/autoit] [autoit][/autoit] [autoit]Global $h_Gui = GUICreate('')
GUISetState(@SW_SHOW, $h_Gui)
While True
If _IsPressed('0D') And WinActive($h_Gui) Then Exit MsgBox(64, '', '')
; 0D = Enter
WEnd
Ich muss aber zugeben, dass die Methode mit den Accelerators (meistens) besser ist.
Lediglich bei Games würde ich zu _IsPressed tendieren.
Ersetz Zeile 3 bis 8 durch
[autoit]Global $s_String = FileRead ('deine_datei.txt')
[/autoit]Das gehört aber eigentlich zu den Grundkenntnissen...
Wäre das denn richtig ?
Wieso probierst du es denn nicht einfach aus?
So klappt es jedenfalls:
#include <Array.au3>
[/autoit] [autoit][/autoit] [autoit]Global $s_String = '\Daten\Bilder\567890.jpg' & @CRLF & _
'\Daten\Bilder\458425.jpg' & @CRLF & _
'\Daten\Bilder\418458.jpg' & @CRLF & _
'\Daten\Bilder\148548.jpg' & @CRLF & _
'\Daten\Bilder\134899.jpg' & @CRLF & _
'\Daten\Bilder\459458.jpg'
Global $a_Reg = StringRegExp ($s_String, '(\d+)', 3)
_ArrayDisplay ($a_Reg)
Hier ist ein schönes Tutorial von Ubuntu.
Hat mir persönlich wirklich geholfen.
Bei _FTP_FilePut verwendest du den Rückgabewert von _FTP_Open. Du brauchst aber den von _FTP_Connect.
Sonst fällt mir auf die Schnelle nichts auf.
ConsoleWrite (_IsMonday () & @CRLF)
[/autoit][autoit][/autoit][autoit]Func _IsMonday ()
Return (@WDAY = 2) And (@HOUR >= 12) And (@HOUR <= 17)
EndFunc
Etwa so würde ich es machen:
#include <Array.au3>
Global $s_String = 'Effects present letters inquiry no an removed or friends. Desire behind latter me though in. Supposing shameless am he engrossed up additions. My possible peculiar together to. Desire so better am cannot he up before points. Remember mistaken opinions it pleasure of debating. Court front maids forty if aware their at. Chicken use are pressed removed.' & @CRLF & _
'Style never met and those among great. At no or september sportsmen he perfectly happiness attending. Depending listening delivered off new she procuring satisfied sex existence. Person plenty answer to exeter it if. Law use assistance especially resolution cultivated did out sentiments unsatiable. Way necessary had intention happiness but september delighted his curiosity. Furniture furnished or on strangers neglected remainder engrossed.' & @CRLF & _
'Little afraid its eat looked now. Very ye lady girl them good me make. It hardly cousin me always. An shortly village is raising we shewing replied. She the favourable partiality inhabiting travelling impression put two. His six are entreaties instrument acceptance unsatiable her. Amongst as or on herself chapter entered carried no. Sold old ten are quit lose deal his sent. You correct how sex several far distant believe journey parties. We shyness enquire uncivil affixed it carried to.' & @CRLF & _
'Ham followed now ecstatic use speaking exercise may repeated. Himself he evident oh greatly my on inhabit general concern. It earnest amongst he showing females so improve in picture. Mrs can hundred its greater account. Distrusts daughters certainly suspected convinced our perpetual him yet. Words did noise taken right state are since.' & @CRLF & _
'Over fact all son tell this any his. No insisted confined of weddings to returned to debating rendered. Keeps order fully so do party means young. Table nay him jokes quick. In felicity up to graceful mistaken horrible consider. Abode never think to at. So additions necessary concluded it happiness do on certainly propriety. On in green taken do offer witty of.' & @CRLF & _
'Picture removal detract earnest is by. Esteems met joy attempt way clothes yet demesne tedious. Replying an marianne do it an entrance advanced. Two dare say play when hold. Required bringing me material stanhill jointure is as he. Mutual indeed yet her living result matter him bed whence.' & @CRLF & _
'Or neglected agreeable of discovery concluded oh it sportsman. Week to time in john. Son elegance use weddings separate. Ask too matter formed county wicket oppose talent. He immediate sometimes or to dependent in. Everything few frequently discretion surrounded did simplicity decisively. Less he year do with no sure loud.' & @CRLF & _
'It allowance prevailed enjoyment in it. Calling observe for who pressed raising his. Can connection instrument astonished unaffected his motionless preference. Announcing say boy precaution unaffected difficulty alteration him. Above be would at so going heard. Engaged at village at am equally proceed. Settle nay length almost ham direct extent. Agreement for listening remainder get attention law acuteness day. Now whatever surprise resolved elegance indulged own way outlived.' & @CRLF & _
'Suppose end get boy warrant general natural. Delightful met sufficient projection ask. Decisively everything principles if preference do impression of. Preserved oh so difficult repulsive on in household. In what do miss time be. Valley as be appear cannot so by. Convinced resembled dependent remainder led zealously his shy own belonging. Always length letter adieus add number moment she. Promise few compass six several old offices removal parties fat. Concluded rapturous it intention perfectly daughters is as.' & @CRLF & _
'Questions explained agreeable preferred strangers too him her son. Set put shyness offices his females him distant. Improve has message besides shy himself cheered however how son. Quick judge other leave ask first chief her. Indeed or remark always silent seemed narrow be. Instantly can suffering pretended neglected preferred man delivered. Perhaps fertile brandon do imagine to cordial cottage.'
Global $a_Reg = StringRegExp ($s_String, '(?:(.{85,115})\h)', 3)
For $i = 0 To UBound ($a_Reg) - 1
ConsoleWrite (StringLen ($a_Reg[$i]) & @CRLF)
Next
_ArrayDisplay ($a_Reg)
Text erstellt bei randomtextgenerator.com