mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2007
Posts: 31
P
piker Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Jan 2007
Posts: 31
is there any command to perform like /favorite add #room
per se or any script to do that? I can't seem to figure it out
thanks enourmously for your help

Joined: Jan 2007
Posts: 31
P
piker Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Jan 2007
Posts: 31
basically I want to create a popup menu on the channel popup that says "Add to favourites" and it adds to autojoin for the network I'm on.
then another that says "Organise favourites" and brings up the mirc favourites dialog

Joined: Jan 2007
Posts: 259
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Jan 2007
Posts: 259
I have searched, but I cannot find anything in the mIRC.chm file. Im pretty sure that there would be a way to do this, but im not sure if it is built in.

EDIT: My best idea would be to make a custom Favorites. That way you could make your own command to do it, and customize it to your liking. However, this would be my last resort.

Last edited by Kardafol; 08/01/07 04:10 PM.

Those who can, cannot. Those who cannot, can.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
All favorites are stored in mIRC.ini.

[chanfolder]
n**=#channel,"description",password,"network",join on connect (1 or blank),minimize on join (1 or blank)

Example:

n27=#Invision,"Invision's Official Channel",,IRCHighway,1

Notice that the password is emtpy because it has no password. And the minimize isn't there because I don't have that checked.

Now, I know you can't change mIRC.ini while it's running, or the changes will be lost when you restart mIRC. I know that you can create a batch file that will make the changes after mIRC closes and that's supposed to work (I've never tried it). There may also be a way to save the mIRC.ini while it's running. If so, I don't know the command.


Invision Support
#Invision on irc.irchighway.net
Joined: Dec 2006
Posts: 80
Babel fish
Offline
Babel fish
Joined: Dec 2006
Posts: 80
To add to auto-join, there is a dialog called 'Perform', in the 'Options' in the 'Connect' submenu in your mIRC options. You can type alias commands into that editbox, like /join #help. mIRC will perform those commands on connect to whatever server you choose. If you click on the Add button, a list of servers will come up, and you can add the commands you type in, for either one server, or all servers. mIRC will save whatever commands you choose, seperately, for each server.

I use the perform dialog to identify with NickServ on connect. It works nicely.

As for your mIRC favorites, you could write a seperate dialog if you wanted to, but there is one in your toolbar, and it contains an 'organize' button for editing preferences... I dont currently know of a command that would prompt that dialog, like if you wanted to put it in a channel popup, because it is just as quick to move the mouse up to the toolbar, accomplishing the same thing.



Scripto ---- Life is about the relationships. The correct code being: $replace($them,$you,$me)
Joined: Jan 2007
Posts: 31
P
piker Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Jan 2007
Posts: 31
Unless I make it to write in the mirc ini but the thing I got to figure out still is how can I add for specific networks =o

----------------------
in reply to the post of the perform command:
thank you for your suggestion but this is way more advanced than performs. What I'm looking for is to either prompt the add to favorites by right-clicking on the channel or to script my own thing that adds the channel im on to favorites and autojoin on connect by right clicking > add to favourites
=o

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Originally Posted By: piker
Unless I make it to write in the mirc ini but the thing I got to figure out still is how can I add for specific networks =o


Re-read what I wrote. smile

As I said, you cannot just write to the mIRC.ini file with /writeini. It isn't like normal INI files. As soon as you close mIRC, it will revert to the original. As I mentioned, a batch file that runs after you close mIRC would solve this problem and I think I heard of a way to save the changes properly in that INI file, but I don't remember how.

I also explained in that post how to set it up for specific networks. Look at the example.


Invision Support
#Invision on irc.irchighway.net
Joined: Jan 2007
Posts: 259
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Jan 2007
Posts: 259
A simple explenation of how that could work, could be:
Run mIRC through a .bat file that waits while mIRC is running, then replaces mIRC.ini with the edited one, or applies changes to mIRC.ini from another file, both occuring once mIRC closes.

.bat -> mIRC.exe (Waits untill close) -> Modify mIRC.ini -> Done
--or--
Run mIRC normally, then call a script that runs the .bat, in turn the .bat closes mIRC and applies the changes.
mIRC.exe -> Script function calls .bat -> .bat kills mIRC -> .bat modifies mIRC.ini -> Done

In my opinion, the first one should be more reliable than the second one. However, this would require for you to close mIRC after making the changes, unless you script it to read the modified mIRC.ini


