mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#134208 30/10/05 12:50 AM
Joined: Sep 2005
Posts: 21
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Sep 2005
Posts: 21
Hello

I have found this script:
on *:START: {
server "SERVER" -i "Nick" "AlternativNick" "email"
server -m "SERVER" -i "Nick" "AlternativNick" "email"
}
on *:CONNECT: {
if ( $network == "NETWORK" ) {
mode $me +i
join #CHANNEL
}
if ( $server == "SERVER" ) {
mode $me +i
join #CHANNEL
join #CHANNEL
join #CHANNEL
}
}

I want to make a interface/popup menu for this script

My idea to this script, is a popup menu that look like this:

Multi Servers
.Server 1
..Server [Here the user enter the network/server]
..Channel(s) [Here the user enter the channel or the channels
..Nick [Primary nick]
..Alternative nick [secondary nick]
..Mail [The users mail]
.Server 2
..Server
..Channel(s)
..Nick
..Alternative nick
..Mail
.Server 3
..Server
..Channel(s)
..Nick
..Alternative nick
..Mail
.Server 4
..Server
..Channel(s)
..Nick
..Alternative nick
..Mail
.Server 5
..Server
..Channel(s)
..Nick
..Alternative nick
..Mail

Are this impossible ? an can the script be used ?

#134209 30/10/05 06:03 AM
Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
Code:
menu status {
  $iif($variables.exist($network),$network)
  .Chans --> %chans. [ $+ [ $network ] ] :/join %chans. [ $+ [ $network ] ])
  .Alternate Nick --> %altnick. [ $+ [ $network ] ] :/nick %altnick. [ $+ [ $network ] ]
}
alias variables.exist {
  if (%chans. [ $+ [ $1 ] ] && %altnick. [ $+ [ $1 ] ]) { return $true }
}


That's just an example. You'd want to use something like that though. Basically, it'll show the network name as a menu list, if the specified variables exist for it.

#134210 30/10/05 12:42 PM
Joined: Sep 2005
Posts: 21
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Sep 2005
Posts: 21
i don't understand it...

if i want to make 5 "popup" menu's.. how i do that ?

#134211 30/10/05 12:50 PM
Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
Alright, well.. give me an example of what you want the popup to look like. Your original post isn't exactly clear. What *IS* the popup supposed to do? I know you say "lists" but, what did you want it to DO?

