mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2011
Posts: 23
Q
Quinch Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Nov 2011
Posts: 23
Is there a way to disable the "file has been changed, reload from disk" popup? I'm not too fond of editing scripts in the native editor, but every time I edit and save the script in a text editor, that pops up. Is there an option or some other way to default it to "yes, and stop asking"?

Is there a command to execute a series of commands from a file? Something akin to perform, but executable via command or script? So far I've managed to do it via while loops, but a more elegant solution wouldn't hurt.


Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
ALT + R , Options , Monitor file changes


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Nov 2011
Posts: 23
Q
Quinch Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Nov 2011
Posts: 23
But will that automatically use whatever changes I've made when I try to run the script?

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
No. You need to reload scripts manually if you're not using the script editor.

Coincidentally, you can actually write a script to handle this, though:

Code:
ON *:APPACTIVE:/reload -rs filename.mrc


Or you can have that loop through $script(N) to reload them all. It will trigger whenever you switch back to mIRC, so you can comment it out when you're not writing code. Note that /reload doesn't trigger ON START/LOAD events, you would have to /load to get that.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Nov 2011
Posts: 23
Q
Quinch Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Nov 2011
Posts: 23
Alrighty, I'll give it a crack. I'm assuming filename.mrc is a placeholder for whatever file I want to reload?

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Yes, it is.


Invision Support
#Invision on irc.irchighway.net
Joined: Nov 2011
Posts: 23
Q
Quinch Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Nov 2011
Posts: 23
Another question along a similar vein - is it possible to have mIRC "monitor" a file for changes so that when an outside program changes or creates that file, the script reacts?

Or - and this is probably a longshot - is it possible to send commands from an outside program to mIRC without needing to feed them via an intermediary file? I figure the more steps I can bypass, the less possible breaking points I have.

Joined: Nov 2011
Posts: 23
Q
Quinch Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Nov 2011
Posts: 23
Originally Posted By: Riamus2
Yes, it is.


Hmm, then I might be missing something. I entered

Code:
ON *:APPACTIVE:/reload -rs aliases.ini


in the Remote tag and

Code:
/test {
  echo Herpderp
  echo Bluhbluhhugescript.
}


under Aliases. But when I change one of those echos in Notepad, nothing changes when I /test.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
He gave you a script to reload Remote scripts, not aliases. To reload aliases, use -a instead of -rs. To see what switches to use for each type of file, use /help /load .


Invision Support
#Invision on irc.irchighway.net
Joined: Nov 2011
Posts: 23
Q
Quinch Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Nov 2011
Posts: 23
Okay, that works. Any ideas on the other stuff? If you're wondering why, I'm hoping to set up an outside script that handles a bunch of stuff I can't see myself pulling off with mIRC script, like emailing logs on request, fetching URLs, a makeshift billboard and so on, so the plan is to watch the activity logs mIRC writes, chew that data if any triggers come up, then spit up a list of commands for mIRC to process.

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
To answer the 2nd part, see:

/help SendMessage
and
/help DDE


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Nov 2011
Posts: 23
Q
Quinch Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Nov 2011
Posts: 23
Hmm, AutoIt might not suppord DDE... would COM work?

Edit: A quick foray into /help says yes. It seems a little out of my depth for now, though - can you point me to some examples of SendMessage?

Last edited by Quinch; 01/01/12 05:02 PM.
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
It depends on the language you're using, but mirc sendmessage on google has a lot of results. Also: http://www.mirc.org/mishbox/tutorials/dllhelp.htm#s9


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Nov 2011
Posts: 23
Q
Quinch Offline OP
Ameglian cow
OP Offline
Ameglian cow
Q
Joined: Nov 2011
Posts: 23
Yeah, but google searching is almost all duds in the context of "sending a message", rather than the command itself.

AutoIt seems to have built-in SendMessage functionality, but after a day of trying, I've had no luck. The frustrating part is that the parameters in mIRC and AU3's help file look similar and I suspect it's just a matter of different terminology for the same things - but damn if I can quite get a hold of it. Would it help if I pasted AutoIt's own help page on SendMessage here, see if anyone can tell me what's what?


Link Copied to Clipboard