mIRC Home    About    Download    Register    News    Help

Print Thread
Scripting create an ini file? #249004 10/11/14 07:35 AM
Joined: Oct 2014
Posts: 42
K
Kooky Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Oct 2014
Posts: 42
So I have this script working to tell the person that the file has been made, but the file itself is not being created. Can anyone help? I want the file to be the $nick

Code:
on *:text:!Name*:#MyRoom: { 
  writeini -n $qt(F:\MyBot\Myfile) $nick $+ .ini $nick Name $2-
  writeini -n $qt(F:\MyBot\Myfile) $nick $+ .ini Register Name on
  notice $nick Your character name is registered. Step 2: $2- $+ , Get ready for more!
}

Re: Scripting create an ini file? [Re: Kooky] #249005 10/11/14 08:45 AM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
You need to set $nick $+ .ini as part of the path. Your current path is F:\MyBot\Myfile

I guess what you're looking for is F:\MyBot\ $+ $nick $+ .ini


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: Scripting create an ini file? [Re: Nillen] #249010 11/11/14 01:29 AM
Joined: Oct 2014
Posts: 42
K
Kooky Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Oct 2014
Posts: 42
Well I think I modified it how you suggested, but it's still not working.

Code:
on *:text:!Name*:#MyRoom: { 
  writeini -n $qt(F:\MyBot\ $+ $nick $+ .ini) Name $2-
  writeini -n $qt(F:\MyBot\ $+ $nick $+ .ini) Register Name on
  notice $nick Your character name is registered. Step 2: $2- $+ , Get ready for more!
}

Re: Scripting create an ini file? [Re: Kooky] #249030 11/11/14 11:07 PM
Joined: Oct 2014
Posts: 42
K
Kooky Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Oct 2014
Posts: 42
If it helps any, I'm using mIRC v6.2 for the shell of my bot.

Re: Scripting create an ini file? [Re: Kooky] #249031 11/11/14 11:14 PM
Joined: Dec 2008
Posts: 1,511
westor Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,511
6.2 ? since 2000 version we have 2014 LOL!!! there is 7.36 and 7.37 beta man please go and update your mirc version ! immediately!!!!!!

Re: Scripting create an ini file? [Re: westor] #249032 11/11/14 11:40 PM
Joined: Oct 2014
Posts: 42
K
Kooky Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Oct 2014
Posts: 42
I can't. I selected this version because no matter what I do, no matter what drive I install my bot onto, it overrides my other mIRC files located elsewhere and I lose my stuff. This version is the only version that doesn't happen with.

Re: Scripting create an ini file? [Re: Kooky] #249033 11/11/14 11:43 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Let me just ask the most basic question, did you check the portable option when installing?


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: Scripting create an ini file? [Re: Kooky] #249034 11/11/14 11:44 PM
Joined: Dec 2008
Posts: 1,511
westor Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,511
Try install the 7.36 and create an folder on the desktop and select the path on the install to this folder when you install select the "Install as Portable" option on the installer so the new mIRC will be created on the desktop to your new folder try replace the new mIRC.exe with the old that your bot is using. and the update will be success with not loses anything.

Re: Scripting create an ini file? [Re: westor] #249036 11/11/14 11:55 PM
Joined: Oct 2014
Posts: 42
K
Kooky Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Oct 2014
Posts: 42
Went through, updated it to the newest version as a portable.

Still the same issue. Not writing an ini.

Re: Scripting create an ini file? [Re: Kooky] #249037 12/11/14 12:16 AM
Joined: Dec 2008
Posts: 1,511
westor Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,511
Does it provide you an error message if yes please paste it here.

Re: Scripting create an ini file? [Re: westor] #249041 12/11/14 01:52 AM
Joined: Oct 2014
Posts: 42
K
Kooky Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Oct 2014
Posts: 42
No error message. Just nothing at all.

I'm using mIRC v7.36

Edit.. On toying around, this comes up:

* /writeini: insufficient parameters (line 2, script.ini)
-
* /writeini: insufficient parameters (line 2, script.ini)


Last edited by Kooky; 12/11/14 02:20 AM.
Re: Scripting create an ini file? [Re: Kooky] #249052 12/11/14 03:40 PM
Joined: Dec 2008
Posts: 1,511
westor Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,511
Well probably the path is incorrect F:/Mybot... so try using this code it will store the register.ini file with the details that you want, it is also much safer rather the $nick $+ .ini file because there will be devices and /writeini issues because windows cannot write an file that exist on devices and if the $nick is an machine device there will be an unfixable error and will brake the code.

Code:
ON *:TEXT:!Name*:#MyRoom: { 
  writeini -n register.ini $chan $+ ~ $+ $nick Name $2-
  writeini -n register.ini $chan $+ ~ $+ $nick Register on
  notice $nick Your character name is registered. Step 2: $2- $+ , Get ready for more!
}

Re: Scripting create an ini file? [Re: westor] #249069 13/11/14 01:46 AM
Joined: Oct 2014
Posts: 42
K
Kooky Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Oct 2014
Posts: 42
But I'm trying to create an ini file for the character that's being registered, not just alter the register file. Because it's going to be used by multiple people, so multiple files need to be made, and names will be added to my register file.

Re: Scripting create an ini file? [Re: Kooky] #249086 14/11/14 05:03 AM
Joined: Oct 2014
Posts: 42
K
Kooky Offline OP
Ameglian cow
OP Offline
Ameglian cow
K
Joined: Oct 2014
Posts: 42
Plus I could alter it into a .chr or .txt file and that would help.

Re: Scripting create an ini file? [Re: Kooky] #249090 14/11/14 02:36 PM
Joined: Dec 2008
Posts: 1,511
westor Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,511
The code i gave you working on multi nicknames if you want to write an extra line follow the /writeini command and replace the write things with yours.

Help Details: /help /writeini