mIRC Homepage
Posted By: Apocalypse Changing mIRC Default Directory - 27/07/08 01:46 PM
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.
Posted By: Horstl Re: Changing mIRC Default Directory - 27/07/08 02:00 PM
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
Posted By: Apocalypse Re: Changing mIRC Default Directory - 27/07/08 02:04 PM
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\
Posted By: Pivo Re: Changing mIRC Default Directory - 27/07/08 03:50 PM
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...
Posted By: Horstl Re: Changing mIRC Default Directory - 27/07/08 04:50 PM
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.
Posted By: Apocalypse Re: Changing mIRC Default Directory - 02/08/08 01:08 PM
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.
Posted By: Pivo Re: Changing mIRC Default Directory - 02/08/08 02:32 PM
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...
Posted By: Apocalypse Re: Changing mIRC Default Directory - 02/08/08 04:26 PM
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.
Posted By: Pivo Re: Changing mIRC Default Directory - 02/08/08 04:48 PM
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.
Posted By: Apocalypse Re: Changing mIRC Default Directory - 02/08/08 04:54 PM
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.
Posted By: argv0 Re: Changing mIRC Default Directory - 02/08/08 05:58 PM
You need to reload your popups, which may or may not be part of the script.
Posted By: Pivo Re: Changing mIRC Default Directory - 02/08/08 06:14 PM
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.)
Posted By: Apocalypse Re: Changing mIRC Default Directory - 03/08/08 12:42 PM
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
© mIRC Discussion Forums