mIRC Home    About    Download    Register    News    Help

Active Threads | Unanswered Past 24 hours | Past 48 hours | Past Week | Past Month | Past Year
Scripts & Popups Jump to new posts
Re: Using the nick list color in messages Epic 1 hour ago
Here, most likely the question was to check the specific settings of your client. Because each user can configure the program in his own way, and we do not know what pitfalls there may be and what other installed scripts can cause conflict. Some things can interfere with the correct operation of the script, so most likely you were asked for help in testing the code in order to create script that will work exactly with your specific settings and meet your needs. Anyway, we're just trying to help, and in theory expect some average understanding when installing scripts for each job seeker in this forum. If you are at a loss for something, then do not hesitate to ask in more detail about it and formulate your question more clearly so as not to be misleading if you want to be understood as quickly as possible and provide the necessary support.

For us it is a hobby and practice to brush up on our scripting knowledge and to create something new.

Specifically on my own behalf, I will say that with the next presented script in the near future, I will try to convey to you as much as possible how and what will need to be done and what to press so that you everything works out.

As for the white nicknames in quotes <nick>, most likely the whole problem is in the "Any nick (Auto)" setting. Try to remove this line in "Nick Colors", because it can prevent the script from working properly. In the last script I presented, all nicknames are entered into the address book automatically with a random color, when the "%cnm_auto_color = true" variable is enabled. Perhaps this will help.
17 330 Read More
Scripts & Popups Jump to new posts
Re: help to ip virtual Epic Yesterday at 01:10 AM
I'm gratitude you for participating in help and for the prompt helpful hint. I will make these changes and add to my script, which thereafter will then get the index v1.0.2
3 46 Read More
Feature Suggestions Jump to new posts
Re: Bind to specific Network Interface / Adapter Khaled 30/11/20 07:42 AM
Quote
Still today, mIRC is being promiscuous and utilizing whatever adapter it feels like.

The latest beta is working correctly for me when I enter a specific network adapter in the ports dialog.

Can you describe a step by step method that reproduces the issue you are seeing?

Also, remember, if the network adapter you have specified in the ports dialog is not available for any reason, mIRC will default to using any adapter for the connection, eg. if the adapter is disabled or no longer exists.
8 491 Read More
mIRC Help Jump to new posts
Re: CPU usage when on many networks/channels T20 26/11/20 09:53 PM
Thanks for your attention and help!

I have done a lot of things the last days trying to pin down this, experimenting within mIRC, making changes in Windows and I've also been doing some unrelated hardware changes to the server. It turned out that this last thing was what would lead me to the solution.

I will not bother you with a story of all my experimentation, but jump straight to the point. The real cause of the problem is strongly tied to Microsoft's Remote Desktop implementation.

What I perhaps omitted to tell you, because I didn't understand the significance of it at the time, is that this is a server that I usually only Remote Desktop into, and that it very seldom has a display attached.

When I did the hardware work on it I had a physical display attached and logged in locally and did some required reboots. I very soon noticed that mIRC suprisingly used only (the expected) 3-5 % of CPU time, despite no other relevant changes to the system.

I then connected to the server with Remote Desktop (from a Windows 10 workstation), and immediately the problem was as described earlier. What is even more interesting, is that if I logged out of the remote session, mIRC did not go back to it's earlier relaxed state but it kept using up 20-50 % CPU until rebooting the server. A heavier load while accessing the server remotely would have been acceptable to me, but this was obviously not the case here.

I also noticed that some other applications were clearly also affected in the same way, but certainly not all. The common thing between them seemed to be that they were quite "GUI-heavy". The extra CPU load also seemed to correspond well with how GUI-heavy they were, mIRC being the extreme example. This seemed to fit well with my earlier observations that the exaggerated CPU load of mIRC scaled well corresponding to the number of channel/network windows I had open.

