mIRC Home    About    Download    Register    News    Help

Print Thread
Changing mIRC Default Directory #202654 27/07/08 01:46 PM
Joined: Jul 2008
Posts: 6
A
Apocalypse Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Jul 2008
Posts: 6
Lately I realized when loading some scipts that it always searches in C:\Documents and Settings\Chris\My Documents\ApplicationData\mIRC but that folder doesn't even exist is there anyway to change the default directory so that it will search on default when I use the command //load w/e in C:\Documents and Settings\Chris\My Documents\mIRC? Version is 6.3.

Last edited by Apocalypse; 27/07/08 02:16 PM.
Re: Changing mIRC Default Directory [Re: Apocalypse] #202655 27/07/08 02:00 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Have a look here for scriptdir vs mircdir. Note that your script(s) may need quotation marks arround a path name containing spaces (dependent on the command/identifyier you're using the path with). You can see the currently running mIRC version by clicking "about" in the help menu, or via //echo -a $version
smile

Re: Changing mIRC Default Directory [Re: Horstl] #202656 27/07/08 02:04 PM
Joined: Jul 2008
Posts: 6
A
Apocalypse Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Jul 2008
Posts: 6
The thing is my script has to write things to a folder that doesn't exist and I don't know how to change it to not use the default directory. So i want to use change the default directory it loads and writes etc. things to. When I use //echo $mircdir it tells me it is C:\Documents and Settings\Chris\Application Data\mIRC\

Last edited by Apocalypse; 27/07/08 02:05 PM.
Re: Changing mIRC Default Directory [Re: Apocalypse] #202658 27/07/08 03:50 PM
Joined: Jun 2008
Posts: 58
P
Pivo Offline
Babel fish
Offline
Babel fish
P
Joined: Jun 2008
Posts: 58
You can use the -r switch when starting the programm.
E.g. instead of just running mirc.exe, you could run mirc.exe -r"C:\mIRC" to make C:\mIRC your default directory.
Creating a shortcut might be the best solution for regular use...

Note that all files used by your current script (mirc.ini, all scriptfiles, all files that belong to your script) are located at your currently defaulted location, so it's practically impossible that this location does not exist - if so, mIRC would (try to) create it during every startup, putting all the default configuration in it.
I'm sorry, I do not know a way to change the default /load path only. (Well, a small script would do it... but thats not the point :P)
The -r solution changes the allround-default-location, for every option, command, identifier (except $mircexe and some others maybe), whatever...

Re: Changing mIRC Default Directory [Re: Apocalypse] #202663 27/07/08 04:50 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Originally Posted By: Apocalypse
The thing is my script has to write things to a folder that doesn't exist and I don't know how to change it to not use the default directory. So i want to use change the default directory (...)
You may create a subdirectory to load/safe data to...
For example, ".mkdir $+($mircdir,myaddon)" will create a \myaddon folder at the $mircdir location if he does not exist already, and whatever the $mircdir for your mirc - or someone else using that script - is.
Now you can direct your read/write routines to that directory, e.g. "write $qt($+($mircdir,myaddon\,myfile.txt)) sometext". I used $qt() to enclose the path to myfile.txt with quotation marks, due to possible spaces in path or filename.

Re: Changing mIRC Default Directory [Re: Pivo] #202911 02/08/08 01:08 PM
Joined: Jul 2008
Posts: 6
A
Apocalypse Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Jul 2008
Posts: 6
Originally Posted By: Pivo
You can use the -r switch when starting the programm.
E.g. instead of just running mirc.exe, you could run mirc.exe -r"C:\mIRC" to make C:\mIRC your default directory.
Creating a shortcut might be the best solution for regular use...

Note that all files used by your current script (mirc.ini, all scriptfiles, all files that belong to your script) are located at your currently defaulted location, so it's practically impossible that this location does not exist - if so, mIRC would (try to) create it during every startup, putting all the default configuration in it.
I'm sorry, I do not know a way to change the default /load path only. (Well, a small script would do it... but thats not the point :P)
The -r solution changes the allround-default-location, for every option, command, identifier (except $mircexe and some others maybe), whatever...

I tried the run -r mirc.exe thing but i got an error
/run: unable to open file 'mirc.exe'
And horstl I don't really understand what you just said.

Re: Changing mIRC Default Directory [Re: Apocalypse] #202913 02/08/08 02:32 PM
Joined: Jun 2008
Posts: 58
P
Pivo Offline
Babel fish
Offline
Babel fish
P
Joined: Jun 2008
Posts: 58
Let's say you want your new default directory to be C:\default and your mIRC.exe is here: C:\mIRC\mirc.exe.
Then you create a shortcut with the following data:

(Sorry, that text is in German, but I guess my point is clear.)
If not..
//run $mircexe -r"C:\default"
If you type that in mIRC, you will run a 2nd mIRC with C:\default as your default directory, where mirc.ini and such will be stored...

Re: Changing mIRC Default Directory [Re: Pivo] #202916 02/08/08 04:26 PM
Joined: Jul 2008
Posts: 6
A
Apocalypse Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Jul 2008
Posts: 6
It works except when I right click on windows in mIRC I no longer get a pop up menu. Any idea why?correction I no longer get the pop up for the script I'm using and I can't reload it properly link for script - http://www.globalgamers.net/?s=support&p=files its i.vhost Also I don't get the proper commands when I click on the username list either.

Last edited by Apocalypse; 02/08/08 04:39 PM.
Re: Changing mIRC Default Directory [Re: Apocalypse] #202917 02/08/08 04:48 PM
Joined: Jun 2008
Posts: 58
P
Pivo Offline
Babel fish
Offline
Babel fish
P
Joined: Jun 2008
Posts: 58
Thats because you changed your default directory wink
All files that are responsible for those functions are located in that default directory and loaded in your mirc.ini.
By changing that directory without copying those files to the new one, you lose all your settings, scripts, popups, aliases, ...
Thats why I already said; It's impossible that $mircdir is empty.

Re: Changing mIRC Default Directory [Re: Pivo] #202918 02/08/08 04:54 PM
Joined: Jul 2008
Posts: 6
A
Apocalypse Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Jul 2008
Posts: 6
Anyway to get it so that it will show that pop up for the users like query etc. as well as my script I did reload my script but still nothing.

Re: Changing mIRC Default Directory [Re: Apocalypse] #202920 02/08/08 05:58 PM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
You need to reload your popups, which may or may not be part of the script.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: Changing mIRC Default Directory [Re: argv0] #202921 02/08/08 06:14 PM
Joined: Jun 2008
Posts: 58
P
Pivo Offline
Babel fish
Offline
Babel fish
P
Joined: Jun 2008
Posts: 58
I guess, this is the wrong solution for you anyway...
Your problem was the loading of scripts and that they could not be found..
You asked for changing the default directory, but the one chosen by mIRC must exist... Otherwise, you would lose all your settings, scripts, popups, aliases and everything else on every startup.

Maybe you just have to make hidden folders visible... (Application Data is a hidden directory.)

Re: Changing mIRC Default Directory [Re: Pivo] #202946 03/08/08 12:42 PM
Joined: Jul 2008
Posts: 6
A
Apocalypse Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Jul 2008
Posts: 6
Ok and then I could just put my script in that directory and it would work?
Edit I copy pasted everything from mIRC under Application data and everything works great thanks for the help laugh

Last edited by Apocalypse; 03/08/08 12:48 PM.