Function Keys Editor

By PuffGirl on Aug 30, 2005

With this dialog you can edit your fkeys functions. Please note that you have to create a fkeys.txt file and put it on mirc folder. In that fkeys.txt file you write the default commands for your fkeys (one per line). So when you edit some fkeys on this dialog, if you push "default" button, you can have the default commands again.
Use /fkeys to open the dialog.

alias fkeys { dialog -m fkeys fkeys } 
dialog fkeys { 
  title "Function Keys editor" 
  size -1 -1 203 156 
  option dbu 
  box "", 1, 2 3 198 150 
  text " F1 Command:", 2, 13 26 39 8 
  text " F2 Command:", 3, 13 36 39 8 
  text " F3 Command:", 4, 13 46 39 8 
  text " F4 Command:", 5, 13 56 39 8 
  text " F5 Command:", 6, 13 66 39 8 
  text " F6 Command:", 7, 13 76 39 8 
  text " F7 Command:", 8, 13 86 39 8 
  text " F8 Command:", 9, 13 96 39 8 
  text " F9 Command:", 10, 13 106 39 8 
  text " F10 Command:", 11, 13 116 39 8 
  text " F11 Command:", 12, 13 126 39 8 
  text " F12 Command:", 13, 13 136 39 8 
  edit "", 14, 53 25 79 10, autohs 
  edit "", 16, 53 35 79 10, autohs 
  edit "", 15, 53 45 79 10, autohs 
  edit "", 17, 53 55 79 10, autohs 
  edit "", 18, 53 65 79 10, autohs 
  edit "", 19, 53 75 79 10, autohs 
  edit "", 20, 53 85 79 10, autohs 
  edit "", 21, 53 95 79 10, autohs 
  edit "", 22, 53 105 79 10, autohs 
  edit "", 23, 53 115 79 10, autohs 
  edit "", 24, 53 125 79 10, autohs 
  edit "", 25, 53 135 79 10, autohs 
  text "Here you can edit new commands For you fkeys", 26, 14 10 147 8 
  button "Apply", 27, 147 62 37 12 
  button "Default", 28, 147 48 37 12 
  button "OK", 29, 147 76 37 12, ok 
  button "Edit", 30, 147 34 37 12 
  box "Options", 31, 138 22 56 75 
} 
on *:dialog:fkeys:init:*: { 
  did -a $dname 14 %f1 
  did -a $dname 16 %f2 
  did -a $dname 15 %f3 
  did -a $dname 17 %f4 
  did -a $dname 18 %f5 
  did -a $dname 19 %f6 
  did -a $dname 20 %f7 
  did -a $dname 21 %f8 
  did -a $dname 22 %f9 
  did -a $dname 23 %f10 
  did -a $dname 24 %f11 
  did -a $dname 25 %f12 
  did -m $dname 14,15,16,17,18,19,20,21,22,23,24,25 
  did -b $dname 27 
} 
on *:dialog:fkeys:sclick:*: { 
  if ($did == 30) { did -n $dname 14,15,16,17,18,19,20,21,22,23,24,25 | did -e $dname 27 } 
  if ($did == 27) { 
    set %f1 $did(14) 
    set %f2 $did(16) 
    set %f3 $did(15) 
    set %f4 $did(17) 
    set %f5 $did(18) 
    set %f6 $did(19) 
    set %f7 $did(20) 
    set %f8 $did(21) 
    set %f9 $did(22) 
    set %f10 $did(23) 
    set %f11 $did(24) 
    set %f12 $did(25) 
    did -m $dname 14,15,16,17,18,19,20,21,22,23,24,25 | did -b $dname 27 
  } 
  if ($did == 28) { 
    set %f1 $read(fkeys.txt,1) 
    set %f2 $read(fkeys.txt,2) 
    set %f3 $read(fkeys.txt,3) 
    set %f4 $read(fkeys.txt,4) 
    set %f5 $read(fkeys.txt,5) 
    set %f6 $read(fkeys.txt,6) 
    set %f7 $read(fkeys.txt,7) 
    set %f8 $read(fkeys.txt,8) 
    set %f9 $read(fkeys.txt,9) 
    set %f10 $read(fkeys.txt,10) 
    set %f11 $read(fkeys.txt,11) 
    set %f12 $read(fkeys.txt,12) 
    did -r $dname 14 %f1 
    did -r $dname 16 %f2 
    did -r $dname 15 %f3 
    did -r $dname 17 %f4 
    did -r $dname 18 %f5 
    did -r $dname 19 %f6 
    did -r $dname 20 %f7 
    did -r $dname 21 %f8 
    did -r $dname 22 %f9 
    did -r $dname 23 %f10 
    did -r $dname 24 %f11 
    did -r $dname 25 %f12 
    did -a $dname 14 %f1 
    did -a $dname 16 %f2 
    did -a $dname 15 %f3 
    did -a $dname 17 %f4 
    did -a $dname 18 %f5 
    did -a $dname 19 %f6 
    did -a $dname 20 %f7 
    did -a $dname 21 %f8 
    did -a $dname 22 %f9 
    did -a $dname 23 %f10 
    did -a $dname 24 %f11 
    did -a $dname 25 %f12 
  } 
} 
alias f1 { %f1 } 
alias f2 { %f2 } 
alias f3 { %f3 } 
alias f4 { %f4 } 
alias f5 { %f5 } 
alias f6 { %f6 } 
alias f7 { %f7 } 
alias f8 { %f8 } 
alias f9 { %f9 } 
alias f10 { %f10 } 
alias f11 { %f11 } 
alias f12 { %f12 }

Comments

Sign in to comment.
PuffGirl   -  Sep 01, 2005

You need to add \"/\" prefix like \"F1 Command:/Identify Oper Andrew Pass\"

 Respond  
AndrewMiller17   -  Aug 31, 2005

Now when you enter the commands you wish. Say for example I want to use
F1 Command:Identify Oper Andrew Pass
Or do you need to add a \'/\' before Identify?

 Respond  
Krusi`   -  Aug 31, 2005

exept for setting to default and seeing fkeys status, sorry, I misunderstood..

 Respond  
Krusi`   -  Aug 31, 2005

or just do this in any mirc window. ex. /alias F7 yourcommand

 Respond  
anthalus   -  Aug 30, 2005

Wouldn\'t it be easier to just write to an alias.ini file?

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.