home *** CD-ROM | disk | FTP | other *** search
- *⌐░⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐┤
- *⌐ª Program: EXP12_2.PRG ⌐ª
- *⌐ª Function: ╜½╬─▒╛╬─╝■┐╜▒┤╡╜▒╕╫ó╫╓╢╬╡─╙ª╙├╖╢└². ⌐ª
- *⌐ª DBF & File: EXP12_1.PRG ⌐ª
- *⌐╕⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐╝
- SET TALK OFF
-
- =SEEKSTR("╩≤▒Ω","EXP12_1.PRG",4)
- * ╡≈╙├ SEEKSTR(), ╝∞╦≈ EXP12_1.PRG ╓╨╡┌ 4 ┤╬│÷╧╓╡─ <╩≤▒Ω> ╫╓╖√┤«
- RETURN
-
-
- *⌐░⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ
- *⌐ª Program: SEEKSTR.PRG
- *⌐ª Function: ╝∞╦≈╬─╝■╓╨╡┌ N ┤╬│÷╧╓╡─╓╕╢¿╫╓╖√┤«, ╒╥╡╜║≤╕▀┴┴╢╚╧╘╩╛.
- *⌐ª Usage: SEEKSTR(<expC1>,<expC2>,<expN>)
- *⌐ª DBF & File: SYSY.DBF
- *⌐╕⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ⌐ñ
- FUNCTION SEEKSTR
- PARAMETERS string,txtfile,occur
- PRIVATE occur,poisition,offset
- PRIVATE pre_scheme, winname
-
- DO CASE
- CASE EMPTY(string) .OR. EMPTY(txtfile) .OR. EMPTY(occur)
- WAIT "─π╓┴╔┘╨δ╓╕╢¿: <╬─╫╓┤«>, <╬─▒╛╬─╝■├√>,<╡┌╝╕┤╬│÷╧╓>, "+;
- "╟δ░┤╚╬╥╗╝ⁿ╝╠╨°.";
- WINDOW
- RETURN .F. && ╚⌠▓╗│╔╣ª, ╘≥┤½╗╪ .F.
-
- CASE TYPE("string") # "C" .OR. TYPE("txtfile") # "C" ;
- .OR. TYPE("occur") # "N"
- WAIT "─π╩Σ╚δ╡─ <╬─╫╓┤«>, <╬─▒╛╬─╝■├√>▓╗╩╟╫╓╖√┤«╗≥<╡┌╝╕┤╬│÷╧╓>"+;
- "▓╗╩╟╩²╫╓, ╟δ░┤╚╬╥╗╝ⁿ╝╠╨°.";
- WINDOW
- RETURN .F. && ╚⌠▓╗│╔╣ª, ╘≥┤½╗╪ .F.
- ENDCASE
-
- IF !FILE((txtfile))
- WAIT "╒╥▓╗╡╜─π╓╕╢¿╡─ <╬─▒╛╬─╝■├√>, ╟δ░┤╚╬╥╗╝ⁿ╝╠╨°.";
- WINDOW
- RETURN .F.
- ENDIF
- occur=IIF(occur<1,1,occur)
-
- USE (LOCFILE("SYS","DBF","╟δ╒╥╡╜╩²╛▌┐Γ SYS.DBF"))
- APPEND MEMO sysmem FROM (txtfile) OVERWRITE
- poisition=ATC(string,sysmem,occur)
- IF poisition = 0
- WAIT "╒╥▓╗╡╜─π╓╕╢¿╡─ <╬─╫╓┤«>, ╟δ░┤╚╬╥╗╝ⁿ╝╠╨°.";
- WINDOW
- RETURN .F.
- ELSE
- offset=poisition+LEN(string)
- pre_scheme=SCHEME(17)
- IF ISCOLOR()
- SET COLOR OF SCHEME 17 TO SCHEME 8
- ELSE
- SET COLOR OF SCHEME 17 TO W+/ ,W/W,N+/N
- ENDIF
- winname=SYS(2015)
- DEFINE WINDOW (winname) FROM 1,1 TO 23,78 " " ;
- SHADOW COLOR SCHEME 17
- MODIFY MEMO sysmem NOEDIT RANGE poisition,offset WINDOW (winname)
- RELEASE WINDOWS (winname)
- SET COLOR OF SCHEME 17 TO (pre_scheme)
- RETURN .T.
- ENDIF
- RETURN