alias cmnd { dialog -m cmnd cmnd }
dialog cmnd {
  title "Comandi alla connessione by L]e[G"
  size -1 -1 280 153
  option pixels
  tab "Net 1", 1, 5 4 268 110
  tab "Net 2", 5
  tab "Net 3", 6
  tab "Net 4", 7
  tab "Net 5", 8
  check "", 2, 16 118 21 17
  text "Attiva", 3, 40 117 43 17
  button "Ok", 4, 182 115 65 25, ok
  edit "", 9, 89 43 156 20, tab 1 autohs center %cmnn1
  edit "", 10, 91 75 153 20, tab 1 autohs center %netc1
  text "Comando:", 11, 22 45 62 17, tab 1
  text "Network:", 12, 23 74 60 17, tab 1
  edit "", 13, 91 42 156 20, tab 5 autohs center %cmnn2
  text "Comando:", 14, 24 44 62 17, tab 5
  text "Network:", 15, 25 73 60 17, tab 5
  edit "", 16, 93 74 153 20, tab 5 autohs center %netc2
  edit "", 17, 96 44 156 20, tab 6 autohs center %cmnn3
  text "Comando:", 18, 29 46 62 17, tab 6
  text "Network:", 19, 30 75 60 17, tab 6
  edit "", 20, 98 76 153 20, tab 6 autohs center %netc3
  text "Comando:", 21, 30 43 62 17, tab 7
  edit "", 22, 97 41 156 20, tab 7 autohs center %cmnn4
  text "Network:", 23, 31 72 60 17, tab 7
  edit "", 24, 99 74 153 20, tab 7 autohs center %netc4
  edit "", 25, 94 40 156 20, tab 8 autohs center %cmnn5
  edit "", 26, 96 73 153 20, tab 8 autohs center %netc5
  text "Network:", 27, 28 71 60 17, tab 8
  text "Comando:", 28, 27 42 62 17, tab 8
}
on *:dialog:cmnd:init:*:{
  did -a $dname 9 %cmnn1
  did -a $dname 10 %netc1
  did -a $dname 16 %netc2
  did -a $dname 13 %cmnn2
  did -a $dname 17 %cmnn3
  did -a $dname 20 %netc3
  did -a $dname 22 %cmnn4
  did -a $dname 24 %netc4
  did -a $dname 25 %cmnn5
  did -a $dname 26 %netc5
  if (%attcomcon == on) did -c $dname 2
}
on *:dialog:cmnd:sclick:2:{ if (%attcomcon != on) { set %attcomcon on } | else unset %attcomcon }
on *:connect:{
  if ( %cmnn1 != $null && %attcomcon == on && $network == %netc1 ) { timerdut 1 1 %cmnn1 }
  if ( %cmnn2 != $null && %attcomcon == on && $network == %netc2 ) { timerdut 1 1 %cmnn2 }
  if ( %cmnn3 != $null && %attcomcon == on && $network == %netc3 ) { timerdut 1 1 %cmnn3 }
  if ( %cmnn4 != $null && %attcomcon == on && $network == %netc4 ) { timerdut 1 1 %cmnn4 }
  if ( %cmnn5 != $null && %attcomcon == on && $network == %netc5 ) { timerdut 1 1 %cmnn5 }
}
menu menubar {
Comandi alla connessione:cmnd
}
on *:load: { echo -a Addon caricato con successo lo trovi nella menu bar }