mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jul 2008
Posts: 6
A
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.
Joined: Nov 2006
Posts: 1,559
H
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

Joined: Jul 2008
Posts: 6
A
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.
Joined: Jun 2008
Posts: 58
P
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...

Joined: Nov 2006
Posts: 1,559
H
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.

Joined: Jul 2008
Posts: 6
A
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.

Joined: Jun 2008
Posts: 58
P
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...

Joined: Jul 2008
Posts: 6
A
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.
Joined: Jun 2008
Posts: 58
P
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.

Joined: Jul 2008
Posts: 6
A
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.

Joined: Oct 2003
Posts: 3,918
A
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"
Joined: Jun 2008
Posts: 58
P
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.)

Joined: Jul 2008
Posts: 6
A
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.

Link Copied to Clipboard