mIRC Home    About    Download    Register    News    Help

Print Thread
#22895 07/05/03 03:50 AM
Joined: May 2003
Posts: 12
J
junx Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: May 2003
Posts: 12
basically i was wondering if there was away to a $$?="" alone and not have it identified as a command without putting var or echo in front of it.. maybe another $?="" $?!="" type.. $?.="" maybe? or $?%="" even?

what i was talking about

hopefully that link to the other thread works..if not, its in the scripts topic under $$?="" prob thread


-junx
#22896 07/05/03 03:53 AM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Why exactly would that be useful? If you don't store/print the result, then the result would be discarded. So you would have to prompt the user for the reason again.

#22897 07/05/03 03:55 AM
Joined: May 2003
Posts: 12
J
junx Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: May 2003
Posts: 12
so i can $! later on in the line of code


-junx
#22898 07/05/03 03:58 AM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
So what is the difference between doing that and doing var %blah = $$? then using %blah? I don't see why your suggestion would be useful. All it would do is change the way mIRC handles things just so you don't have to use /var?

#22899 07/05/03 04:04 AM
Joined: May 2003
Posts: 12
J
junx Offline OP
Pikka bird
OP Offline
Pikka bird
J
Joined: May 2003
Posts: 12
IT'LL BE A SHORT CUT FOR US LAZY PPL WHO DONT WANNA PUT A VAR ON EACH LINE OF CODE..O;


-junx
#22900 07/05/03 05:41 AM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Lazy indeed.

I suppose you would argue that the following also demands too much effort.

ALIAS msgbox var %nul = $?!=" $+ $1 $+ "

then simply /msgbox YATTA!
even use /mb to make it shorter.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#22901 07/05/03 12:17 PM
Joined: Dec 2002
Posts: 39
L
Ameglian cow
Offline
Ameglian cow
L
Joined: Dec 2002
Posts: 39
also, this is annoying:
var %tmp = $input(Error code,ow,Error)

#22902 07/05/03 02:17 PM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
If you look at the thread the poster referred to, you'd see there's already a way of getting rid of the output: !.echo -q <text>.

It's usually useful when making $regsub() substitutions or $filefile() loop with a fourth (command/@window) parameter, because we're not always interested in the numeric values returned by them.

For example,
Code:
alias remhtml {
  ; //echo -a $remhtml(&lt;p&gt;text&lt;/p&gt;)
  var %a
  !.echo -q $regsub($1-,/&amp;\S+?;|^.*?&gt;|&lt;.*?&gt;|&lt;.*?$/g,,%a) 
  return %a
}
 
alias flist {
  ; /flist
  !.echo -q $findfile($mircdir,*,0,echo -a $1-)
}

For some reason, he doesn't like it. He wants an implementation of a new comamnd (or special prefix) which will evaluate the content and drop the output. Perhaps /nul or something.


Link Copied to Clipboard