mIRC Home    About    Download    Register    News    Help

Print Thread
#94400 16/08/04 05:16 AM
Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
i was wondering if this script works..

Code:
 dialog Xlogin {
   title "X-Login 1.0"
   size -1 -1 181 159
   option dbu
   box "X-Login:", 1, 6 1 169 33
   edit "", 2, 36 9 52 10, autohs center
   text "Username:", 3, 10 10 25 8
   text "Password:", 4, 91 10 26 8
   edit "", 5, 119 9 52 10, pass autohs center
   button "Login Now", 16, 126 21 45 10
   check "Login on Connect", 7, 10 21 53 10
   button "Clear All", 8, 86 21 38 10
   button "Close", 9, 144 148 36 10, cancel
}
on *:dialog:Xlogin:init:0: {
  did -a xlogin 2 %Xlogin.username
  did -a xlogin 5 %Xlogin.password
  if (%Xlogin.login == on) { did -c Xlogin 7 }
}
on *:dialog:Xlogin:edit:*: {
  if ($did == 2) { set %Xlogin.username $did(Xlogin,2).text }
  if ($did == 5) { set %Xlogin.password $did(Xlogin,5).text }
}
#login off
on *:CONNECT: {
  if (%Xlogin.login == on) { msg x@channels.undernet.org login %Xlogin.username %Xlogin.password }
  elseif (%Xlogin.login == off) { halt }
}
on *:dialog:xlogin:sclick:*: {
if ($did == 8) { unset %xlogin.username | unset %xlogin.password | did -r xlogin 2,5 }
}
menu menubar {
  login 
   .X-Login:xlogin -m xlogin xlogin } 


it doesn't show on the menubar... so i can't test it to see if it works..
as you can see it's a undernet x login script the uses vars to store the info for login.. but like i said i can't figure out whats wrong..
any input would be appreciated

#94401 16/08/04 11:21 AM
Joined: Aug 2003
Posts: 314
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
Your menu is inside the group #login which looks as if it's disabled, this stops the menu from appearing in the menubar. Simply move it out of the group, put it above the #login off line. You might want to do this with your other dialog event too.

Also, use the /dialog command to open a dialog, unless you have a /xlogin alias that acts as /dialog and performs other commands.

#94402 16/08/04 02:58 PM
Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
okay thanks for the tip on the dialog events being under the #login off. but i'm not sure i follow on how you mean about the /dialog caommand..
here's what i got now..

Code:
 on *:load: {
  echo -a 9*** 12AwSuMovies X-Login 1.0 successfully loaded...
  echo -a 9*** 12Created for AwSuMovies
   }
 /dialog -m Xlogin {
   title "X-Login 1.0"
   size -1 -1 181 159
   option dbu
   box "X-Login:", 1, 6 1 169 33
   edit "", 2, 36 9 52 10, autohs center
   text "Username:", 3, 10 10 25 8
   text "Password:", 4, 91 10 26 8
   edit "", 5, 119 9 52 10, pass autohs center
   button "Login Now", 16, 126 21 45 10
   check "Login on Connect", 7, 10 21 53 10
   button "Clear All", 8, 86 21 38 10
   button "Close", 9, 144 148 36 10, cancel
}
 on *:dialog:Xlogin:init:0: {
  did -a xlogin 2 %Xlogin.username
  did -a xlogin 5 %Xlogin.password
  if (%Xlogin.login == on) { did -c Xlogin 7 }
}
 on *:dialog:Xlogin:edit:*: {
  if ($did == 2) { set %Xlogin.username $did(Xlogin,2).text }
  if ($did == 5) { set %Xlogin.password $did(Xlogin,5).text }
} 
 on *:dialog:xlogin:sclick:*: {
  if ($did == 8) { unset %xlogin.username | unset %xlogin.password | did -r xlogin 2,5 }
}
 menu menubar {
  AwSuMovies 
   .X-Login:xlogin xlogin xlogin }
} 
#login off
 on *:CONNECT: {
  if (%Xlogin.login == on) { msg x@channels.undernet.org login %Xlogin.username %Xlogin.password }
  elseif (%Xlogin.login == off) { halt }
}
  

#94403 16/08/04 05:05 PM
Joined: Aug 2003
Posts: 314
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
You need to change a couple of things, it won't work as it is:

/dialog -m Xlogin {

Becomes:

dialog xlogin {

As you had before. What I indicated you should change was your popup command:

AwSuMovies
.X-Login:xlogin xlogin xlogin }

This should become:

AwSuMovies
.X-Login:/dialog -m xlogin xlogin

You don't need a } there

#94404 17/08/04 04:22 AM
Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
thanks sigh, i got it now thanks smile

#94405 17/08/04 07:07 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Couple of other things...:)
You need to close the group.
It would be a good idea to check the $network smile
Code:
#login off
on *:CONNECT: {
  if (%Xlogin.login == on) [color:red]&& $network == undernet[/color] {
    .msg x@channels.undernet.org login %Xlogin.username %Xlogin.password
  }
}
[color:blue]#login end[/color]

and this line is not needed
  • elseif (%Xlogin.login == off) { halt }


#94406 21/08/04 04:17 AM
Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
Iori, thats a good idea to have it check the network. i really didn't think about it, cause i assumed that the users using it would be on a undernet server smile

thanks so much for pointing that out.. and as for the goup closing.. i figured that out after a lot of head scratching..

thanks again

#94407 07/09/04 04:38 AM
Joined: Aug 2004
Posts: 423
C
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
ok,
now i have had this script tryed and true, but however recently i started applying some dlls into my script and now this script won't save the vars for the login nick or password..
would the dlls have something to do with it??

any thoughts on this?


Link Copied to Clipboard