I read up on RDP and tried every possible recommended setting related to hardware acceleration and other things, but it did not help. I also found that I was not alone in finding similar issues (but the really big problem for most with RDP was with OpenGL applications, there is even a new Remote Desktop Accelerator by Nvidia for their graphics cards which I tried installing but it didn't seem to do much good in my non-OpenGL case). In some cases there were reports that installing a "HDMI dummy"/"EDID emulator"/"ghost display plug" helped with similar RDP issues, but I have not had the opportunity to try this yet.

I know Microsoft's Remote Desktop system works quite differently from other similar solutions, like TeamViewer or VNC. So I tried using RealVNC (I think any of them would have been just as useful) and wow, I could have remote desktop access to my server without any of the described problems, mIRC was now nicely using around 3-5 % CPU, as expected. The VNC server application and associated services surely use a lot of CPU while I am connected, but as soon as I minimize the window, the CPU load is negligible.

So, a happy end to the issue! I still hope though that this is something that will be fixed in RDP, in graphics drivers, or at the OS level, because if it were not for the issue described here I much prefer RDP over the alternatives.

I am thankful for your help, sorry to perhaps have wasted your time, and hope this story can be helpful to someone else with a similar problem.
It might also be useful to know that you should be able to run mIRC with 55 channels over 22 networks, some scripts, logging and various bells and whistles options using a hardly noticeable share of CPU power even on a lowly Turion II @ 1.5 GHz.
4 191 Read More
Bug Reports Jump to new posts
Re: Full Install backups bug Loki12583 26/11/20 01:39 PM
I did perform an 'upgrade' install, I thought all files would be backed up during this case but thanks for the explanation.
5 419 Read More
Bug Reports Jump to new posts
Re: $nick().color = 0 for no-such-nick Khaled 25/11/20 10:57 AM
Quote
When $nick() uses a not-present nick or an invalid index number with the .color prop, it returns 0 instead of $null

This behaviour is actually present in many identifier properties. Some return a default value if no match is found, others return $null. The behaviour is somewhat arbitrary - probably based on what a particular scripter requested at the time it was implemented. In this case, this has always returned a default value.

Quote
edit: the .idle property is also returning zero for these same cases

The same applies to this property.

In general, if you want to check if something exists, you need to check for the item itself ie. $nick($chan,nick), without properties. In many cases, a return of $null for a property can be perfectly valid.
1 56 Read More
Bug Reports Jump to new posts
mIRC beta Khaled 24/11/20 12:55 PM
The latest beta can be downloaded here and includes the changes below.

There is also a beta installer available for testing here that includes the dated backup folder changes described below.

Quote
Beta v7.63.2424 changes:
1.Item 21, https://forums.mirc.com/ubbthreads.php/topics/267694
Changes include:
1) Previously, backups to "aliases.ini" and "popups.ini" in the
"scripts" folder were being saved in "scripts\backups". These
are now saved in the root "backups\DATEDFOLDER\scripts" folder,
so that all backed up files are in one folder.
2) Both portable and non-portable installations are now handled.
3) The "defaults" folder is now also backed up.
4) The older method of storing "aliases.ini" and "popups.ini"
in the root folder is also handled.
2.Item 41, changed. When on many channels, with many users, this can
be resource intensive.

Beta v7.63.2393 changes:
1.Item 39, optimized. Single, wrapped lines that are long enough
to extend vertically offscreen were being written to the device
context unecessarily. This wasn't an issue when the maximum
line length was smaller. Now that lines can be 8192 characters
long, it makes a difference.
2.Item 31, https://forums.mirc.com/ubbthreads.php/topics/268068
3.Item 40, added.

Beta v7.63.2215 changes:
1.Item 34, extended. Experimental. This simply indents to the
next tab stop, spaced at eight character intervals in all
windows by default.
2.Item 31, changed naming of "custom window" option to "tab".
For historical reasons, these identifiers have different
defaults, so specifying the full set of options is advised.
3.Item 36, https://forums.mirc.com/ubbthreads.php/topics/267979
The only change is that for certain dots an alternative method
is used to draw them.
4.Item 37, https://forums.mirc.com/ubbthreads.php/topics/267787
5.Item 38, changed. This affects numerics like 477 on Undernet
servers.
6.Item 15, changed to only report an error if number is not
used, not if range is wrong.

