mIRC Home    About    Download    Register    News    Help

Active Threads | Unanswered Past 24 hours | Past 48 hours | Past Week | Past Month | Past Year
mIRC Help Jump to new posts
Re: mIRC Twitch bot gifting subs bot maroon Yesterday at 07:45 PM
Remove those lines from the other event, and put these lines in a brand new remote scriptfile
in the remote tab of the alt+R script editor you can use the file/new to do that.
Then put these lines in that file:

Code
raw USERNOTICE:*:{
  if (!$window(@usernotice)) window -z @usernotice
  echo 3 $time @usernotice nick $nick chan $chan tags: $msgtags
  echo 4 $time @usernotice nick mesg: $1-
  beep 1
}

The beep is just to make a sound when something goes to the window, and you can remove that
Once you have some lines in the window, you can either copy them by highlighting with the mouse, or the @usernotice window will have a "buffer" menu choice in the upper left corner of the window, from where you can either save-as to disk, or copy to clipboard
6 234 Read More
General Discussion Jump to new posts
Re: SSL expiring mx5 30/01/23 02:34 PM
Thank You smile
2 122 Read More
Scripts & Popups Jump to new posts
Re: A script for a timestamp maroon 30/01/23 09:09 AM
Well after reading your latest post, I went back to the original, and there's no way I could've possible read the 1st post to be close to what you're wanting in the 2nd one.

I didn't run this script or change my clock to test it, but it should work.

What this alias does is check the current time that it's running, then sets %day to the 3-letter code for the day of the week, Sun thru Sat, and sets %now to be the current HourMinutes. It then creates %next as whichever is the next closest future time of the day between these 2 times, so obviously the variable contains a time between 950 and 1149 then the next nearest time will be 11:50, but otherwise it would be 09:50.

If the alias runs at 9:50am on Sun or Fri, the echo is where you can put your 'do stuff'.
And likewise, if it runs at 11:50am on Mon or Thu, there's another echo for that stuff.

But regardless of whether it matches any of those day/time combos, it then launches the timer again trying to execute at the next time window.

The syntax for timer lets you either set it to run at a specific hours:minutes within the next 24 hours, or to run at a specific number of seconds in the future. It's a lot simpler here to let it execute on each day of the week, but only do things on the correct days.

I have no idea what you mean by putting the script on the name, or doing a checkup. So that's probably in the place for the 'do stuff'. Depending on what you want to do those 4 days, it might be needed to split the Sun Fri trigger into 2 sections.

Code
alias DJtime {
  var %now $asctime($ctime,HHnn) , %day $asctime($ctime,ddd)
  var %next 09:50
  if (%now isnum 0950-1149) var %next 11:50

  if ( (%now == 0950) && ( $istok(Sun Fri,%day,32) )) {
    echo -s do stuff at 950am on Sun or Fri

    goto next
  }

  if ( (%now == 1150) && ( $istok(Mon Thu,%day,32) )) {
    echo -s do stuff at 1150am on Mon Thu

    goto next
  }

  :next
  .timerDJtime -o %next 1 0 DJtime
}
3 134 Read More
Bug Reports Jump to new posts
Re: Icon dialog control Khaled 29/01/23 03:24 PM
Thanks for your bug report. The custom dialog code does not handle spaces at all in this case. The only reason that format is working for you is that some of the Windows image APIs parse spaces. I have extended the icon code to remove extra spaces before calling the APIs. As far as I can tell, this shouldn't break backward compatibility but will need testing.

As for the disabled/hidden icon on startup, this also applies to hotlinks. These have always worked this way and there are no plans to change this behaviour.
1 81 Read More
Feature Suggestions Jump to new posts
Re: if condition, literal spaces and timer evaluations maroon 28/01/23 05:25 PM
//var -s %a $unsafe(a)
* Set %a to $unsafe(YQ==).undo

//var -s %a $unsafe(%null)
* Set %a to

It looks like $unsafe is an alias that behaves like

Code
alias makesafe {
  if (.prop == undo) returnex $decode($1,m)
  var %string $encode($1,m)
  return $ $+ makesafe( $+ %string $+ ).undo
}

The handler for .undo obviously has no trouble when the input string is blank, but if there is a problem inside the code where it doesn't like creating the .undo string to be blank, assuming .undo is being handed to the subroutine handling $decode, can simply make the string be a single base64 symbol, which $decode would return as the empty string. So the final return could be preceded by:

