mIRC Home    About    Download    Register    News    Help

Print Thread
#10572 11/02/03 02:24 AM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
i am having a little trouble understanding this command from the help all i got was minimal results the basic format that i got was
Code:
 
/writeini -n filename.ini
 


the help reads as such
Code:
 
/writeini -n <inifile> <section> <item> <value>
 

the <section> <item> <value> portion i dont understand
as an example of an ini file i would write to
Code:
 
Menu Channel,Nicklist {
Popups
.-
.Popup1:say blahblahblah
.-
.Popup2:say blahblahblah
.-
}
 

and so on
if anyone has time to breifly explain the process would be greatly appreciated
thx smile

#10573 11/02/03 02:26 AM
Joined: Jan 2003
Posts: 108
H
Vogon poet
Offline
Vogon poet
H
Joined: Jan 2003
Posts: 108
im not sure i understand that last bit of popup code, what are you trying to do?

#10574 11/02/03 02:33 AM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
i would like to use the /writeini command to add to the existing
ini file so i would want to add
Code:
  
.-
.Popup3:say blahblahblah

and then add popup4 and etc etc as needed

after reading the help again and again i am assuming the <section> would be Popups and the <item> would be .Popup4:
and the <value> would be the command line /say blahblah
but how would you insert the line seperater or is that not what this command is used for ?

ok i think i am understanding the /writeini command somewhat now and i dont believe its intended for this use i did come across the /bwrite command but once again i am unsure of its intended use ?

Last edited by Cheech; 11/02/03 04:31 AM.
#10575 11/02/03 05:06 AM
Joined: Jan 2003
Posts: 94
S
Babel fish
Offline
Babel fish
S
Joined: Jan 2003
Posts: 94
well the /writeini command is like this:

/writeini [-n] FILE SECTION ITEM VALUE
-n is optional, it will not convert your value (ie, return $gettok(h.i,1,44) instead of h)
File = the file
Section = the main section [section] that groups a catagory
Item = the item under the section (ie blah=...)
Value = what the item is.. (ie. blah=Hello everyone how are you?)

so if i type:
/writeini ex.ini BlahSection BlahItem And blah to all you good people!

would return in ex.ini:

[BlahSection]
BlahItem=And blah to all of you good people!




-
E-Mail: mirc_sabby@hotmail.com
Network: irc.enterthegame.com
Channel: #Helpdesk
#10576 11/02/03 10:42 PM
Joined: Dec 2002
Posts: 1,527
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
ok are u tryin to make a script installer or something is that way ur trying to write to the popup ini??? because as best as i can figure out that would be the only reason to write to there like ur sounding like ur suggesting ..... secondly if u are only tryin to make a popup then why use write ini at all why not just open up popup editor (from the toolbar on top) and add your popups in that way ..... again im still confused on what ur tryin to do with that section of ur post ..... if im wrong please clarify and maybe someone can give some better help


D3m0nnet.com
#10577 11/02/03 11:40 PM
Joined: Dec 2002
Posts: 332
C
Cheech Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Dec 2002
Posts: 332
actually i am trying to write to the ini file because i share some files with friends so i thought if the /writeini command would work i could update thiers a lil easier ?

#10578 12/02/03 12:37 AM
Joined: Dec 2002
Posts: 1,527
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
ahh ok then it all makes sense now ...... but since a popup ini isnt setup exactly like the writeini command is explained in the help file like the sections and all that it has .....

here is a small example u might use to say write in nicklist popup section

/writeini popup.ini lpopup control op:/mode # +ooo $$1

ok now only thing wrong with this format is this ..... From help file

/writeini -n <inifile> <section> <item> <value>
Writes to files in the standard INI file format.

If the -n switch is specified, mIRC will attempt to write to the .ini file even if it is larger than 64k.

A part of the mirc.ini file looks like this:

[DDE]
ServerStatus=on
ServiceName=mirc

You could achieve this with /writeini by using:

/writeini my.ini DDE ServerStatus on
/writeini my.ini DDE ServiceName mirc

You can delete whole sections or items by using the /remini command.

Warning: Do not use this command to modify any of the INI files currently being used by mIRC.

ok see the example ini file they show ....... now open a normal popups ini

[mpopup]
n0=Server
n1=.Lusers:/lusers
n2=.Motd:/motd
n3=.Time:/time
n4=.Map:/map
n5=.Links:/links


ok see how everything is numbered before it all well in order to technically update thier popups ini u have to i guess scan for a specific number in there as the <item> part of the writeini would be calling for ...... now i do not think write would be able to do what ur askin it to do either but heck i could be wrng too on that ...... altho if ur doing a specific script maybe just updating a new popup ini for them would be a bit easier...... gonna have to play arouind with this a bit and see as ive not tried this one before either


D3m0nnet.com
#10579 12/02/03 09:49 PM
Joined: Dec 2002
Posts: 1,527
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
ok ya know ive been tryin to figure out exactly how to answer ur question with this write inin thing for popups and the best solution i can think of is adding into a remote.mrc or .ini file something like this to make your popups

menu menubar,query,channel,status,nicklist {
POPUPSADDON
.onepopup:/command
.twopopup:/command
.newsection
..newsectiononepopup:/command
..newsectiontwopopup:/command
}

ok or instead of listing all u can put

menu * {
stuff here
}
or select where u want specifically these popups to go by using one or combinations of all of the first menioned items

anyhow that too me seems like the best way to actually add your stuff to thiers to me

in the popup menus u will then have the popups u want to share with them added to thier script just below any popup.ini popups they may have ..... organize how u want them just by putting each section in the normal list of what u want first ...... anyhow i hope that suggestion helps alil


D3m0nnet.com

Link Copied to Clipboard