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
Display/show gif -- /drawgif Wims 17/04/26 09:57 PM
This code can be used to show a gif in a picture window, it auto loops and auto clean itself if you close the window:

To create/initiate the gif, use $drawgif(@win,x y,filename,cbalias,w h,customdelay)
It will return an ID value which can then be used to pause, resume, and delete the gif animation

pause: /drawgif -p <id>
resume: /drawgif -r <id>
delete: /drawgif -d <id>

'cbalias' is a callback alias called when the gif is finished, if not specified, the gif auto loops, if specified, the alias is called as an identifier, if you return something non-0 (non-$false and non-$null), it auto loops.
'w h' can be used to strech/squeeze into that bitmap size
'customdelay' will ignore the gif's delays and use that constant time (millisecond) between frames.


alias drawgif {
if ($prop) {
var %h drawgif $+ $1,%f $hget(%h,frame),%delay $hget(%h,cdelay)
if (%delay == $null) %delay = $pic($hget(%h,filename),%f).delay
if ($hget(%h,wh)) drawpic -os $hget(%h,wxy) $v1 %f $hget(%h,filename)
else drawpic -o $hget(%h,wxy) %f $hget(%h,filename)
.timerdrawgif $+ $1 -ho 1 %delay noop $!drawgif( $1 ).draw
if ($calc(%f + 1) >= $pic($hget(%h,filename)).frames) {
if ($hget(%h,cbalias)) {
if ($($+($,$v1,$chr(40),$1,$chr(41)),2)) hadd drawgif $+ $1 frame 0
else {
.timerdrawgif $+ $1 off
hfree drawgif $+ $1
}
}
else hadd drawgif $+ $1 frame 0
}
else hinc drawgif $+ $1 frame
return
:error
if (*invalid window* iswm $error) {
reseterror
.timerdrawgif $+ $1 off
hfree drawgif $+ $1
return
}
}
if ($$1 === -p) .timerdrawgif $+ $$2 -P
elseif ($$1 === -r) .timerdrawgif $+ $$2 -r
elseif ($$1 == -d) {
.timerdrawgif $+ $$2 off
hfree drawgif $+ $2
}
else {
var %t $ticksqpc
hadd -m drawgif $+ %t wxy $1-2
hadd drawgif $+ %t frame 0
hadd drawgif $+ %t filename $3
hadd drawgif $+ %t cbalias $4
hadd drawgif $+ %t wh $5
hadd drawgif $+ %t cdelay $6
.timer -ho 1 0 noop $!drawgif( %t ).draw
return %t
}
}


Example

alias mayo {
window -depo @test 0 0 800 900
echo -sg $drawgif(@test,0 0,C:\Users\Ouims\Downloads\gm1.gif,gifend)
}
alias gifend echo -sg gif ended | return 1
0 35 Read More
General Discussion Jump to new posts
mIRCHub - A github alike but for mIRC Scripting Piratoshi 10/04/26 02:45 PM
Hello everyone. Hello Khaled!

I was thinking, mIRC came from a time when communities like github didn't exists yet.
But considering now we have such tools avaliable, wouldn't be cool to have a github alike but for mIRC Scripting code only?!
a mIRCHub, similar to github.
And if it would be possible to upload our scripting codes to this mIRCHub directly from a button in the "Scripts" dialog in mirc.exe
So we can keep code updated on mIRCHub sync to our scripting in mIRC.exe
I feel that we as a community would benefit a lot from a virtual place where we all can share our mIRC scripting codes if we want to as we edit them in our mIRC client.
What do you all think about this idea?

btw, have a good weekend 🕺
0 107 Read More
Developers Jump to new posts
mIRC Language Extension for Visual Studio 2022+ goblin58 01/04/26 07:39 AM
I'm happy to release my mIRC language extension for Visual Studio 2022+.

I mostly work in Visual Studio and recently while working on some dynamic link library projects I found myself swapping from Visual Studio to VS Code all the time. I still use VS Code for most of mIRC scripting however It's nice to be able to stay in the one IDE.

I hope everyone finds this useful.

See https://github.com/rabbit59/mIRCLanguageExtension
0 183 Read More
Feature Suggestions Jump to new posts
CHGHOST on/off TECO 28/03/26 05:00 PM
Hi Khaled,

I suggest that, since CHGHOST in mIRC is not enabled by default, a command be created for it, like this:

/CHGHOST on/off

Or add a check to the mIRC options.

This would allow us to see a message in the channels where we are and where the user who changes hosts is also located.

Example:

18:51 TECO [TECO@vhost.cferreira.org] changed host to TECO@suporte.PTirc.org

I think this suggestion would make accessing CHGHOST easier without us having to resort to creating code like the one I created and posted here on the forum.

Hug wink
0 152 Read More
Scripts & Popups Jump to new posts
CHGHOST TECO 27/03/26 01:54 PM
Hi guys,

