mIRC Home    About    Download    Register    News    Help

Print Thread
2 Q's #89041 03/07/04 09:11 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
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... ?

Re: 2 Q's #89042 03/07/04 09:23 PM
Joined: Jun 2003
Posts: 5,024
M
Mentality Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
1. on *:start:{ if ($chr(32) isin $mircdir) { echo -a Message here } }

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

Regards,


Mentality/Chris
Re: 2 Q's #89043 03/07/04 09:25 PM
Joined: Oct 2003
Posts: 42
V
Voice_of_Power Offline
Ameglian cow
Offline
Ameglian cow
V
Joined: Oct 2003
Posts: 42
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!

Last edited by Voice_of_Power; 03/07/04 09:26 PM.
Re: 2 Q's #89044 03/07/04 09:30 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
okay, thanx to both

Re: 2 Q's #89045 03/07/04 10:44 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
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 ?




Re: 2 Q's #89046 03/07/04 10:53 PM
Joined: Oct 2003
Posts: 42
V
Voice_of_Power Offline
Ameglian cow
Offline
Ameglian cow
V
Joined: Oct 2003
Posts: 42
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

Re: 2 Q's #89047 03/07/04 10:58 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
"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)

Last edited by bunar; 03/07/04 11:00 PM.
Re: 2 Q's #89048 04/07/04 12:00 AM
Joined: Feb 2004
Posts: 54
Cyclone Offline
Babel fish
Offline
Babel fish
Joined: Feb 2004
Posts: 54
$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

Re: 2 Q's #89049 04/07/04 12:09 AM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
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...

Re: 2 Q's #89050 04/07/04 12:11 AM
Joined: Oct 2003
Posts: 42
V
Voice_of_Power Offline
Ameglian cow
Offline
Ameglian cow
V
Joined: Oct 2003
Posts: 42
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

Re: 2 Q's #89051 04/07/04 12:17 AM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
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 !!!!!!!!!!!!!!

Re: 2 Q's #89052 05/07/04 01:36 PM
Joined: Apr 2004
Posts: 759
M
Mpdreamz Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
you most likely have a space between $+ and (
make sure there isnt.


$maybe