mIRC Homepage

2 Q's

Posted By: bunar

2 Q's - 03/07/04 09:11 PM

all this is for mirc 6.03

1. is there a way for ON START event for mirc to check if it is in "spaced" dir like Program Files, so it can echo warning for scripts that wont work in such dir ?

2. can mirc SOMEHOW call scripts if they are in compressed file like RAR, ZIP, etc... ?
Posted By: Mentality

Re: 2 Q's - 03/07/04 09:23 PM

1. on *:start:{ if ($chr(32) isin $mircdir) { echo -a Message here } }

2. Not sure, sorry. Not that I know of at least.

Regards,
Posted By: Voice_of_Power

Re: 2 Q's - 03/07/04 09:25 PM

1. Yes, simply make an if statement like this:

Code:
if ($chr(32) isin $mircexe) { }

32 is the ascii value for a space character.

Though, if you do it right, mIRC will work fine with (single) spaces. If you use a filepath in a command, simply put it in between quotes (" "), or use $shortfn. And identifiers don't have problems with spaces at all.


2. It may be possible with binvars, but I'm not to familiar with them so I'm not sure, I would imagine it wouldn't be as simple as just using $read. You could try finding a DLL which is built to unzip/unrar certain cabinets.


Edit: two seconds.. d'oh!
Posted By: bunar

Re: 2 Q's - 03/07/04 09:30 PM

okay, thanx to both
Posted By: bunar

Re: 2 Q's - 03/07/04 10:44 PM

now a little addon, i made that "warning" thing, so i tested it (offcourse) AND when script was in program files i got this errors:


* /dll: unable to open 'C:\PROGRAM' (line 29, start.mrc)
* /dll: unable to open 'C:\PROGRAM' (line 31, start.mrc)

so i looked up and this is code in those lines:

alias vewst { return $mircdirsystem\dlls\mircustom.dll }
alias titleb { dll $vewst Titlebar $1- }

thing i wonder is, what should i enter in this code so it dont fill Status with dll errors (like some halt event) if script is in spaced dir...

any ideas ?



Posted By: Voice_of_Power

Re: 2 Q's - 03/07/04 10:53 PM

Code:
alias vewst { return $+(",$mircdirsystem\dlls\mircustom.dll,") }


Just for the record, it might not be a good idea to use $mircdir, try using $scriptdir instead. wink
Posted By: bunar

Re: 2 Q's - 03/07/04 10:58 PM

"Just for the record, it might not be a good idea to use $mircdir, try using $scriptdir instead."

whatz the diff ?

btw: i get this now:


* /return(",$mircdirsystem\dlls\mircustom.dll,"): not connected to server (line 30, start.mrc)
Posted By: Cyclone

Re: 2 Q's - 04/07/04 12:00 AM

$scriptdirmy_file.mrc = $mircdir $+ directory\my_file.mrc

$mircdir
Returns the current directory of the mIRC program.

$scriptdir
Returns the directory of the currently executing remote script.

If other people are like me, I hate to use the $mircdir to load and run scripts from. $scriptdir is the working directory of your currently executing $script.

Hope this helps... smile
Posted By: bunar

Re: 2 Q's - 04/07/04 12:09 AM

well in my case itz the same (looking on problem)
$mircdirsystem = $scriptdir so itz no matter to me what identificator it is...

problem still stands...
Posted By: Voice_of_Power

Re: 2 Q's - 04/07/04 12:11 AM

Looks like you put the return command and the filename together, making it one (non-existant) command. Try copy-pasting the thing I gave ya wink
Posted By: bunar

Re: 2 Q's - 04/07/04 12:17 AM

hmm now i call this weird case
in 1st try i copy/pasted your code and i got this
return $+( unknown command

and i thought you mean binding so i did return $+ (...

and i got
* /return(",$mircdirsystem\dlls\mircustom.dll,"): not connected to server (line 30, start.mrc)

and NOW i returned to previous (1st) and it works...

weird weird...

anyhows i thank you much !!!!!!!!!!!!!!
Posted By: Mpdreamz

Re: 2 Q's - 05/07/04 01:36 PM

you most likely have a space between $+ and (
make sure there isnt.
© 2021 mIRC Discussion Forums