mIRC Home    About    Download    Register    News    Help

Print Thread
#82695 11/05/04 08:34 AM
Joined: May 2004
Posts: 14
F
fskolog Offline OP
Pikka bird
OP Offline
Pikka bird
F
Joined: May 2004
Posts: 14
here is a script i put together from a bit of code that was on the string (string) mr. collective showed me when i asked about an easy way of changeing the format. I basicly just added the UI stuff so i can give this to ppl who dont realy like to script. Im still learning to write this thingies for mirc and im interested what are the uglies in this one:)

thanx in advance for any input on this

format nicks v1.0 laugh

on *:LOAD: {
set %nfprefix <
set %nfsufix >
dialog -mor nickformat nickformat
}

on *:UNLOAD: {
unset %nf*
}

on *:input:*:{
if /* !iswm $$1 && (# || $query($target)) {
echo -ati6 $+(%nfprefix,$nick,%nfsufix) $1-
.msg $ifmatch $1-
haltdef
}
}
on ^*:text:*:*:echo -mbfli6t $iif(#,#,$nick) $+(%nfprefix,$nick,%nfsufix) $strip($1-,mo) | halt

dialog nickformat {
title "nick format"
size -1 -1 95 35
option dbu
edit ">", 2, 55 5 35 10
edit "<", 1, 5 5 35 10, right
text "nick", 3, 43 6 12 9
button "OK", 5, 5 20 25 10, ok
button "Help", 4, 65 20 25 10
button "Cancel", 6, 35 20 25 10, cancel
}

dialog help {
title "Nick Format Help"
size -1 -1 164 114
option dbu
edit "", 1, 2 2 160 110, read multi
}

on *:dialog:nickformat:init:0: {
did -o $dname 1 1 %nfprefix
did -o $dname 2 1 %nfsufix
}

on *:dialog:nickformat:sclick:4: {
dialog -am help help
did -i help 1 1 U can edit the format by either entering the prefix and sufix
did -i help 1 2 in the dialog, or useing the comand:
did -i help 1 3
did -i help 1 4 /nickformat [prefix] [sufix]
did -i help 1 5
did -i help 1 6 If you dont specify any parameters Mirc will open the dialog.
did -i help 1 7
did -i help 1 8 You can also use the 'Nick Format' menu item in the commands
did -i help 1 9 menu of the Mirc menubar.
did -i help 1 10
did -i help 1 11 Usage:
did -i help 1 12 /nickformat ( )
did -i help 1 13 gives: (Nick)
did -i help 1 14 /nickformat 3 5:
did -i help 1 15 gives: Nick: (Nick in color 3 and : in color 5)
did -i help 1 14
}

on *:dialog:nickformat:sclick:5: {
set %nfprefix $did(1)
set %nfsufix $did(2)
}

alias nickformat {
if (!$1) dialog -amo nickformat nickformat | else { set %nfprefix $1 | set %nfsufix $2 }
}

menu menubar {
Nick Format: nickformat

Last edited by fskolog; 11/05/04 08:35 AM.
#82696 12/05/04 05:27 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
If you want evaluations of your code, I suggest submitting it to a scripting archive on the web such as http://www.mircscripts.org. This forum is not intended for sharing your scripts.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#82697 12/05/04 12:43 PM
Joined: May 2004
Posts: 14
F
fskolog Offline OP
Pikka bird
OP Offline
Pikka bird
F
Joined: May 2004
Posts: 14
Well im new here and i have seen posts like this on the board, so i thought i would give it a shot:D. I will not do it again:).

#82698 12/05/04 07:22 PM
Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
Quote:
If you want evaluations of your code, I suggest submitting it to a scripting archive on the web such as http://www.mircscripts.org. This forum is not intended for sharing your scripts.

Good luck though. I tried to submit a small bit of code and it was rejected a few times with one of the reasons being that I used the "/*" and "*/" style of commenting instead of using ";" for comments.

#82699 12/05/04 07:24 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Mine did too, one of the reviewers don't realise that /* and */ are comments now.
His reason was "don't use php comments -> /* */, use mirc comments -> ;"


New username: hixxy
#82700 12/05/04 07:37 PM
Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
I resubmitted and specified, in the description, that /* and */ are valid forms of commenting.

Another reason I got rejected (seperate time but for the exact same snippet) is that it is using /halt in it. But my usage of /halt is intentional (I prefer to use /return whenever possible, but there are times when halting the script or code is necessary).

It's like the reviewers aren't reading the script or the intent, but more of glancing for key codes to reject for.. ctrl-f "halt", ctrl-f "/*", ctrl-f "*/" - if found, reject.


Link Copied to Clipboard