Jump to content

Mirc Accurate File Location


Guest Travis

Recommended Posts

Guest Travis

When mIRC changed to version 6.31 or 6.32 Khaled decided to support Windows Vista by making your default mirc directory in your Users\Application Data\Roaming folder ... Why? I haven't asked but I don't see any good reason for it.

 

Anyways, this can be a major pain in the butt when allowing others to use your scripts. I have seen other ideas in the past to deal with this but always ignored them until I had to deal with it. Now that I have to deal with it this is what I made.

 

alias dir { return $qt($+($nofile($mircexe),$1)) }

Ex: /run $dir(songs\file.mp3)

Using quotes ($qt) is up to you. I do that because some people like to runt heir mirc fromt he desktop.

 

I know other people had other ways of doing this ... Warrior ... Please add your solutions to this thread!

Edited by Travis
Link to comment
Share on other sites

Thanks for the snippet, Travis. I've found it quite frustrating myself but never bothered to work around it.

 

Cheers.

Link to comment
Share on other sites

You can use this code instead of $findfile to help you find files more easily, and faster...

 

alias ff {
  if (!%ff. [ $+ [ $1- ] ]) || (!$exists(%ff. [ $+ [ $1- ] ])) set %ff. [ $+ [ $1- ] ] $qt($longfn($findfile($nofile($mircexe),$1-,1)))
  return %ff. [ $+ [ $1- ] ]
}

 

To use type in something like...

 

echo -a $ff(mdx.dll)

[/code]

 

It will find mdx.dll, and echo its location.

 

Great work, Travis. :)

Edited by Warrior124
Link to comment
Share on other sites

Guest Travis

Thanks Warrior & likewise.

 

Well I was getting pretty pissed about how mIRC now handles it's settings files and found some answers that should help.

 

All of this code presented is unneeded.

 

$mircdir refers to where the mirc.ini file is. New mirc's default location is in your Application Data folder group. So if the mirc.ini for the mirc.exe you are using is in that folder group you will get that for your path.

 

But! If mirc.ini is in your script folder then mIRC will act like it always has.

 

Bottom line. As long as mirc.ini is in your script folder you dont have to worry about this "accurate file location" deal.

 

If mirc.ini isn't in your script folder and you would like it to be, follow the path to find the file and copy and paste it to the desired directory.

 

To find the file location use this. //echo -a $mircdir. This will point you there.

 

 

Link to comment
Share on other sites

Here is another code you can use...

 

on *:INPUT:*: {
  $eval($replace($1-,$chr(36) $+ mircdir,$nofile($mircexe)),2)
  haltdef
}

 

With this code you can still use $findfile($mircdir,mdx.dll,1) to reveal where mdx.dll in the correct mirc folder.

Edited by Warrior124
Link to comment
Share on other sites

It's not a change to support vista, it's a change to become an application that's compliant with Windows. If you run mIRC from a non administrator account then you may find that it doesn't have permission to write to the Program Files folder, however it IS allowed to write to the Application Data folder or Roaming folder.

 

The only thing that has changed is the location of the directory, you can still use $mircdir as long as everything has been installed correctly. You don't need to use the location of the exe.

Link to comment
Share on other sites

Guest Travis
20.For Vista compatibility, new installations of mIRC now save all

settings in the User's "Application Data\mIRC" folder by default.

 

However, if the installer or mIRC find mirc.ini in the same folder

as mirc.exe they will use the mirc.exe folder for all settings.

Users installing over an old version of mIRC should therefore see

no change in behaviour.

 

The installer is now also aware of administrator and standard user

accounts and installs mIRC accordingly.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...