| |
|
|
p.specht
| From Heinz Brill stammt following Posting: "In one Ordner in all Files to one String Search and The suitable Lines spend (Lehrreich for use of MOVELISTPROC)":
Declare lever lb, list, edit1, btn1, btn2
Declare String way, such
Declare Long end
end = 0
list = Create("List", 1)
Window Title "Text - Sucher (XProfan-X4 Version of Heinz Brill)"
Window 800, 400
Create("Text", %HWnd, "Suchstring", 10, 10, 90, 25)
edit1 = Create("Edit", %HWnd, "", 100, 10, 180, 25)
btn1 = Create("Button", %HWnd, "Ordner wählen", 10, 60, 120, 25)
btn2 = Create("Button", %HWnd, "Start", 180, 60, 60, 25)
lb = Create("Listbox", %HWnd, 0, 10, 120, 500, 200)
WhileNot end
WaitInput
If Clicked(btn1)
way = $ ChooseDir("Wähle Ordner !")
ElseIf Clicked(btn2)
such = GetText$(edit1)
If way <> ""
CHDIR way
Else
way = $CurrentDir
EndIf
If such <> ""
ClearList list
ClearList 0
Dateisuche()
Else
MessageBox("Bitte first Suchstring eintragen", "Fehler", 0)
EndIf
EndIf
Case %Key = 2 : end = 1
EndWhile
Proc Dateisuche
AddFiles "*.*"
Move("ListToHandle", list)
ClearList
ClearList lb
Set("MoveListMode", 1)
WhileLoop 0, GetCount(list) - 1
Ifnot InStr("[", GetString$(list, &LOOP))
AddStrings(lb, GetString$(list, &LOOP) + " date : " + DToc$(GetFDate$(GetString$(list, &LOOP))) + " Time : " + GetFTime$(GetString$(list, &LOOP)))
Move("FileToList", GetString$(list, &LOOP))
AddStrings(lb, " ")
EndIf
EndWhile
ENDPROC
MoveListProc
Parameters String s, Int i
Set("RegEx", 1)
If Get("MoveListMode") = 1
If Match $(such, s) <> ""
AddStrings(lb, Str $(i + 1) + ". row " + s)
EndIf
EndIf
Set("RegEx", 0)
ENDPROC
|
|
|
| XProfan 11Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'... | 05/30/21 ▲ |
|
|
|