mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2012
Posts: 47
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Apr 2012
Posts: 47
$scriptdir or $mircdir or move all files in the path ... \AppData\Roaming\mIRC that are created during the 'mIRC installation? That is the question!

I have a problem during the 'execution of my script, and I noticed from the posts of the forum on the network that there are many who have this problem.

If the script is loaded into a mirc folder that contains all the files including mirc.ini and works well.

If you own the original location of installation of mIRC has the problem of the location of the file is created twice as a duplicate of the folder that the script in
C:\ProgramFiles(x86)\mIRC is replicated in \AppData\Roaming\mIRC\myscript

Problem is with the operation of dcx.dll and path of the file .Ico and .Cur

As regards the dcx.dll:
If loaded in C:\ProgramFiles(x86)\mIRC returns the 'error on the wrong path.

Like other dlls, if done in \AppData\Roaming\mIRC\ myscript is loaded correctly (the 'alias that calls the dll uses $scriptdir as an identifier of the route)

With regard to the location of icons and cursors, if present in the path C:\ProgramFiles(x86)\mIRC\theme\ico load correctly.

If you load from the path ... \AppData\Roaming\mIRC does not work because the directory requires various privileges and other reasons known ...

Basically I need to run my script in a modified folder that contains all the files in a single folder that does not have the name ... \AppData\Roaming\ mIRC, where I can use both the 'identifier $scriptdir and even $mircdir.

How do I solve this problem in order to take advantage of my script plug-in for users who install mIRC from setup.exe?

Here the script that has the problem if installed in the original mIRC ---> mIRC GUI 8

http://www.hawkee.com/scripts/29301671/

Last edited by DEATHJ0KER; 02/10/12 03:42 PM.
Joined: Oct 2004
Posts: 8,061
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Oct 2004
Posts: 8,061
Scripts that properly support placing the script anywhere you want should have no problems using the AppData folder. And $scriptdir and $mircdir work correctly as they are. $scriptdir will point to wherever the script is loaded from and $mircdir will point to wherever the mIRC.ini is located. If the script is written poorly, it might be using these two incorrectly and is looking for the script in $mircdir instead of $scriptdir or something like that.

You can have all scripts in your mIRC folder (or a subfolder) if you want and still have mIRC.ini and other mIRC settings files in the AppData folder. The script just needs to properly handle the location. For a third party script, your best option is to contact the author with your problem and have them fix the script to properly handle the path problem you are having.

Joined: Apr 2012
Posts: 47
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Apr 2012
Posts: 47
This is my script addon, that uses the dcx dll, I'm saying that with $ scriptdir some dll are not loaded ... is not a problem of script code, the problem is that duplicates the mirc folder in this case "dlls" in the path AppData\Roaming\mIRC. In this case you can also use $scriptdir, but the path will not duplicate anything.
mIRC looks for the dll which has the mirc.ini but I have the files in the scripts folder programs

Why should duplicatethe folders in AppData\Roaming\mIRC?

This is the 'alias for the dll
Code:
 alias dcx {
  if (%dcx_conflict) { echo 4 -s [DCX ERROR] Dll Conflict, Trying to load multiple copies of DCX: $+(06,$qt($dll(dcx.dll)),) and $+(03,$qt($scriptdir $+ dcx\dcx.dll),) | halt }
  if ($isid) returnex $dll($scriptdir $+ dcx\dcx.dll,$1,$2-)
  else dll " $+ $scriptdir $+ dcx\dcx.dll" $1 $2-
}
 

Last edited by DEATHJ0KER; 02/10/12 11:29 PM.
Joined: Apr 2012
Posts: 47
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Apr 2012
Posts: 47
The 'alias owner of dcx.dll only works if the folder and \AppData\Roaming\mIRC

I do not know what to invent ...$shortfn($scriptdir) $+ LoL

Joined: Apr 2012
Posts: 47
D
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Apr 2012
Posts: 47
Originally Posted By: DEATHJ0KER
I tried a code snipped a bit 'dated but effective on Windows 8 x64, for those who use the file to the original location of installation mirc.ini

The code of 'alias that allows you to specify the path [\AppData\Roaming\mIRC] is in this link

http://www.hawkee.com/snippet/1614/

Code:
  alias dcx {
  if (%dcx_conflict) { echo 4 -s [DCX ERROR] Dll Conflict, Trying to load multiple copies of DCX: $+(06,$qt($dll(dcx.dll)),) and $+(03,$qt($specialfolder(userprofile) $+ \AppData\Roaming\mIRC\ $+ dcx\dcx.dll),) | halt }
  if ($isid) returnex $dll($specialfolder(userprofile) $+ \AppData\Roaming\mIRC\ $+ dcx\dcx.dll,$1,$2-)
  else dll " $+ $specialfolder(userprofile) $+ \AppData\Roaming\mIRC\ $+ dcx\dcx.dll" $1 $2-
} 


Last edited by DEATHJ0KER; 04/10/12 09:12 PM.

Link Copied to Clipboard