Beta v7.63.1807 changes:
1.Item 21, https://forums.mirc.com/ubbthreads.php/topics/267694
2.Item 24, updated.
3.Item 25, fixed.
4.Item 26, updated.
5.Item 27, https://forums.mirc.com/ubbthreads.php/topics/267879
6.Item 28, https://forums.mirc.com/ubbthreads.php/topics/267922
7.Item 29, changed.
8.Item 30, added.
9.Item 31, extended. All of these need testing. As with many old
identifiers, I have had to bolt on the new features while not
breaking older formats. The more I bolt on, year after year,
the trickier it becomes, especially with identifiers that allow
optional parameters and change behaviour based on the type of
parameter.
10.Item 32, changed. Portions of the $wrap() identifier had to be
re-written to handle control code preservation across lines.
11.Item 33, https://forums.mirc.com/ubbthreads.php/topics/267977

Beta v7.63.956 changes:
1.Item 18, https://forums.mirc.com/ubbthreads.php/topics/267799
2.Item 19, fixed. It was returning invalid results for windows
like Urls List, Notify List, etc. Ideally, it should have just
returned the full titlebar text but its original implementation
was to return the text after the window name, so this has been
left as is.
3.Item 20, changed.
4.Item 21, https://forums.mirc.com/ubbthreads.php/topics/267820
If existing scripts use * instead of @ in the event definition
for the window, this will cause the event to trigger in all
windows. /halt will still only halt the TAB key.
5.Item 22, https://forums.mirc.com/ubbthreads.php/topics/267834
6.Item 23, https://forums.mirc.com/ubbthreads.php/topics/267836

Beta v7.63.649 changes:
1.Item 13, https://forums.mirc.com/ubbthreads.php/topics/267766
The $regml().pos results for UTF-8 characters now point to the
start of the character in the unicode string.
2.Item 14, https://forums.mirc.com/ubbthreads.php/topics/267766
3.Item 15, https://forums.mirc.com/ubbthreads.php/topics/267753
This will now report an error and halt the script if text is
used instead of a number, and if the number is out of range.
4.Item 16, fixed.
5.Item 17, added, uses QueryPerfomanceCounter(). In the past, this
API was unreliable on multiple cores/different versions of
Windows but seems better now. Note that it returns different
results to $ticks, so they cannot be used together.

Beta v7.63.478 changes:
1.Item 9, updated.
Changed the behaviour of the Connect/Options/Ports/Bind feature:
If you enter an adapter name, mIRC will always search for a
matching adapter to find its current IP address. If you enter an
IP address, it will always use that IP address.
2.Item 11, https://forums.mirc.com/ubbthreads.php/topics/267739
Needs testing.
3.Item 12, updated.

Beta v7.63.416 changes:
1.Item 1, https://forums.mirc.com/ubbthreads.php/topics/267596
2.Item 2, https://forums.mirc.com/ubbthreads.php/topics/267574
3.Item 3, https://forums.mirc.com/ubbthreads.php/topics/267624
4.Item 4, https://forums.mirc.com/ubbthreads.php/topics/267637
5.Item 5, extended. Added to end of the LOADINFO structure. DLLs
need to check the version number to determine if it is present.
6.Item 6, https://forums.mirc.com/ubbthreads.php/topics/267642
7.Item 7, fixed.
8.Item 8, fixed.
9.Item 9, https://forums.mirc.com/ubbthreads.php/topics/267723
10.Item 10, changed.