#134212 30/10/05 01:09 PM
Joined: Sep 2005
Posts: 21
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Sep 2005
Posts: 21
Multi Servers
.Server 1
..Server [Here the user enter the network/server]
..Channel(s) [Here the user enter the channel or the channels
..Nick [Primary nick]
..Alternative nick [secondary nick]
..Mail [The users mail]

thats popup are for one server.
i want the server will be save variables or something, when the user connect next time, the server settings i saved, an the connect script connect to servers that are entered in the variabels..
i want to be 5 "enter server" popups...

sry for my really bad english

#134213 31/10/05 08:29 AM
Joined: Sep 2005
Posts: 21
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Sep 2005
Posts: 21
something like this:

#134214 31/10/05 07:31 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
eyeball this and see if it does what you want
Code:
alias ircstart { dialog -dm multiervset multiervset }

dialog multiervset {
  title "Multiserver Setup"
  size -1 -1 200 150
  option dbu
  tab "Network 1", 1, 0 0 198 150
  button "", 999, 0 0 0 0, cancel
[color:blue]
  edit "", 101, 1 30 98 10, tab 1
  edit "", 102, 102 75 80 10, tab 1
  edit "", 103, 102 135 80 10, tab 1
  list 200, 1 55 98 100, sort, tab 1
  text "Network 1 Name", 301, 5 15 90 8, tab 1
  text "Channels to Join", 302, 1 45 98 8, tab 1
  text "E-Mail", 303, 110 125 80 10, tab 1
  button "Update Network 1", 901, 125 30 50 10, tab 1
  button "Add Channel to List", 902, 125 95 50 10, tab 1
  button "Remove Channel", 903, 125 110 50 10, tab 1
[/color] [color:red]
  tab "Network 2", 2, 0 0 198 150
  edit "", 121, 1 30 98 10, tab 2
  edit "", 122, 102 75 80 10, tab 2
  edit "", 123, 102 135 80 10, tab 2
  list 220, 1 55 98 100, sort, tab 2
  text "Network 2 Name", 321, 5 15 90 8, tab 2
  text "Channels to Join", 322, 1 45 98 8, tab 2
  text "E-Mail", 323, 110 125 80 10, tab 2
  button "Update Network 2", 921, 125 30 50 10, tab 2
  button "Add Channel to List", 922, 125 95 50 10, tab 2
  button "Remove Channel", 923, 125 110 50 10, tab 2
[/color]
}
[color:green]
on *:dialog:multiervset:sclick:999:{ $input(If You did not click the $crlf Update Network Button for EACH Network $crlf the changes were lost,o, Network Setup Info!!) }  
[/color][color:blue]
on *:dialog:multiervset:sclick:901:{
  writeini networkjoin.ini net1 name $did(multiervset,101)
  var %ms_chans
  var %i = 1
  var %ms_chanlist = $did(multiervset,200).lines
  while (%i <= %ms_chanlist) {
    $iif(%ms_chans == $null,%ms_chans = $did(multiervset,200,%i),%ms_chans = %ms_chans $+ $chr(44) $+ $did(multiervset,200,%i))
    inc %i
  }
  writeini networkjoin.ini net1 chans %ms_chans
  writeini networkjoin.ini net1 email $did(multiervset,103)
}
[/color][color:red]
on *:dialog:multiervset:sclick:902:{
  did -a multiervset 200 $did(multiervset,102)
  did -r multiervset 102
}
on *:dialog:multiervset:sclick:903:{
  did -d multiervset 200 $did(multiervset,200).sel
}

on *:dialog:multiervset:sclick:921:{
  writeini networkjoin.ini net2 name $did(multiervset,121)
  var %ms_chans
  var %i = 1
  var %ms_chanlist = $did(multiervset,220).lines
  while (%i <= %ms_chanlist) {
    $iif(%ms_chans == $null,%ms_chans = $did(multiervset,220,%i),%ms_chans = %ms_chans $+ $chr(44) $+ $did(multiervset,220,%i))
    inc %i
  }
  writeini networkjoin.ini net2 chans %ms_chans
  writeini networkjoin.ini net2 email $did(multiervset,123)
}
on *:dialog:multiervset:sclick:922:{
  did -a multiervset 220 $did(multiervset,122)
  did -r multiervset 122
}
on *:dialog:multiervset:sclick:923:{
  did -d multiervset 220 $did(multiervset,220).sel
}
[/color]


;on *:start:{
alias teststart {
  var %netslist.count = $ini(networkjoin.ini,0)
  var %i = 1
  var %x = 1
  while (%i <= %netslist.count) {
    var %netslist.network.c = $ini(networkjoin.ini,%i)
    var %netjoin.c = $ini(networkjoin.ini,%netslist.network.c,0)
    var %net.data = $ini(networkjoin.ini,%netslist.network.c,1)
    server %multi $readini(networkjoin.ini,%netslist.network.c,%net.data)
    var %multi = -m
    inc %i
  }
}


Note that you can repeat the section in blue (see the red sections)
changing the center diget to match the new tab number

the last section can be changed to an on *:start:{ event, for testing use the alias /teststart

to begin use the alias /ircstart

the data for the channels to join and the email address I did not deal with here, this should give you a starting point though

#134215 01/11/05 09:05 AM
Joined: Sep 2005
Posts: 21
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Sep 2005
Posts: 21
can all this be saved in a .mrc file or something ?, its alot of code, and i make i mirc many people can use. can it be saved a file ?

#134216 01/11/05 02:07 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Just copy/paste it. If you have trouble getting it to paste correctly (formatted correctly), then click Quote on the post with the code and copy everything between the [[b][/b]code] tags. Then, paste that into a file (or remotes).


Invision Support
#Invision on irc.irchighway.net
#134217 01/11/05 04:00 PM
Joined: Sep 2005
Posts: 21
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Sep 2005
Posts: 21
and i load the file with: /load -rs file.mrc ?

#134218 01/11/05 04:01 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You can. Or, you can paste it all into Alt-R > File > New and save yourself the trouble. smile


Invision Support
#Invision on irc.irchighway.net
#134219 01/11/05 04:44 PM
Joined: Sep 2005
Posts: 21
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Sep 2005
Posts: 21
thx... and i work now...

but can i only changes it 1 time ?... first time it work... but second time it say:
/dialog: 'multiervset' name in use (line 1, script1.ini)

#134220 01/11/05 04:52 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You have to close the dialog before you can use the alias again.


Invision Support
#Invision on irc.irchighway.net
#134221 01/11/05 05:43 PM
Joined: Sep 2005
Posts: 21
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Sep 2005
Posts: 21
thx... that help smile

#134222 02/11/05 04:41 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
ok, I "fleshed" it out
try this
Code:
/*
Multiserv-options
Written by MikeChat
11-2-2005
as a reply to:
https://forums.mirc.com/showflat.php?Cat=0&Number=141379&an=0&page=1#141379
NFSPOWER
Note:	Changes include autosave on close 
	and some fixes to errors in the coding I noticed 
	post comments to the thread listed above if you
	have a constructive criticism.
*/
menu status {
  Multiserver Settup
  .Enter Network Settings:dialog -dm multiervset multiervset
  .Multiserver is $group(#multiserver_options) : $iif($group(#multiserver_options).status == off,.enable #multiserver_options,.disable #multiserver_options)
}
dialog multiervset {
  title "Multiserver Setup"
  size -1 -1 200 150
  option dbu
  button "", 999, 0 0 0 0, cancel
  tab "Network 1", 1, 0 0 198 150
  edit "", 111, 1 30 98 10, tab 1
  edit "", 112, 102 75 80 10, tab 1
  edit "", 113, 102 135 80 10, tab 1
  list 210, 1 55 98 100, sort, tab 1
  text "Network 1 Name", 311, 5 15 90 8, tab 1
  text "Channels to Join", 312, 1 45 98 8, tab 1
  text "E-Mail", 313, 110 125 80 10, tab 1
  button "Update Network 1", 911, 125 30 50 10, tab 1
  button "Add Channel to List", 912, 125 95 50 10, tab 1
  button "Remove Channel", 913, 125 110 50 10, tab 1
  tab "Network 2", 2, 0 0 198 150
  edit "", 121, 1 30 98 10, tab 2
  edit "", 122, 102 75 80 10, tab 2
  edit "", 123, 102 135 80 10, tab 2
  list 220, 1 55 98 100, sort, tab 2
  text "Network 2 Name", 321, 5 15 90 8, tab 2
  text "Channels to Join", 322, 1 45 98 8, tab 2
  text "E-Mail", 323, 110 125 80 10, tab 2
  button "Update Network 2", 921, 125 30 50 10, tab 2
  button "Add Channel to List", 922, 125 95 50 10, tab 2
  button "Remove Channel", 923, 125 110 50 10, tab 2
  tab "Network 3", 3, 0 0 198 150
  edit "", 131, 1 30 98 10, tab 3
  edit "", 132, 102 75 80 10, tab 3
  edit "", 133, 102 135 80 10, tab 3
  list 230, 1 55 98 100, sort, tab 3
  text "Network 3 Name", 331, 5 15 90 8, tab 3
  text "Channels to Join", 332, 1 45 98 8, tab 3
  text "E-Mail", 333, 110 125 80 10, tab 3
  button "Update Network 3", 931, 125 30 50 10, tab 3
  button "Add Channel to List", 932, 125 95 50 10, tab 3
  button "Remove Channel", 933, 125 110 50 10, tab 3
  tab "Network 4", 4, 0 0 198 150
  edit "", 141, 1 30 98 10, tab 4
  edit "", 142, 102 75 80 10, tab 4
  edit "", 143, 102 135 80 10, tab 4
  list 240, 1 55 98 100, sort, tab 4
  text "Network 4 Name", 341, 5 15 90 8, tab 4
  text "Channels to Join", 342, 1 45 98 8, tab 4
  text "E-Mail", 343, 110 125 80 10, tab 4
  button "Update Network 4", 941, 125 30 50 10, tab 4
  button "Add Channel to List", 942, 125 95 50 10, tab 4
  button "Remove Channel", 943, 125 110 50 10, tab 4
  tab "Network 5", 5, 0 0 198 150
  edit "", 151, 1 30 98 10, tab 5
  edit "", 152, 102 75 80 10, tab 5
  edit "", 153, 102 135 80 10, tab 5
  list 250, 1 55 98 100, sort, tab 5
  text "Network 5 Name", 351, 5 15 90 8, tab 5
  text "Channels to Join", 352, 1 45 98 8, tab 5
  text "E-Mail", 353, 110 125 80 10, tab 5
  button "Update Network 5", 951, 125 30 50 10, tab 5
  button "Add Channel to List", 952, 125 95 50 10, tab 5
  button "Remove Channel", 953, 125 110 50 10, tab 5
}
on *:dialog:multiervset:init:0:{
  var %i = 1
  while (%i <= 5) {
    var %net.id = $+(net,%i)
    did -a multiervset $+(1,%i,1) $readini(networkjoin.ini,%net.id,name)
    var %x.t = $gettok($readini(networkjoin.ini,%net.id,chans),0,44)
    var %x.i = 1
    while (%x.i <= %x.t) {
      did -a multiervset $+(2,%i,0) $gettok($readini(networkjoin.ini,%net.id,chans),%x.i,44)
      inc %x.i
    }
    did -a multiervset $+(1,%i,3) $readini(networkjoin.ini,%net.id,email)
    inc %i
  }
}
;on *:dialog:multiervset:sclick:999:{ var %null.value = $input(If You did not click the $crlf Update Network Button for EACH Network $crlf the changes were lost,o, Network Setup Info!!) }  
on *:dialog:multiervset:sclick:911:{
  writeini networkjoin.ini net1 name $did(multiervset,111)
  var %ms_chans
  var %i = 1
  var %ms_chanlist = $did(multiervset,210).lines
  while (%i <= %ms_chanlist) {
    $iif(%ms_chans == $null,%ms_chans = $did(multiervset,210,%i),%ms_chans = %ms_chans $+ $chr(44) $+ $did(multiervset,210,%i))
    inc %i
  }
  if (%ms_chans) { writeini networkjoin.ini net1 chans %ms_chans }
  if ($did(multiervset,113)) { writeini networkjoin.ini net1 email $did(multiervset,113) }
}
on *:dialog:multiervset:sclick:912:{
  did -a multiervset 210 $did(multiervset,112)
  did -r multiervset 112
}
on *:dialog:multiervset:sclick:913:{
  did -d multiervset 210 $did(multiervset,210).sel
}

on *:dialog:multiervset:sclick:921:{
  writeini networkjoin.ini net2 name $did(multiervset,121)
  var %ms_chans
  var %i = 1
  var %ms_chanlist = $did(multiervset,220).lines
  while (%i <= %ms_chanlist) {
    $iif(%ms_chans == $null,%ms_chans = $did(multiervset,220,%i),%ms_chans = %ms_chans $+ $chr(44) $+ $did(multiervset,220,%i))
    inc %i
  }
  if (%ms_chans) { writeini networkjoin.ini net2 chans %ms_chans }
  if ($did(multiervset,123)) { writeini networkjoin.ini net2 email $did(multiervset,123) }
}
on *:dialog:multiervset:sclick:922:{
  did -a multiervset 220 $did(multiervset,122)
  did -r multiervset 122
}
on *:dialog:multiervset:sclick:923:{
  did -d multiervset 220 $did(multiervset,220).sel
}

on *:dialog:multiervset:sclick:931:{
  writeini networkjoin.ini net3 name $did(multiervset,131)
  var %ms_chans
  var %i = 1
  var %ms_chanlist = $did(multiervset,230).lines
  while (%i <= %ms_chanlist) {
    $iif(%ms_chans == $null,%ms_chans = $did(multiervset,230,%i),%ms_chans = %ms_chans $+ $chr(44) $+ $did(multiervset,230,%i))
    inc %i
  }
  if (%ms_chans) { writeini networkjoin.ini net3 chans %ms_chans }
  if ($did(multiervset,133)) { writeini networkjoin.ini net3 email $did(multiervset,133) }
}
on *:dialog:multiervset:sclick:932:{
  did -a multiervset 230 $did(multiervset,132)
  did -r multiervset 132
}
on *:dialog:multiervset:sclick:933:{
  did -d multiervset 230 $did(multiervset,230).sel
}

on *:dialog:multiervset:sclick:941:{
  writeini networkjoin.ini net4 name $did(multiervset,141)
  var %ms_chans
  var %i = 1
  var %ms_chanlist = $did(multiervset,240).lines
  while (%i <= %ms_chanlist) {
    $iif(%ms_chans == $null,%ms_chans = $did(multiervset,240,%i),%ms_chans = %ms_chans $+ $chr(44) $+ $did(multiervset,240,%i))
    inc %i
  }
  if (%ms_chans) { writeini networkjoin.ini net4 chans %ms_chans }
  if ($did(multiervset,143)) { writeini networkjoin.ini net4 email $did(multiervset,143) }
}
on *:dialog:multiervset:sclick:942:{
  did -a multiervset 240 $did(multiervset,142)
  did -r multiervset 142
}
on *:dialog:multiervset:sclick:943:{
  did -d multiervset 240 $did(multiervset,240).sel
}

on *:dialog:multiervset:sclick:951:{
  writeini networkjoin.ini net5 name $did(multiervset,151)
  var %ms_chans
  var %i = 1
  var %ms_chanlist = $did(multiervset,250).lines
  while (%i <= %ms_chanlist) {
    $iif(%ms_chans == $null,%ms_chans = $did(multiervset,250,%i),%ms_chans = %ms_chans $+ $chr(44) $+ $did(multiervset,250,%i))
    inc %i
  }
  if (%ms_chans) { writeini networkjoin.ini net5 chans %ms_chans }
  if ($did(multiervset,153)) { writeini networkjoin.ini net5 email $did(multiervset,153) }
}
on *:dialog:multiervset:sclick:952:{
  did -a multiervset 250 $did(multiervset,152)
  did -r multiervset 152
}
on *:dialog:multiervset:sclick:953:{
  did -d multiervset 250 $did(multiervset,250).sel
}
on *:dialog:multiervset:close:*:{
  var %i = 1
  while (%i <= 5) {
    var %net.id = $+(net,%i)
    if ($did(multiervset,$+(1,%i,1)) == $null) { remini networkjoin.ini %net.id | inc %i | continue }
    if ($did(multiervset,$+(1,%i,1)) != $null) {
      writeini networkjoin.ini %net.id name $did(multiervset,$+(1,%i,1))
      var %ms_chans
      var %x = 1
      var %ms_chanlist = $did(multiervset,$+(2,%i,0)).lines
      while (%x <= %ms_chanlist) {
        $iif(%ms_chans == $null,%ms_chans = $did(multiervset,$+(2,%i,0),%x),%ms_chans = %ms_chans $+ $chr(44) $+ $did(multiervset,$+(2,%i,0),%x))
        inc %x
      }
      if (%ms_chans == $null) { 
        var %null.value = $input( %net.id has no channels associated with it $crlf If Exists old data will be used. $crlf Re-open the setup dialog to make changes.,o, Network Setup Info!!) 

      }
      if (%ms_chans != $null) { writeini networkjoin.ini %net.id chans %ms_chans }
      if ($did(multiervset,$+(1,%i,3)) != $null) { writeini networkjoin.ini %net.id email $did(multiervset,$+(1,%i,3)) }
    }
    inc %i
  }
}
#multiserver_options off
on *:start:{
  var %netslist.count = $ini(networkjoin.ini,0)
  var %i = 1
  var %x = 1
  while (%i <= %netslist.count) {
    var %netslist.network.c = $ini(networkjoin.ini,%i)
    var %netjoin.c = $ini(networkjoin.ini,%netslist.network.c,0)
    var %net.data = $ini(networkjoin.ini,%netslist.network.c,1)
    server %multi $readini(networkjoin.ini,%netslist.network.c,%net.data)
    var %multi = -m
    inc %i
  }
}
on *:connect:{
  var %i = 1
  while (%i <= 5) {
    var %net.check = $+(net,%i)
    var %net.logon = $readini(networkjoin.ini,%net.check,name)
    if (%net.logon == $network) { join $readini(networkjoin.ini,%net.check,chans) }
    inc %i
  }
}
#multiserver_options end


in mIRC type:
/run notepad Multiserv-options.mrc

when prompted in notepad that it cannot find the file, do you want to make a new one, click ok

paste the code above into the file and click file-save

in mIRC type /load -rs Multiserv-options.mrc

right click in a status window and look for the topic " Multiserver Settup"
clicking that will open the menu and allow you to
1) enter network and channel info as well as the email info (I do not know what you plan on doing with the email stuff)
2) turn on/off the auto connect and auto join channel portion of the code above

Last edited by MikeChat; 02/11/05 06:05 PM.
#134223 03/11/05 08:12 AM
Joined: Sep 2005
Posts: 21
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Sep 2005
Posts: 21
I have a problem with the script... when i connect i works fine, but it not autoconnect to the channels i have enter... i can only enter the channels if i enter it in perform.... why ?

#134224 03/11/05 04:44 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
I have tested it, and had others test it, and it all worked

check that you:

1) filled in network (or server) names in at least one of the tabs
2) added at least one channel to the list for that network
3) make sure it shows its on in the status menu item Multiserver Setup
4) look for conflicting scripts, you might try /reload -rs1 multiserv-options.mrc
(or whatever you may have named it)

#134225 04/11/05 07:40 PM
Joined: Sep 2005
Posts: 21
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Sep 2005
Posts: 21
i don't know why it dosen't work.. but look:


why multiserver settup dosen't work ?.....

#134226 05/11/05 06:02 AM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
ok unload the mrc you made, click HERE and click I accept (they have a disclaimer that they arent responsible if you download anything)

load the version posted there
( /load -rs1 MSoptions.mrc )

I suspect what has happened is that the lines got munged via the copy/paste of the code.

Try that and see if it works

#134227 05/11/05 11:10 AM
Joined: Sep 2005
Posts: 21
N
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Sep 2005
Posts: 21
that work fine..... but the script not join any channel..... now i have looking in my mIRC settings..... and i can't anything see what could be wrong :S... i have enter 2 networks in the script, it works fine..... but the channel never been joinet

#Mikechat should i try to send my mIRC client ? (about: 2 mb)

EDIT: Meybe the script could write to perform.ini instead ?

Last edited by NFSPOWER; 05/11/05 11:13 AM.
Page 1 of 2 1 2

Link Copied to Clipboard