Those who can, cannot. Those who cannot, can.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Yes, I know how to do it with a BAT file. What I was saying is that I think I remember a way to do it while in mIRC and then save the INI file so that the changes stick without having to use the BAT workaround. I just don't remember for sure.

I wouldn't mind a feature allowing us to change the mIRC.ini file while mIRC is running.


Invision Support
#Invision on irc.irchighway.net
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
Originally Posted By: Riamus2
As I said, you cannot just write to the mIRC.ini file with /writeini. It isn't like normal INI files. As soon as you close mIRC, it will revert to the original.


That doesn't happen, actually. The /writeini solution works fine here.

I've tested here with the code below:
Code:
alias test {
  writeini $qt($mircini) chanfolder n0 #editing_a_channel,,,"BRASnet",,,"BRASnet"
  writeini $qt($mircini) chanfolder n16 #adding_a_channel,,,"BRASnet",,,"BRASnet"
}


It works fine after I enter /test and it keeps the new data after I restart mIRC.
I don't have any ON EXIT event, by the way. Tested it with a clean mirc.ini (except for the [chanfolder] section copied from my own).


* cold edits his posts 24/7
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Interesting. I never have needed to edit it, so never tested it. I have seen various posts about it not keeping the data after exiting, though. Oh well, if it works with /writeini and keeps the data after exit, then it will be simple.


Invision Support
#Invision on irc.irchighway.net
Joined: Jan 2007
Posts: 31
P
piker Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Jan 2007
Posts: 31
Cold thanks!! do you think this might of work, though?
menu channel {
-
Add # To Favourites:{ writeini $qt($mircini) chanfolder n0 # $+ ,,, $+ " $+ $network $+ ",,,$+ " $+ $network $+ " | echo -at Some changes might need mIRC to restart to take effect. }
-
}

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Close. However, you can't just add to n0 or you'll erase the item that was there. Also, you seem to be adding everything twice to the line.

Code:
menu channel { 
  -
  Add # To Favourites:{ writeini $qt($mircini) chanfolder n $+ $ini($qt(mircini),chanfolder,0) # $+ ,,, $+ " $+ $network $+ " | echo -at Some changes might need mIRC to restart to take effect. }
  -
} 


That should do it. Also, you shouldn't require a restart for that change.


Invision Support
#Invision on irc.irchighway.net
Joined: Jan 2007
Posts: 31
P
piker Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Jan 2007
Posts: 31
It doesn't work ;(

Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
Are you sure? There's a typo in Riamus2's code ("mircini" instead of "$mircini"), have you noticed it?

Try this:
Code:
menu channel { 
  -
  Add # To Favourites:{
    writeini $qt($mircini) chanfolder n $+ $ini($mircini,chanfolder,0) # $+ ,,, $+ $qt($network)
    echo -at Some changes might need mIRC to restart to take effect.
  }
  -
}


* cold edits his posts 24/7
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
You're partly right, though. I don't know why, but the favourite channels are an exception to the mirc.ini rule.


* cold edits his posts 24/7
Joined: Jan 2007
Posts: 31
P
piker Offline OP
Ameglian cow
OP Offline
Ameglian cow
P
Joined: Jan 2007
Posts: 31
How can I make it so it joins them on connect? ^^

P.S: thanks a lot for your help both of you

Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
Use this instead:
Code:
menu channel { 
  -
  Add # To Favourites:{
    writeini $qt($mircini) chanfolder n $+ $ini($mircini,chanfolder,0) # $+ ,,, $+ $qt($network) $+ ,1
    echo -at Some changes might need mIRC to restart to take effect.
  }
  -
}


* cold edits his posts 24/7
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Oops. Missed that stupid $. smile

And, piker... if you READ what I originally explained, you would have known how to make it auto-join on connect. I explained every part of that ini line to you.


Invision Support
#Invision on irc.irchighway.net
Joined: Dec 2006
Posts: 80
Babel fish
Offline
Babel fish
Joined: Dec 2006
Posts: 80
There are days when simple sounds good.
There are days when simple sounds not so good.

*~* Scripto flips a coin *~*

Thanks for the test on that cold, I had not tried to write to that file. As a default file, i just always left it alone.

Interesting results... smile

I only chat in 2 channels anymore anyway... lol, is there a threshold on getting old?


Scripto ---- Life is about the relationships. The correct code being: $replace($them,$you,$me)

Link Copied to Clipboard