Changes:
1.Fixed /bcopy not copying zero length binary variables.
2.Fixed /timer -h multimedia timer bug that caused imprecise elapsed
time measurement at low millisecond intervals.
3.Fixed $bfind() N parameter not being applied during a .regex search.
4.Fixed $min()/$max() parsing bug.
5.Extended the DLL LOADINFO structure to include a DWORD dBytes
variable that specifies the maximum number of bytes allowed when
writing to the data and parms strings.
6.Fixed /timer halted message not being displayed in some cases.
7.Fixed DDE server not being reset when DDE settings changed in the
Options DDE dialog.
8.Fixed SSL private key error incorrectly being reported as an
SSL certificate error in some contexts.
9.Fixed bind to adapter/IP address bug that prevented it from using
adapters with dynamic IP addresses.
10.Changed $base() to remove limit on floating point precision for
larger bases.
11.Fixed $base() not rounding fractions to current base.
12.Updated LibZip library to v1.7.3.
13.Changed $regml().pos so that if //u is not used for a unicode
string, UTF-8 characters now return the position of the start
of the character in the unicode string.
14.Added $regml().bytepos that returns the UTF-8 byte positions
matched within a string.
15.Changed /setlayer to report an error if invalid parameters are
used.
16.Fixed $bfind().regex issues related to UTF-8 parsing.
17.Added $ticksqpc that returns a high resolution tick count.
18.Changed isalpha/isalnum/isletter/islower/isupper/$lower()/$upper()
to use consistent APIs.
19.Fixed $window().title returning incorrect results for some
windows.
20.Changed Control+Break to be more responsive.
21.Updated installer to backup files into dated folders in the
backups folder. Files that are in the root of the backups folder
and that match known installed filenames are moved into their own
dated folder. All unrecognized files and folders in the root of the
backups folder are left as is, in case the user has been putting
their own files or folders in there. The installer will keep the
last ten dated backup folders and will delete older ones.
22.Changed workaround for Windows 10 MDI caption bug so that it is
not applied during remote desktop sessions.
23.Fixed channel keys being saved incorrectly on Undernet ircds that
use * for hidden keys.
24.Updated OpenSSL library to v1.1.1h.
25.Fixed on CHAR event not being triggered in custom @window editbox
and listbox.
26.Updated CA root certificates cacert.pem file.
27.Changed how notices are displayed so that consecutive notices from
the same user are now grouped together.
28.Added protocol-relative redirect support to $urlget().
29.Changed $window().dw so that it now returns the printable width,
which can vary depending on window type, as opposed to the
client area.
30.Added $urlget() 'k' switch to prevent redirects.
31.Extended $width()/$height()/$wrap() to support parameter that
sets the bold, italic, control code, and tab options,
ie. $width(text,font,size,bipt) where each letter can be followed
by an N value of 0 or 1 to enable or disable it. The $wrap()
identifier also supports an option that enables word wrap,
ie. $wrap(text, font, size, width, biptw, N).
32.Changed $wrap() so that the 'p' option, enabled by default,
preserves control codes across wrapped lines.
33.Fixed $utfencode() memory gpf bug that caused intermittent
crashes.
34.Extended tab character support to all windows.
35.Added /drawtext -d option to disable tab support, which has
always been enabled by default.
36.Fixed /drawdot bug with certain dot sizes.
37.Added $min()/$max() .alpha/.alphacs/.alnum/.alnumcs properties.
38.Changed "Unable to join channel" message to include URL if one
is specified in the numeric.
39.Optimized display speed of long lines of text.
40.Added $window().fontdialogsize property.
41.Changed "Nick Colors" idle time option to update less frequently.
1 194,160 Read More
Feature Suggestions Jump to new posts
$icon() identifier Epic 22/11/20 05:09 PM
I suggest creating a new identifier $icon() – for to search for the existence of icons in a file and extract information about them by disassembling the file into parts. Because there seems to be nothing like this.

Syntax:$icon(filename,N).prop

filename – path and name file.
N – index number of the icon. Will show True or False depending on whether there is such an index or not. If N = 0, then show the total number of icons in the file.

Propertys:

.size – shows the size of the icon in pixels.
.weight – shows the weight of the icon in kilobytes.

Example:

Code
/set %ipath = C:\Windows\System32\shell32.dll

//echo -a $icon(%ipath,0) – $icon(%ipath,145) – $icon(%ipath,8).size – $icon(%ipath,21).weight

/return 321 – true – 32px – 2.38Kb


