Source language: Translate to:

SEARCH/FOUND FAST...

Share sample pubs, scripts, etc. with other NeoBook users

Moderator: Neosoft Support

SEARCH/FOUND FAST...

Postby virger » Sat May 16, 2009 10:01 am

To search in File, with many lines.

Maybe helpyou

Button:

.---------------
{NeoBook 5 Objects}
NeoBookVer=5.60
ObjectType=3
Name=BTSEARCH
X=259
Y=93
W=119
H=31
Anchor=0
Text=Search
Hint=Search In List
Align=2
ImageStyle=0
XPTheme=Yes
ObjAction=disableobject "[self]"¶¶...[fil1]...filename of list to search¶setvar "[fil1]" "ListaLibros.Txt"¶setvar "[fil]" "[fil1]"¶¶...[tmpfil]...Temp FileName to save¶setvar "[tmpfil]" "_Tmp"¶¶...ListBox to show the lines¶ListBoxDeleteItem "LISTA" "All"¶¶...[vSearch]...String to search¶strlen "[vSearch]" "[chlen]"¶¶setvar "[cont]" "1"¶¶...[tot]...total found¶setvar "[tot]" "0"¶¶while "1" ">" "0"¶ fileread "[pubdir][fil]" "All" "[text]"¶ SearchStr "[vSearch]" "[text]" "[pos]" ""¶ if "[pos]" "=" "0"¶ exitwhile¶ endif¶ filelen "[pubdir][fil]" "[len1]"¶ substr "[text]" "[pos]+[chlen]" "99999999" "[text]"¶ setvar "[fil]" "[tmpfil]"¶ FileWrite "[pubdir][fil]" "All" "[text]"¶ filelen "[pubdir][fil]" "[len2]"¶ math "[cont]+[len1]-[len2]" "" "[cont]"¶ fileread "[pubdir][fil1]" "[cont]" "[text]"¶ ListBoxAddItem "LISTA" "0" "[text]"¶endwhile¶fileerase "[pubdir][tmpfil]"¶ListBoxSize "LISTA" "[tot]"¶enableobject "[self]"
LineColor=0
LineWidth=1
LineStyle=0
FillColor=12632256
FillPattern=0
Font=Arial
FontSize=12
FontStyle=0
FontCharset=1
TextColor=0
TabOrder=2
--------------

PURA VIDA
FROM COSTA RICA
CENTRAL AMERICA

GDOSAN
User avatar
virger
 
Posts: 510
Joined: Mon Sep 18, 2006 12:21 pm
Location: Costa Rica, America Central

Return to Sample NeoBook Pubs

Who is online

Users browsing this forum: No registered users and 2 guests

cron