I would like to know if anyone can help me.

I need the CHGHOST event message.

I've been researching and mIRC, by default, doesn't show a message when a user changes hosts.

I debug the mIRC and found this information:

<- @time=2026-03-27T12:55:56.782Z :Tiago!Tiago@vhost.cferreira.org CHGHOST Tiago suporte.PTirc.org
<- @time=2026-03-27T13:28:35.041Z :Tiago!Tiago@suporte.PTirc.org CHGHOST Tiago vhost.cferreira.org

And I needed that whenever the user switches accounts, it shows both the previous and the new account:

Example:

12:34 · Tiago [Tiago@vhost.cferreira.org] has changed host to Tiago@suporte.PTirc.org

I created this code:
Code
alias pcb { echo $1 $+ $msgstamp $2- }

raw CHGHOST:*:{
  var %c = 1
  while ($comchan($nick,%c)) {
    pcb -i5mt $v1 · $nick has changed host to $+($nick,@,$2)
    inc %c
  }
}

And in the channels where I am and the user is also present, the message appears like this:

12:24 · Tiago has changed host to Tiago@suporte.PTirc.org
12:25 · Tiago has changed host to Tiago@vhost.cferreira.org

However, I can't find a solution to make the previous host appear in the message.

I would appreciate it if someone could help me wink

I found the solution:
Code
alias pcb { echo $1 $+ $msgstamp $2- }

raw CHGHOST:*:{
  var %c = 1, %oldmask = $gettok($fulladdress,2,33), %ident = $gettok(%oldmask,1,64), %newmask = $+(%ident,@,$2)
  while ($comchan($nick,%c)) {
    pcb -i5mt $v1 · $nick ( $+ %oldmask $+ ) has changed host to %newmask
    inc %c
  }
  haltdef
}

Return:

18:51 · Tiago (~Tiago@vhost.cferreira.org) has changed host to ~Tiago@suporte.PTirc.org
0 162 Read More
Scripts & Popups Jump to new posts
On Join HadesSaint 24/03/26 06:31 PM
good evening!!! on my remote.partjoin i have this

{ putmessaget # %chatjoincolor *** $nick ( $+ $gettok($address($nick,5),2,33) $+ ) is joined the channel # *** | halt }

*** pippo (ident@host) is joined the channel #pippo ***

i like, if possibile, insert the country variable on join (i'm Oper)

Example:

*** pippo (ident@host) [ES] is joined the channel #pippo


I haven't found a var $country

Tnk y for help smile
0 128 Read More
Scripts & Popups Jump to new posts
[Release] Xhtml.dll v1.0.0 – HTML Engine & Runtime 3ncriptado 22/03/26 05:51 PM
Xhtml.dll v1.0.0 – Modern Web Browser Engine for mIRC

Xhtml.dll is a modern replacement for the legacy nhtml.dll, bringing the power of Microsoft Edge WebView2 (Chromium) directly into mIRC.

It allows you to embed fully functional web browsers inside mIRC windows with full support for modern web technologies.


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Features
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

- Modern Web Engine (Edge WebView2 / Chromium)
- Full Web Standards Support (HTML5, CSS3, ES6+, WebGL, WebAssembly)
- Framework Compatible (React, Vue, Angular, etc.)
- Full Mouse & Keyboard Interaction
- Resizable Browser Windows
- Multiple Instances Support
- Simple and Clean API for mIRC
- Drop-in Replacement for nhtml.dll


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Requirements
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

- Windows 10 / 11
- mIRC 7.x or later
- Microsoft Edge WebView2 Runtime


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 Quick Start
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Installation:

1. Download Xhtml.dll
2. Copy it to your mIRC root folder
3. Install WebView2 Runtime if not installed
4. Load the script:

/load -rs scripts/xhtml.mrc


Basic Usage:

; Open a URL
/xhtml https://www.google.com

; Close the browser
/xhtml.close


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📚 API (Core Functions)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

attach -> Attach WebView2 to a window
navigate -> Navigate to a URL
detach -> Detach and cleanup
resize -> Resize browser
goback -> Navigate back
goforward -> Navigate forward
refresh -> Reload page
stop -> Stop loading
geturl -> Get current URL


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧪 Example
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

alias mybrowser {
window -pdoks @MyBrowser 100 100 1200 800
dll Xhtml.dll attach $window(@MyBrowser).hwnd
.timer 1 2 dll Xhtml.dll navigate https://github.com
}


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🆚 Why Xhtml.dll?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

- Uses Chromium instead of Internet Explorer
- Supports modern JavaScript
- Works with modern frameworks
- Actively maintained
- Designed for real-world web usage inside mIRC


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ Notes
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

- Wait 2–3 seconds after attach before navigate
- Make sure WebView2 Runtime is installed
- Use correct architecture (x86 / x64)


━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔗 Project
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

REPO: GitHub

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Made with ❤️ for the mIRC community
0 124 Read More