0 99 Read More
Feature Suggestions Jump to new posts
Re: Unnecessary Linesep between Notices Khaled 21/11/20 08:51 PM
Thanks this is actually due to a different change where I was trying to standardize the way separators are used across routines. It looks like this won't work in many contexts, so I will be reverting the extra separator change in the next beta.
8 556 Read More
Scripts & Popups Jump to new posts
Re: Path to add or change an icon in a dialog Epic 21/11/20 09:38 AM
Thanks for the extended answer. I read a similar topic from the link and this is almost the same idea what I want to implement in my script. Of course, it would be easier to use a separate icon file for each window without an index, but I also need to change the icon in the upper left corner on the fly, depending on the purpose of the dialog box. The only thing that I want to create a script using the available icons that everyone has by default, without using additional files, in order to have clean and manageable code. Accordingly, the option of using additional DLLs and files that the user does not have on his system by default is not suitable here. Otherwise, will have to archive the created script for transferring to other users with all the files additional to the code.

It would be much better if "K" would corrected fix this and provide such a simple opportunity to use the value of variables, where there will be a icon path and index separated by commas, because it seems to me that otherwise it won't work with any workaround available. And of course still need a command to quickly change the icon in the upper left corner after the dialog has already been created.

Need such a working variant, for example: "/set %iconpath = $mircexe,21" and then: "icon %iconpath" or "/set %iconpath = $mircexe | /set %iconindex = 21" and then: "icon %iconpath,%iconindex"

And to so that change icon: "/did -g MyDialog 0 [index] <icon path>"


7 233 Read More
Scripts & Popups Jump to new posts
Re: On Join/Part Flood maroon 19/11/20 06:22 PM
For your final example, it's good that it doesn't ban anyone. From human analysis, I can guess that these 4 are the same person, since I can see a pattern in how someone created the 4 nicks. However, as far as a script is concerned, these are 4 different IP's, so how's it supposed to know to ban them.

As for +R preventing unregistered users entering the channel, YES that's the whole purpose. The vast majority of users affected by +R are either people you don't want in your channel, or they're good users who don't have their client configured to have a long enough interval between identifying their password to nickserv and attempting to auto-join a channel. So when the channel becomes +R, their join attempt fails because nickserv sees the password after they try to join it.

The solution is for the 2nd group to fix their problem, rather than clutter the channel with attempts to ban the 1st group. In one of the recent mIRC versions, it added a little gap before autojoins, or you can see /help /autojoin -d<NUMBER>

There's a limit to how many bans can fit in the channel's ban list, so eventually you need to clean out older items before you can add new bans. Also, by random chance it's common for a 'good person' to happen to join shortly after another 'good person', but what you're wanting to do is create a ban in that situation. You're also wanting to create a ban when the server recovers from a netsplit and everyone on those servers finally is re-connected to the channel.

If you do have a +R mode, I think there's another channel mode which you can use to redirect the user to another channel rather than just having the join failure
6 308 Read More
Feature Suggestions Jump to new posts
Re: The idea of creating the "EditBar" Epic 17/11/20 12:09 PM
I created specifically for demonstration script, to show how the "EditBar" panel will look like cool

And recorded a Video -> so that show in mode online how this panel works: http://epicnet.ru/video/mIRC_EditBar_demo.webm

But one thing business to create it all with complex script construction structure having extensive experience in writing mIRC scripts, and another, if this will already be built into the client as an analogue of "ToolBar".

The presence of such a panel by default will be much more convenient for everyone who does not know how to write complex scripts, but would like to expand the functionality of their client by placing the necessary buttons on the bottom panel.

And then anyone can Enable or Disable this panel through the menu or by entering the command: /editbar <on|off>
5 248 Read More
Feature Suggestions Jump to new posts
Re: $min add'l sort orders Khaled 14/11/20 02:13 PM
Quote
1. I can't find any difference in the output between the new .props $min().text $max().text vs the prior .props of $min().alnum $max().alnum, so I'm wondering if these are 2 names for the same thing or is there an edge-case I'm missing?

I added .alnum/.alpha to make it clear what the options are. I will be removing .text from the documentation.

