mIRC Home    About    Download    Register    News    Help

Print Thread
On !command username search script #266274 03/11/19 02:05 AM
Joined: Nov 2018
Posts: 8
S
StanSmith Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Nov 2018
Posts: 8
I was able to implement a manual search https://forums.mirc.com/ubbthreads.php/topics/264144/hard-time-understanding-filter-command (with some difficulty), but I need some automation for other users.

Can anybody help me out with this?

1. User types !scan SearchTerm in a specific channel
2. mIRC client switches to status window
3. mIRC client executes /clear in status window
4. mIRC client posts "Working..." in a specific channel
5. mIRC client executes /quote who *SearchTerm*
6. After, say, 5-second timer, every line that contains *SearchTerm* in status window as a result of /who *boat* gets copied to a specific channel
7. mIRC client posts "Search complete." in a specific channel.

Re: On !command username search script [Re: StanSmith] #266280 03/11/19 05:01 PM
Joined: Nov 2018
Posts: 8
S
StanSmith Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Nov 2018
Posts: 8

Re: On !command username search script [Re: StanSmith] #266298 08/11/19 01:14 AM
Joined: Feb 2011
Posts: 325
K
KindOne Offline
Fjord artisan
Offline
Fjord artisan
K
Joined: Feb 2011
Posts: 325
I'll help with some of it, good luck with the rest. I've not tested any of this.

All of these seems a bit overkill vs just using a few lines of script for reading/writing the contents of raw 352/315/... into a .txt file. Why exactly are you wanting it to do all these things?


Code
; Switch to status window:
; /sendkeys % $+ 1
alias sendkeys {
  var %a = sendkeys $+ $ticks
  .comopen %a WScript.Shell
  if !$comerr {
    var %b = $com(%a,SendKeys,3,bstr,$1-)
    .comclose %a
    return %b
  }
  return 0
}

; Clear status window.
; /clear -s


; Copy all contents of the active window into the clipboard.
alias copyactive { 
  var %l = 1, %s = $line($active, 0) 
  clipboard 
  while (%l <= %s) { 
    clipboard -an $line($active, %l)
    inc %l 
  }
}

; Paste contents of clipboard into a channel.
; /pasteclipboard #channel
alias pasteclipboard { 
  var %i = 1, %x = $cb(0)
  while (%i <= %x) {
    .msg $1 $cb(%i)
    inc %i
  }
}



irc.swiftirc.net #msl (mIRC Scripting Language)
Re: On !command username search script [Re: KindOne] #266305 09/11/19 10:43 AM
Joined: Nov 2018
Posts: 8
S
StanSmith Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Nov 2018
Posts: 8
Thanks for input, I'll check out what I can do with your input over the weekend.
I don't really need for the client to switch to Status window, just the results of /quote whois need to be gathered from Status window. There's too much nonstop junk in Status window, so I need such things restricted to Status window.

I use mIRC (Admin) on a busy chat site, while moderators are using a web interface. Need for moderators to be able to search usernames containing certain words and moderator access to certain features must stay restricted.

I also need to somehow make this:

Code
//window -c @window | window -en @window | filter -ww $active @window *text* | window -a @window


...work upon !history *text*, which would output last # lines to a #channel.

Last edited by StanSmith; 09/11/19 11:01 AM.