Ja, erkennt es standardmäßig. Geh einfach mal auf die Autoit Hilfe.
Mega
Ja, erkennt es standardmäßig. Geh einfach mal auf die Autoit Hilfe.
Mega
Den standard pfad oder du guckst mal ob es in der Registry steht.
FileOpenDialog in der Hilfe angucken
Mega
Hi,
auf @error oder isArray prüfen nach PixelSearch, da ansonsten bei Nichtfund ein nicht array als ein solches angesprochen würde.
Mega
Warum geht es nicht mit FileInstall?
Hi,
dann mach doch mal einen BugReport.
Mega
z.B.
#include <GUIConstantsEx.au3>
#include <GuiEdit.au3>
; Info.TXT auslesen
$file = FileOpen("test.txt", 0)
$text = ""
; Read in 1 character at a time until the EOF is reached
While 1
$chars = FileRead($file, 1)
If @error = -1 Then ExitLoop
$text = $text & $chars
WEnd
FileClose($file)
#Region ### START Koda GUI section ### Form=D:\Programmierung\newsletter\newsletter.kxf
$Form1 = GUICreate("Form1", 633, 591, 321, 265)
$Newsletter = GUICtrlCreateEdit("", 16, 8, 601, 457)
GUICtrlSetData(-1, StringFormat($text))
GUICtrlSetResizing(-1, $GUI_DOCKHCENTER)
$OK = GUICtrlCreateButton("OK", 264, 512, 113, 49, 0)
GUICtrlSetState(-1, $gui_Focus)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Newsletter
Case $OK
Exit
EndSwitch
WEnd
Mega
1. GuiCtrlRead oder ControlGetText
2. FileCopy ???
3. kann ich nicht testen
Schreib dir mal was für UDFs man bauen könnte ... ![]()
Schreib dir die Buchstaben die gefunden wurden in ein Array und dann such so lange bis du keine Übereinstimmung im array hast. Oder mach doch ein Array mit allen Buchstaben und lösche einfach den genutzten immer raus.
Mega
Hi,
lad die einen Regextester runter dann siehst du es. Beides steht für alles-nicht-BLANK-Zeichen und davon 1 oder mehr. Das führt dann zu einem Treffer.
Mega
Warum so kompliziert?
[autoit]MsgBox(0, "Zufallsbuchstabe", Chr(Random(65, 90, 1)))
[/autoit]Mega
Global $s = "Hello World, I will count letters or Numbers like 1,2,3. And so on. World 111!"
[/autoit][autoit][/autoit][autoit]MsgBox(0, "", _stringCount($s, "World"))
MsgBox(0, "", _stringCount($s, "1"))
MsgBox(0, "", _stringCount($s, "num", 1)) ; Case-insensitivity flag.
Func _stringCount($string, $toFind, $case = "(?-i)", $startPosition = 0)
If $case = 1 Then $case = "(?i)"
Local $count = StringRegExp($string, $case & $toFind, 3, $startPosition)
Switch @error
Case 0
If IsArray($count) Then Return UBound($count)
Case 1
If Not IsArray($count) Then Return 0
Case 2
Return -1
EndSwitch
EndFunc ;==>_stringCount
mit Häufigkeit
#include<Array.au3>
Global $str1 = '23, 129,45,67,23,768,45,878,34,67,34 / 34,45,23,57,34,789,46,78,345,768,89,34 / 12'
MsgBox(0, "Am Häufgisten oder bei Gleichheit am Größten ist :", _occurrence($str1))
Func _occurrence($sString)
Local $splitted = StringRegExp(StringStripWS($sString, 8), '\d+', 3)
Local $result[UBound($splitted)][2]
For $i = 0 To UBound($splitted) - 1
StringReplace($str1, $splitted[$i], '')
$result[$i][1] = @extended
$result[$i][0] = Number($splitted[$i])
Next
If $result[0][1] = 1 Then Return _ArrayMax($splitted, 1, 0)
_ArraySort($result, 1, 0, 0, 1); 1, 0, 0, 2, 1)
_ArrayDblDel($result)
_ArrayDisplay($result)
Return $result[0][0]
EndFunc ;==>_occurrence
;----------------------------------------------------------------------------------------------------------------------
; Function _ArrayDblDel(ByRef $ARRAY [, $CASESENS=0])
;
; Description - From an 1D/2D Array will delete double entries (2D -> combination by '[n][0]' and '[n][1]').
; - Autodetection 1D/2D Array
; - By using string, you can choose case sensitivity.
;
; Parameter $ARRAY: Array to sort
; optional $CASESENS: Case sensitivity off[0] or on[1] (default 0)
;
; Return Success -1 ByRef Array without doubles
; Failure 0 @error = 1, given Array is not Array
;
; Requirements Only 2 occurences in the second dimension
; #include <array.au3>
;
; Author BugFix ([email='bugfix@autoit.de'][/email])
;----------------------------------------------------------------------------------------------------------------------
Func _ArrayDblDel(ByRef $ARRAY, $CASESENS = 0)
If (Not IsArray($ARRAY)) Then
SetError(1)
Return 0
EndIf
Local $iDIM, $arTmp1D[1], $arTmp2D[1][2], $dbl = 0
UBound($ARRAY, 2)
If @error = 2 Then
$iDIM = 1
Else
$iDIM = 2
EndIf
$arTmp1D[0] = ""
$arTmp2D[0][0] = ""
Switch $iDIM
Case 1 ; 1D
For $i = 0 To UBound($ARRAY) - 1
$dbl = 0
For $k = 0 To UBound($arTmp1D) - 1
Switch $CASESENS
Case 0
If $arTmp1D[$k] = $ARRAY[$i] Then $dbl = 1
Case 1
If $arTmp1D[$k] == $ARRAY[$i] Then $dbl = 1
EndSwitch
Next
If $dbl = 0 Then
If $arTmp1D[0] = "" Then
$arTmp1D[0] = $ARRAY[$i]
Else
_ArrayAdd($arTmp1D, $ARRAY[$i])
EndIf
Else
$dbl = 0
EndIf
Next
$ARRAY = $arTmp1D
Case 2 ; 2D
For $i = 0 To UBound($ARRAY) - 1
$dbl = 0
For $k = 0 To UBound($arTmp2D) - 1
Switch $CASESENS
Case 0
If ($arTmp2D[$k][0] = $ARRAY[$i][0]) And _
($arTmp2D[$k][1] = $ARRAY[$i][1]) Then $dbl = 1
Case 1
If ($arTmp2D[$k][0] == $ARRAY[$i][0]) And _
($arTmp2D[$k][1] == $ARRAY[$i][1]) Then $dbl = 1
EndSwitch
Next
If $dbl = 0 Then
If $arTmp2D[0][0] = "" Then
$arTmp2D[0][0] = $ARRAY[$i][0]
$arTmp2D[0][1] = $ARRAY[$i][1]
Else
ReDim $arTmp2D[UBound($arTmp2D) + 1][2]
$arTmp2D[UBound($arTmp2D) - 1][0] = $ARRAY[$i][0]
$arTmp2D[UBound($arTmp2D) - 1][1] = $ARRAY[$i][1]
EndIf
Else
$dbl = 0
EndIf
Next
$ARRAY = $arTmp2D
EndSwitch
Return -1
EndFunc ;==>_ArrayDblDel
Mega
Genau! und \S+ sollte es auch tun ![]()
Hi,
ich würde sowas versuchen:
[autoit]$coord = PixelSearch($pos_A[0], $pos_A[1] + 120, $pos_A[2], $pos_A[3], $farbe , 0, 1)
If Not @error Then
$coord1 = PixelSearch($coord[0] - 20, $coord[1] - 20, $coord[0] + 20, $coord[1] + 20, $farbe , 0, 1)
If Not @error Then
Mega
P.S.: Kann ich das irgendwie testen was du willst?