Quote
2. When comparing against aliases that used $sorttok to find min/max, where $min would be the 1st token and $max would be the final token, I've not found a variance in how $min behaves, but there is an edge case in how $max differs.

Here is what is happening:

$min(z Z) returns a case-insensitive (sorted from smallest to largest) list "z Z" and returns the first item.
$min(Z z) returns a case-insensitive (sorted from smallest to largest) list "Z z" and returns the first item.

$max(z Z) returns a case-insensitive (sorted from largest to smallest) list "z Z" and returns the first item.
$max(Z z) returns a case-insensitive (sorted from largest to smallest) list "Z z" and returns the first item.

$sorttok(z Z,32,a) returns a case-insensitive (sorted from smallest to largest) list "z Z".
$sorttok(Z z,32,a) returns a case-insensitive (sorted from smallest to largest) list "Z z".
2 242 Read More
Scripts & Popups Jump to new posts
Re: $window().fontsize vs font dialog size Protopia 14/11/20 11:57 AM
You could ask Khaled to implement $window().fontpoints to give the font size in points.

I am assuming that the ratio between fontsize and points is always fixed at 3:4.
5 232 Read More
Connection Issues Jump to new posts
Re: 'Improperly formatted auth' connecting to twitch Ex0dus13 13/11/20 10:13 PM
That absolutely worked!

First password field holds my oauth
connecting by Login Method SASL (/CAP)
second password field empty

Up and running, thanks a ton @maroon. You da MVP
2 157 Read More
Scripts & Popups Jump to new posts
Re: Alias colors per message or /me Dayvid 12/11/20 01:40 PM
Thanks Epic, I had repasted the script in so I guess that reset the settings earlier forgot them I'm really sorry about that. 100% my fault. Again, thanks so much for the time and effort.
17 474 Read More
Scripts & Popups Jump to new posts
Re: views.mdx click left mouse Epic 12/11/20 07:46 AM
I would recommend that you switch to this DLL to avoid delaying your project creation due to an unrecoverable error. Unfortunately, for this you have to write new code analogous to yours from scratch.
There is a good in HTML reference book for DCX. You can find his it on the internet. The latest version is desirable, or at least for DLL v1.4.1 and higher. The difference is in some fixes and command changes.
Taking advantage of free time and with a little diligence, you can easily learn how to write code using this DLL and then it will bring the fruits.
7 365 Read More
Feature Suggestions Jump to new posts
Re: Need a less messy way to set an hourly timer Talon 11/11/20 08:30 PM
here's a dumbed down version of what I did a while back for one of my projects where I needed a way to schedule tasks similar to the linux cron daemon. I had issues with timers and it randomly not triggering exactly on the second, It tended to vary from 00-02 at the maximum (although I do believe I rarely saw a :59 as well), so I used a multimedia timer, factoring in system ticks to derive the offset to get precisely on the second for every minute.

a cron job in linux starts with 5 tokenized positions, a command, and an optional output
[a] [b] [c] [d] [e] [command] [output]

Code
[a] - Minute 
[b] - Hour
[c] - Day
[d] - Month
[e] - Day of the Week


I wound up just tokenizing $asctime($ctime,n H d m ddd) so I could have minutes, hours (24), index of the day of the month, index of the month, and a 3 character representation of the day name, Sun,Mon,Tue.... Which gave me practically the same information to work with as a cron job, although I had to figure out evaluating rules to really mimic a cron daemon such as intervals "/" and ranges N-N, amongst other special characters like " * and , ".

If you're interested I can post the finalized project, but for sake of demonstration, this is HIGHLY stripped down just to demonstrate the execution perfectly on the minute.
Although this doesn't adjust for your situations like timezone swaps and daylight savings times, but it shouldn't be too messy to incorporate this.

To try it out, just use /crond

Code
alias crond { .timerCrond -ioh 0 1 crond.signal 1 }
alias -l crond.offset { return $calc((60 - (($ctime - $ticks / 1000) % 60) % 60) * 1000) }
alias -l crond.signal { if ($round($calc(($ticks / 1000) % 60),1) == 0) { .timerCrondSignal -h 1 $crond.offset .signal -n CRON } }
on *:SIGNAL:CRON: { echo -s Time Event: $asctime($ctime,hh:nn:ss tt) }


