mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2014
Posts: 48
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Jul 2014
Posts: 48
Alright, so I've come across a scenario. I'm making a few different scripts and putting them into separate remote script files.
I know mirc can load multiple and work off all of them at the same time. My question is, is it possible to write code in 1 remote script that can access code/commands/events in another?

Say I have a script that allows chat commands to add or remove users from a list saved into a text file. Is it possible to have another script in a different remote script that will be able to access the command to add the user to the file?

Would this be done by creating an alias for the command? Or would I just have to either combine the two into 1 script, or copy the add/remove code into the other?


I've tried looking this up in the help documentations, but it just makes me more confused, or I don't find relevant info.

Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
An alias can be accessed as either a command or identifier from any file.

I'm going to assume the "command" you're referring to is actually a text event. Have the text event call an alias, and call that same alias from anywhere else you want.

Joined: Jul 2014
Posts: 48
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Jul 2014
Posts: 48
alright cool. Yes, the command is an ontext event. I have a script for ontext event to add user to a list saved locally. I have another script that checks certain conditions of a user automatically when they join the channel, and then again when they leave channel. I want to be able to add them to the user list if certain conditions are met either when the join or when they leave, so they will be on the list by the next time they join the channel.

I can make an alias for doing that, and then call it from another script file?
I thought that was how I could do it, but couldn't seem to figure it out. Probably just mistyped the code, or made something local when it should be global.

Joined: Jul 2014
Posts: 48
A
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Jul 2014
Posts: 48
alias works, confirmed. Thank you.


Link Copied to Clipboard