mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
dialogs again AAAAA #56309 20/10/03 02:38 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
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

Re: dialogs again AAAAA #56310 20/10/03 02:41 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
btw it is for mirc 6.03 version ....

Re: dialogs again AAAAA #56311 20/10/03 03:07 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
You have to check the value of the %var for that id:
Code:
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..
Code:
if (%var == $true) { did -c DIALOG ID }


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: dialogs again AAAAA #56312 20/10/03 03:17 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
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 } }

Re: dialogs again AAAAA #56313 20/10/03 03:26 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Sep 2003
Posts: 584
ok, thanx both i'll try and see what will be

Re: dialogs again AAAAA #56314 20/10/03 03:38 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
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 ! ??

Re: dialogs again AAAAA #56315 20/10/03 03:45 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Offline
Hoopy frood
I
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 }

Re: dialogs again AAAAA #56316 20/10/03 05:41 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
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....

Re: dialogs again AAAAA #56317 20/10/03 06:08 PM
Joined: Dec 2002
Posts: 417
O
Othello Offline
Fjord artisan
Offline
Fjord artisan
O
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....
Re: dialogs again AAAAA #56318 20/10/03 06:35 PM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
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.

Re: dialogs again AAAAA #56319 20/10/03 06:55 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
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

Re: dialogs again AAAAA #56320 20/10/03 08:30 PM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
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.

Re: dialogs again AAAAA #56321 20/10/03 08:41 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
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

Re: dialogs again AAAAA #56322 20/10/03 08:47 PM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline
Hoopy frood
Offline
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
Re: dialogs again AAAAA #56323 20/10/03 08:54 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
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 frown

Re: dialogs again AAAAA #56324 20/10/03 08:58 PM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline
Hoopy frood
Offline
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
Re: dialogs again AAAAA #56325 20/10/03 09:17 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
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

Re: dialogs again AAAAA #56326 20/10/03 09:30 PM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline
Hoopy frood
Offline
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
Re: dialogs again AAAAA #56327 20/10/03 09:49 PM
Joined: Sep 2003
Posts: 584
B
bunar Offline OP
Fjord artisan
OP Offline
Fjord artisan
B
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.
Re: dialogs again AAAAA #56328 20/10/03 10:00 PM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline
Hoopy frood
Offline
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
Page 1 of 2 1 2