Result after running for some time (13 minutes):
Code
Time Event: 03:07:00 pm
Time Event: 03:08:00 pm
Time Event: 03:09:00 pm
Time Event: 03:10:00 pm
Time Event: 03:11:00 pm
Time Event: 03:12:00 pm
Time Event: 03:13:00 pm
Time Event: 03:14:00 pm
Time Event: 03:15:00 pm
Time Event: 03:16:00 pm
Time Event: 03:17:00 pm
Time Event: 03:18:00 pm
Time Event: 03:19:00 pm


Perfect execution on the minute! It may seem a bit excessive to use a multimedia timer on such a fast interval, but since it hardly does anything, it really isn't a performance hit, least none that I see on my system. Always signals exactly at a minute change, so effectively no adaptation would be needed within the code, only the signal event to handle your edge cases like moving timezones and daylight savings time adjustments. The signal event is where you'd want to code for your timed events anyways rather than setting a timer.

I use this for all sorts of nice things, like echoing day changes to all channel and query windows so I don't have that awkward instance of replying to a message at [xx:xx] coming to find out that it was a day or two ago at exactly that time, and no activity was within that window to indicate otherwise lol.

I also do it for scheduled maintenance and saving of various hash tables. There's a lot of usefulness to this and is robust much like your feature request. I hope it helps!
2 159 Read More
Scripts & Popups Jump to new posts
Re: Help on How to setup Hashtable Raccoon 11/11/20 05:26 PM
So I decided to rewrite those functions just to make them simple, fast and multi-purpose.
Here they are for anyone playing at home.

(Spoiler Alert)
Cheater
Code
; TokStrings are strings of space delimited colon separated item:value pairs.
; These functions allow you maintain lists of named values in a single variable.
; Limitations: Items and values *must not* contain spaces or colons.  Beware.
; There is no error checking for speed sake. If you feed in garbage you get garbage.
; 
; GetTokStr -- Get an item's value.
; $gettokstr(tokenstring, itemname) == value
; 
; SetTokStr -- Add, replace or delete an item and its value.
; $settokstr(tokenstring, itemname, [data]) == tokenstring
; 
; IncTokStr -- Increase or decrease an item's value.  Item is created if new.
; $inctokstr(tokenstring, itemname, [-]number) == tokenstring
; 
; $gettokstr(the:5 quick:3 brown:2 fox:7, fox)       == 7
; $settokstr(the:5 quick:3 brown:2, fox, 6)          == the:5 quick:3 brown:2 fox:6
; $settokstr(the:5 quick:3 brown:2 fox:7, brown, 4)  == the:5 quick:3 brown:4 fox:7
; $settokstr(the:5 quick:3 brown:2 fox:7, brown)     == the:5 quick:3 fox:7
; $inctokstr(the:5 quick:3 brown:2 fox:7, quick, -2) == the:5 quick:1 brown:2 fox:7

gettokstr {
  return $gettok($wildtok($1,$+($2,:*),1,32),2,58) 
} ; Raccoon 2020

settokstr {
  if ($3 != $null) {
    if ($wildtok($1,$+($2,:*),1,32)) {
      return $reptok($1,$v1,$+($2,:,$3),1,32)
    }
    return $addtok($1,$+($2,:,$3),32)
  }
  if ($wildtok($1,$+($2,:*),1,32)) {
    return $remtok($1,$v1,1,32)
  }
  return $1
} ; Raccoon 2020 speed

inctokstr {
  if ($wildtok($1,$+($2,:*),1,32)) {
    return $reptok($1,$v1,$+($2,:,$calc($gettok($v1,2,58) + $3)),1,32)
  }
  return $addtok($1,$+($2,:,$3),32)
} ; Raccoon 2020

; P.S. the Str might also stand for Structure. As in TokStructures.