Code
  if (%string == $null) var %string A

So the solution is to have $unsafe($null) return either $unsafe().undo or $unsafe(A).undo
1 93 Read More
Scripts & Popups Jump to new posts
Re: how to stop auto reply on second time Talon 28/01/23 04:03 PM
Since this is throw-away data, there's no sense in having a special database for it, like hash/ini/text/global vars...

The simplest solution would be to take advantage of /ialmark. I assume for the lifespan a user remains within your ial you only wish to respond ONCE to a specific trigger, like hello. If it is indeed intended to only allow a response every 10 minutes like maroons example, uncomment the last line.

This also circumvents the issue about disk-writes maroon mentioned with using variables. This also addresses an unforseen problem with maroons hash-table example as it does not follow nick changes and would re-trigger if they consistantly change nicknames to ones not logged into the database. By using IAL, this is managed automatically for us!

Code
ON *:TEXT:*Hello*:#:{
  if (!$ialmark($nick,$+($chan,.greeted))) {
    .ialmark -n $nick $+($chan,.greeted) 1
    .timer 1 $rand(2,5) msg $unsafe($chan $nick $+ $chr(44) Hi dude!)

    ;== Uncomment below to make it trigger only once per nick within 600ms...
    ;$+(.timer,$chan,.,$nick) 1 600 .ialmark -rn $nick $+($chan,.greeted)
  }
}

Remember that an IAL entry persists as long as there are common rooms between you and the user. If you want this to re-trigger again if they rejoin from a part/kick and say "hello", you'd want to unset that mark on part/kick as well (in-case they're in more than one common channel, if not, it's un-necessary as it'll naturally get expunged)

You do not have to worry about a part/kick event to unset the mark if you've uncommented that timer (allowing it to always trigger as long as it hasn't been triggered previously by the same user within 10 mins)
4 523 Read More
Bug Reports Jump to new posts
mIRC 7.72 hangs w/Remote Desktop Kufat 27/01/23 05:52 PM
I'm running Windows 10 21H1.

