mIRC Home    About    Download    Register    News    Help

Topic Options
#89041 - 03/07/04 10:11 PM 2 Q's
bunar Offline
Fjord artisan

Registered: 27/09/03
Posts: 584
Loc: bogu iza nogu
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... ?
_________________________
Life Sux Then You Die !

Top
#89042 - 03/07/04 10:23 PM Re: 2 Q's
Mentality Offline
Planetary brain

Registered: 01/06/03
Posts: 5024
Loc: London, England
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

Top
#89043 - 03/07/04 10:25 PM Re: 2 Q's
Voice_of_Power Offline
Ameglian cow

Registered: 15/10/03
Posts: 42
Loc: The Netherlands
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!


Edited by Voice_of_Power (03/07/04 10:26 PM)

Top
#89044 - 03/07/04 10:30 PM Re: 2 Q's
bunar Offline
Fjord artisan

Registered: 27/09/03
Posts: 584
Loc: bogu iza nogu
okay, thanx to both
_________________________
Life Sux Then You Die !

Top
#89045 - 03/07/04 11:44 PM Re: 2 Q's
bunar Offline
Fjord artisan

Registered: 27/09/03
Posts: 584
Loc: bogu iza nogu
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 ?



_________________________
Life Sux Then You Die !

Top
#89046 - 03/07/04 11:53 PM Re: 2 Q's
Voice_of_Power Offline
Ameglian cow

Registered: 15/10/03
Posts: 42
Loc: The Netherlands
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

Top
#89047 - 03/07/04 11:58 PM Re: 2 Q's
bunar Offline
Fjord artisan

Registered: 27/09/03
Posts: 584
Loc: bogu iza nogu
"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)


Edited by bunar (04/07/04 12:00 AM)
_________________________
Life Sux Then You Die !

Top
#89048 - 04/07/04 01:00 AM Re: 2 Q's
Cyclone Offline
Babel fish

Registered: 06/02/04
Posts: 54
Loc: Cleveland, UK
$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

Top
#89049 - 04/07/04 01:09 AM Re: 2 Q's
bunar Offline
Fjord artisan

Registered: 27/09/03
Posts: 584
Loc: bogu iza nogu
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...
_________________________
Life Sux Then You Die !

Top
#89050 - 04/07/04 01:11 AM Re: 2 Q's
Voice_of_Power Offline
Ameglian cow

Registered: 15/10/03
Posts: 42
Loc: The Netherlands
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

Top
#89051 - 04/07/04 01:17 AM Re: 2 Q's
bunar Offline
Fjord artisan

Registered: 27/09/03
Posts: 584
Loc: bogu iza nogu
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 !!!!!!!!!!!!!!
_________________________
Life Sux Then You Die !

Top
#89052 - 05/07/04 02:36 PM Re: 2 Q's
Mpdreamz Offline
Hoopy frood

Registered: 27/04/04
Posts: 759
Loc: Arnhem, The Netherlands
you most likely have a space between $+ and (
make sure there isnt.
_________________________
$maybe

Top