10 404 Read More
Bug Reports Jump to new posts
Re: $wrap vs $width vs font-linking Khaled 11/11/20 09:28 AM
Thanks, I was able to reproduce the issue with both the edge case and the font-linking. These should be fixed in the next beta.
4 286 Read More
Scripts & Popups Jump to new posts
Re: Script causing wait lock on MIRC program Stephen 10/11/20 01:00 AM
Thank you both maroon and Epic for the replies. I did some testing using he debug coding. The issue seemed to be with the with the original writeini script that created the ini file data, I think because I was just populating so much data into the file (current size was 1.98 MB 84,164 lines (with spaces)) which for a ini file is well HUGE, that it was wait locking while trying to parse the single file to find the line within to update/read.

So I created some separate files to hold the more fluid data that is getting read and updated more often. so I blew the whole INI file away and started from scratch. I guess I could have taken the time to well rip the INI file apart to preserve the data but decided to let it repop in its own time. Currently with the fresh ini files the scripts are responding fine.

I had started the script out in its first write using several files to hold the data but decided to try and put it into one file. BAD idea I guess I didn't expect the sizing to blow up so fast
3 122 Read More
Scripts & Popups Jump to new posts
Re: I need help NiKaN 09/11/20 07:13 AM
Thank you for your help, but as I said, I have a mediocre English, and I don't know enough about mirc scripts.According to your instructions, it's going to take me a long time to do that.
I need to find a friend who will know this regularly it's hard to understand with this google translation.many thank you for your help
4 215 Read More
Scripts & Popups Jump to new posts
Re: Antibots quest & answer help Epic 07/11/20 09:31 PM
Please answer the clarifying questions to understand what script code you need:

1. Do you need protection at the stage when a user connects to your server?
2. Do you need protection at the stage when the user entered your channel?
3. Do you or your bot, on which this protection script will be installed, have IRCop rights or channel Operator rights?
4. What modes for temporary blocking of a user should the script enable during the verification of a suspected user?

Do you want to add something else on your own, what exactly and how should this script do for protection, so that the script author understands what and how needs to be done in the code to make it work?
2 152 Read More
Bug Reports Jump to new posts
Re: views.mdx click left mouse Protopia 06/11/20 11:36 AM
Just to clarify Khaled's response in case it helps:

1. mIRC provides a defined interface to DLLs which is mIRC-specific. It is the responsibility of the DLL author to ensure that their DLL conforms to the mIRC interface. Whilst Khaled generally makes every effort to preserve backwards compatability, the change from mIRC 6 to mIRC 7 was a very large and significant one to implement UTF support, so it may have been a necessary consequence as part of that, or it may have been an unintended consequence at some point.

2. It is further complicated by the fact that MDX is a DLL in its own right, and views.mdx is called from MDX. I have been unable to find either of these in a google search. But it is possible that there are later versions of these than the ones you are using if you are able to find them. But if there is anyone interested enough in helping you with this, they will need copies of the DLLs / MDX files that you are using as well as all the scripts that use them.

3. Apparently your mdx.dll and views.mdx files worked with mIRC 6.34 and doesn't work with mIRC 7.63. So at some point in the 12 years between August 2008 and August 2020, somewhere in the literally thousands of small updates to the mIRC code in those 12 years, something changed, and as we might imagine, it is probably a bit difficult for Khaled to track down which of these thousands of changes might have caused this.

4. Between 6.34 and 7.63 there have been lots of enhancements to mIRC dialog functionality - so it may be possible to replicate the same functionality without use of MDX / Views.mdx.

5. Looking at the Change Log I can see that there are 21 references to "dll" in versions later than 6.34, so it is possible that this might give TECO a hint as to what may have caused the DLL to stop working, though none of these 21 references jump out at me as likely to cause backwards incompatibility.
2 159 Read More
Feature Suggestions Jump to new posts
TTS Selection in /speak iamthemoose 05/11/20 04:01 AM
I'd love to be able to assign different voices to different users with the /speak command.
0 74 Read More
Page 1 of 16 1 2 3 15 16