From WikiChip
Difference between revisions of "mirc/commands/fseek"
< mirc‎ | commands

(Switches)
(Synopsis)
Line 3: Line 3:
  
 
== Synopsis ==
 
== Synopsis ==
  /fseek -nlwr <name> <position|N|matchtext>
+
  /fseek -nlwrp <name> <position|N|matchtext>
  
 
== Switches ==
 
== Switches ==

Revision as of 15:37, 27 December 2019

The /fseek command sets the read/write pointer to the specified position in the file, position starts at 0.

Synopsis

/fseek -nlwrp <name> <position|N|matchtext>

Switches

  • -l - sets the pointer to the beginning of the Nth line
  • -n - sets the pointer to the beginning of the next line (from the current position of the read/write pointer)
  • -w - sets the pointer to the beginning of the line matching the wildcard expression
  • -r - sets the pointer to the beginning of the line matching the regular expression
  • -p - sets the pointer to the beginning of the current line, if the pointer is already at the beginning of a line, it sets the pointer to the beginning of the previous line

Parameters

  • <name> - the name of the file handle
  • <position|N|matchtex> - not required if you use -n, if -l is used: a line number, if -w is used: a wildcard expression, if -r is used: a regular expression, if no switch is used, it's the position in the file (Nth byte)


Note: if /fseek is not successful (can't find a match with -w or -r, can't find the Nth line with -l etc), it will set the read/write pointer to the end of the file. $fopen().err is not set.

Example

/fseek myfile 42
/fseek -l myfile 12
/fseek -n
/fseek -w *findthis*
/fseek -r /findthat/

Compatibility

Added: 6.1

See also

v · d · e mIRC commands list

A /abook, /action, /add, /ajinvite, /alias, /aline, /ame, /amsg, /anick, /aop, /auser, /auto, /autojoin, /avoice, /away

B /background, /ban, /bcopy, /beep, /bindip, /bread, /break, /breplace, /bset, /btrunc, /bunset, /bwrite

C /channel, /clear, /clearall, /clearial, /cline, /clipboard, /close, /closechats, /closedccs, /closefserves, /closemsg, /cnick, /color, /colour, /comclose, /comlist, /commands, /comopen, /comreg, /continue, /copy, /creq, /ctcp, /ctcpreply, /ctcps

D /dcc, /dccserver, /dde, /ddeserver, /debug, /dec, /describe, /dialog, /did, /didtok, /disable, /disconnect, /dlevel, /dline, /dll, Template:mIRC/donotdisturb, /dns, /dqwindow, /drawcopy, /drawdot, /drawfill, /drawline, /drawpic, /drawrect, /drawreplace, /drawrot, /drawsave, /drawscroll, /drawsize /drawtext

E /ebeeps, /echo, /editbox, /else, /elseif, /emailaddr, /enable, /events, /exit

F /fclose, /filter, /findtext, /finger, /firewall, /flash, /flist, /flood, /flush, /flushini, /fnord, /font, /fopen, /fseek, /fsend, /fserve, /fullname, /fupdate, /fwrite

G /ghide, /gload, /gmove, /gopts, /goto, /gplay, /gpoint, /gqreq, /groups, /gshow, /gsize, /gstop, /gtalk, /gunload, /guser

H /hadd, /halt, /haltdef, /hdec, /hdel, /help, /hfree, /hinc, /hload, /hmake, /hotlink, /hop, /hsave

I /ial, /ialclear, /ialmark, /identd, /if, /ignore, /iline, /inc, /iuser

J /join

L /leave, /linesep, /links, /list, /load, /loadbuf, /localinfo, /log, /logview

M /maxdepth, /mdi, /me, /menubar, /mkdir, /mnick, /mode, /msg

N /noop, /notice, /notify

O /onotice, /omsg

P /pareline, /part, /partall, /pdcc, /perform, /play, /playctrl, /pop, /protect, /proxy, /pvoice

Q /qme, /qmsg, /query, /queryrn, /quit, /quote

R /raw, /registration, /reload, /remini, /remote, /remove, /rename, /renwin, /reseterror, /resetidle, /return, /returnex, /rlevel, /rline, /rmdir, /run, /ruser

S /save, /savebuf, /saveini, /say, /scid, /scon, /server, /set, /setlayer, /showmirc, /signal, /sline, /sockaccept, /sockclose, /socklist, /socklisten, /sockmark, /sockopen, /sockpause, /sockread, /sockrename, /sockudp, /sockwrite, /sound, /speak, /splay, /sreq, /strip, /switchbar

T /timer, /timestamp, /tip, /tips, /titlebar, /tnick, /tokenize, /toolbar, /topic /tray, /treebar

U /ulist, /unload, /unset, /unsetall, /updatenl, /url, /username, /uwho

V /var, /vcadd, /vcmd, /vcrem, /vol

W

X /xyzzy