Since upgrading my installation of mIRC from 7.6x (don't recall the exact version, sorry) to 7.72, I've experienced hangs when connecting to my PC via Remote Desktop. When the hang occurs, mIRC is completely unresponsive and doesn't answer server pings, etc. The hangs seem to occur randomly, although thus far I haven't seen one when mIRC has had focus. I don't know if they're limited to Remote Desktop, as I don't currently have physical access to the machine.

Task Manager shows ~25% CPU usage when this happens, which corresponds to using all of one core on my machine.

I generated a core dump and can provide it privately, if that'd be helpful.
0 64 Read More
Feature Suggestions Jump to new posts
"ON MIRCTEXT" EVENT maroon 26/01/23 10:16 PM
Suggesting some kind of "ON MIRCTEXT" EVENT to handle window messages generated by the client itself, which would allow a script to monitor them for content, so they could ^HALT them or take action based on their content.

There are some settings in mIRC where there's not an identifier call to find the value, but the setting can be found in mirc.ini [options], but those aren't officially documented for new scriptors to find them, and in some cases would force the script to issue a /saveini to make sure the $readini value is correct. But there are other things where you can't peek at disk to see the setting.

This would be easier and more accurate than trying to inspect the status window from the bottom-up looking for content without actually being able to confirm that this was a message created by the client instead of created by something else like /echo /loadbuf /filter.

I'm seeing this as a 'catch all' event to handle all the text that's not something that can be handled by intercepting 'raw' or other events. If it's not something generated by 'raw' or some other event where the info can be obtained, it would trigger this instead.

Depending on what happens when you use a silencing dot for commands like /.dcc passive, a script can see the setting for something without the message being displayed, if the event handler has some kind of $shown identifier returning $true or $false, to indicate whether the text can actually be seen.

One use case for this would be for situations like the problem I encountered related to this thread

https://forums.mirc.com/ubbthreads.php/topics/270577/new-play-switches

I was helping fix someone else's script, where they were using /play to send significant amount of text to channel, but when the /play stop command was issued, it kept sending output to channel because several lines were queued in the flood que. I didn't want to just clear the que too, because there's no way for the script to know how many of the lines in the que were for this script vs other text. Also, as far as I know, other than looking at the output from the /flood command, there's no other way to find how many lines are in the flood buffer. So instead I used the /flood command to send the message to the status window, from where I could use

$gettok($line(status window,$line(status window,0)),-6-,32)

to get the content of the last line in the status window, to show a message to channel telling how many lines were pending in the que. It worked fine for me, but not for the person I was helping, and it took a while to figure out there was different behavior because they didn't have the line separator deleted, so the last line of their status window was a "-" instead of being the message I was looking for.

Other use for this would be things like detecting the reconnect 'retry #N' message text showing to screen, so a script could take action based on what was (or was not) happening.

Possibly the most common use for this would be - if the midnight "Session Time:" were also echoed to the status windows - this would be an easy way for scripts to be triggered every midnight without the complications of trying to do this with a timer, where there would also be the risk that something could ruin it with /timer* off. If the decision were that the Session Time message would be shown only to the status window, it would be easy for a script to use this event to hook that Client Message and echo it to the open channels and queries.

This would be for 'real' client messages, so something showing up because of reloading a logfile shouldn't count. It also is for client messages, and not for the expected output for commands. So all lines of /filter output should not trigger it, but the error message for /filter -sw @mirc * should.

Since this is a grab-bag event, it would be up to the script to have an appropriate text match for the thing they're looking for, but I can't think of any cases where 2 unrelated things would return the same text string.
0 30 Read More
Feature Suggestions Jump to new posts
Disco/Reco/DayChange for Query Window maroon 26/01/23 09:22 PM
In a #channel window, when you have the 'keep open' setting enabled, you get timestamped "* Disconnected" and "* Rejoined" messages that let you see which window(s) of time could potentially have messages you missed. But this would also be useful for query window too, where currently you can't look at the query window to see if you had disconnected after it opened, without scripting it.

Similarly, for both Query and #channel windows, it would be useful for the "Session Time:" line sent to the logfile is also sent to the #channel Query windows too. As things are now, in low volume channels it can be hard to figure out which day a message was made in without including the day as part of the timestamp, or by slowly paging through the history to see how many times the clock circled. And when you have a Query window opened 3 days ago, it's hard to tell whether a message was made today or 2 days ago, without opening the logfile to look for the midnight message.

I'm ambiguous whether it's needed to include a 'noon message' for those whose timestamps use 'hh' instead of 'HH', or just go ahead and have a twice daily 'session time' message for everyone.
0 29 Read More
Feature Suggestions Jump to new posts
Serverlist mods maroon 26/01/23 09:21 PM
1. For the options hiding behind the hamburger icon, underline the key-letters to indicate the presence of the undocumented hotkeys for Add Edit.

2. Add another item behind the hamburger icon to 'clone' the visible serverlist entry. This makes it easier to add multiple server addresses for the same network GROUP without needing to manually fill in each blank, or using notepad to add the new item.

For example, I was given an o-line at a network that was valid only at 1 of the servers, so if I connected using the round-robin address, it was a dice-roll whether I would be oper. But if that 1 server was down, then I couldn't connect at all.

So, the solution was to add the individual server to the GROUP while retaining the round-robin item as a fallback for when the 1 server fails.

However, in order to add the new server address to the GROUP, I had to ADD the new item, then input every field, including editing the port from the 6667 default, as well inputting the non-global client certificate, and the password or other login-method settings. I ended up editing servers.ini in notepad in order to have a modified clone of the round-robin entry without risk of making a typo.

To avoid confusion between editing a clone vs editing the only copy, there probably should not be a hotkey for this choice, and the titlebar should say something like 'clone server' instead of 'add server'. And the new item wouldn't actually be added to the serverlist until <enter>.
0 29 Read More
Bug Reports Jump to new posts
Re: /debug with local alias Khaled 26/01/23 11:23 AM
Thanks, the /debug command has been extended to work with local aliases. As far as I can tell, there shouldn't be any backward compatibility issues with this. This change will be in the next version.
1 102 Read More
Scripts & Popups Jump to new posts
Re: resize windows maroon 25/01/23 06:14 PM
This creates a custom window
//window @resize 100 200 300 400

This resizes it to be taller, 500 instead of 400

//window @resize 100 200 300 500

This instead resizes it to be slightly wider, width 350 instead of 300

//window @resize 100 200 300 400 | //window @resize 100 200 350 400

If you are wanting the script to change the size of the main mirc window itself, that is not possible. The
/help /showmirc
command can do some things to the main window, but not changing its size
11 555 Read More