|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2003
Posts: 584 |
okay i made now better script for my "user settings" -> description: you edit your $nick, $anick, $fullname and identd ID with enableing ident/disableing it
this is code:
alias perstg { dialog -m perstg perstg }
dialog perstg { title "Personal User Settings" size -1 -1 167 108 option dbu box " User Settings ", 1, 5 5 157 97 text "Current nick:", 2, 11 20 34 8 text "Alternate nick:", 3, 11 35 36 8 text "Full (IRC) name:", 4, 11 50 41 8 text "Identd ID:", 5, 11 66 26 8 edit "", 6, 56 19 100 10 edit "", 7, 56 34 100 10 edit "", 8, 56 49 100 10 edit "", 9, 56 66 23 10 check "Enable Identd Server", 13, 90 68 60 8 button "Cancel", 10, 124 85 32 12, cancel flat button "Apply", 11, 55 85 32 12, ok flat button "Reset", 12, 89 85 32 12, flat }
on *:DIALOG:perstg:init:*:{
if (%nick != $null) { did -a perstg 6 %nick } if (%anick != $null) { did -a perstg 7 %anick } if (%fname != $null) { did -a perstg 8 %fname } if (%id != $null) { did -a perstg 9 %id } }
on *:dialog:perstg:sclick:*:{
if ($did = 13) { if (%identd = Off) { did -u perstg 13 | .set %ident Off | elseif { %identd = On | did -c perstg 13 | .set %ident On } } }
}
if ($did = 11) { %nick = $did(6) | .nick %nick %anick = $did(7) | .anick %anick %fname = $did(8) | .fullname %fname %id = $did(9) | .identd on %id if (%identd = On) { did -c perstg 13 | .identd on %id | elseif { %identd = Off | did -u perstg 13 | .identd off } } }
if ($did = 12) { %nick = %nick | did -r perstg 6 | did -a perstg 6 Guest91236 | .set %nick Guest91236 | .nick Guest91236 %anick = %anick | did -r perstg 7 | did -a perstg 7 Guest8264 | .set %anick Guest8264 | .anick Guest8264 %fname = %fname | did -r perstg 8 | did -a perstg 8 ~ | .set %fname ~ | .fullname ~ %id = %id | did -r perstg 9 | did -a perstg 9 id | .set %id id | .identd on id | .timer 1 3 .identd off %identd = On | did -c perstd 13
}
it worked GREAT until i added checkbox for identd server On/Off and now nothing wont work and i cant control with checkbox that identd (when it will go on or off)
someone wise please help
|
|
|
|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2003
Posts: 584 |
btw it is for mirc 6.03 version ....
|
|
|
|
Joined: Feb 2003
Posts: 3,432
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,432 |
You have to check the value of the %var for that id:
if ($did == ID) { if (%var == $true) set %var $false | elseif (%var == $false) set %var $true }
that is when you check the box.. then you have to have somthing on init..
if (%var == $true) { did -c DIALOG ID }
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
Check the brackets "("+")", braces "{"+"}" and pipes "|" on these lines:
if ($did = 13) { if (%identd = Off) { did -u perstg 13 | .set %ident Off | elseif { %identd = On | did -c perstg 13 | .set %ident On } } }
And
if (%identd = On) { did -c perstg 13 | .identd on %id | elseif { %identd = Off | did -u perstg 13 | .identd off } }
|
|
|
|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2003
Posts: 584 |
ok, thanx both i'll try and see what will be
|
|
|
|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2003
Posts: 584 |
ah, crappy crap, i really dont know how to make it work ! i tried to fix something with brackets but this check box is giving me pain in the arse :[ can some1 PLEASE help me in details ! ??
|
|
|
|
Joined: Aug 2003
Posts: 1,831
Hoopy frood
|
Hoopy frood
Joined: Aug 2003
Posts: 1,831 |
I'm not going to go through it all, but here is those two lines with ONLY the bracket/brace/pipe fixes
if ($did = 13) { if (%identd = Off) { did -u perstg 13 | .set %ident Off } | else { did -c perstg 13 | .set %ident On } }
if (%identd = On) { did -c perstg 13 | .identd on %id } | else { did -u perstg 13 | .identd off }
|
|
|
|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2003
Posts: 584 |
bah.... 0% of help, how can you help me/i can learn anything if no1 wont help me in details and tell me all steps i dunno...
!PS! those brackets not changing anything....
|
|
|
|
Joined: Dec 2002
Posts: 417
Fjord artisan
|
Fjord artisan
Joined: Dec 2002
Posts: 417 |
looks like you have a few things covered. Just a suggestion on a few added features for your script. mirc offers users modes wich can be added to this dialog window.
+/- R sets your access to restricted. +/- I makes yourself invisible +/- O 2gives IRC-Operator status +/- S lets you receive server notices +/- W makes you receive wallops messages to IRC-Ops
Although not all these modes are intended for regular end users. there are some that would be most helpful. Like R and I modes
Intelligence: It's better to ask a stupid question, then to prove it by not asking....
|
|
|
|
Joined: Dec 2002
Posts: 3,138
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,138 |
mIRC doesn't offer these modes, servers do, and the same mode letters can mean different things on different servers.
|
|
|
|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2003
Posts: 584 |
lol, i already have dialog for modes and modes depends on network so...
i just wanna help with that damn checkbox that activates /ident on/off
nothing else
|
|
|
|
Joined: Dec 2002
Posts: 1,922
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,922 |
The problem in the code is simple: the closing brace of the sclick event is placed incorrectly. Instead of having it under the if ($did = 13) line, move it to the bottom of the page.
|
|
|
|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2003
Posts: 584 |
okay, 1 step closer but with bugs..
it can only make /identd on but checkbox dont stay checked and i cant turn it off ( WHEN identd is on i cant remove it thru dialog) more help would be nice
|
|
|
|
Joined: Dec 2002
Posts: 1,527
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,527 |
set something like this into your init dialog settings if ($readini(mirc.ini,ident,active) == yes ) { did -c $dname ID }
that should take into account it is a checkbox and check it if it is enabled when u open the dialog
D3m0nnet.com
|
|
|
|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2003
Posts: 584 |
sounds nice, but i try to have less script files, thatz why i added %identd and %id var's... cant it be solved thru that... i mean i pasted very easy dialog with so small code but i know that i am boring with this whyning but if some1 could just help me thru vars with that checkbox i would be happier than ever, coz i already looked 1 script that uses check box but i really havent understund a thing so i tried to do as much on my own and as you can see i failed
|
|
|
|
Joined: Dec 2002
Posts: 1,527
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,527 |
unless there is som internal mirc identifier like $identd which tells u whether its infact on or off no its not possible anyother way to get that check box ticked on initial opening. secondly uve added all these variable using how many lines of code? yet i gave u ONE line that does it quite easily. and using that method u could even read what your ident was set to? how is it im introducing more code than u think u have? personally i think your variable method for this is extremely more code than is even worth the effort. granted variables are faster than readini but by defualt mirc reads that ini in its idnted request process why is it such a big thing?
D3m0nnet.com
|
|
|
|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2003
Posts: 584 |
okay you made your point you are indeed smarter but dont spit on me... i never said that i'm expert in mirc ! i told that any help is great and i only asked for some detailed help on checkbox AND yes my dialog is stupid coz itz lame and for newbs but i dont care coz i do it for my needs not for other ppl
+ i didnt rejected your code, i just dunno how to use it thatz all and i never said that itz more code than mine
|
|
|
|
Joined: Dec 2002
Posts: 1,527
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,527 |
i think your missing my point. i am not saying your idea is lame ... u asked for a workable method and i gave it to u. u could also just use your %id variable and replace the readini method .. really its not so hard a concept to grasp now is it? here is a slight example of it
on *:DIALOG:perstg:init:*:{
if (%nick != $null) { did -a perstg 6 %nick } if (%anick != $null) { did -a perstg 7 %anick } if (%fname != $null) { did -a perstg 8 %fname } if (%id != $null) { did -a perstg 9 %id } if (%id == ON) { did -c perstg 13 } }
thats pretty simple method to add to your script to make it check that once u open the dialog dont u think? i added one line to your code i didnot however go thru the rest of your code and make any changes to it to ensure it works.
Last edited by _D3m0n_; 20/10/03 09:59 PM.
D3m0nnet.com
|
|
|
|
Joined: Sep 2003
Posts: 584
Fjord artisan
|
OP
Fjord artisan
Joined: Sep 2003
Posts: 584 |
okay, i appreciate your honesty and help, now just tell me how to set it up in dialog, i see that it echos as NO/YES,
Last edited by bunar; 20/10/03 09:52 PM.
|
|
|
|
Joined: Dec 2002
Posts: 1,527
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,527 |
see the above post thats how it should show checked or unchecked on init..... just simply add one line to it and it should return what u want
D3m0nnet.com
|
|
|
|
|