mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2003
Posts: 12
O
otreux Offline OP
Pikka bird
OP Offline
Pikka bird
O
Joined: Oct 2003
Posts: 12
Hi smile
There is a way for assign an hotkey for open the download folder?
Thanks smile

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
You can assign F-keys by naming an alias after the F-key, and optionally precede it by 's' or 'c' to make it Shift+Fkey or Ctrl+Fkey. So then you could do something like assign F9 to showing the contents of $getdir by making an alias like:

Code
alias F9 noop $sfile($getdir)


If it's in the alt+D aliases instead of an alt+R remote script, you don't want the 'alias' prefix keyword there. If you want it to be shift+F9 the alias should instead be named sF9 and for ctrl+F9 change the name to cF9.

You can name an alias F1 and it will call your alias instead of opening the /help file.

It's probably feasible to allow aliases to be Ctrl+Shift+Fkey and name the aliases csF9, but that would be a feature request.

Unfortunately, it doesn't let you assign hotkey aliases to alt+Fkey, so you can't use it to disable the alt+F4 exiting the program. You can create an alias like:

alias cF4 noop

which will disable the behavior of Ctrl+F4 closing your active window. If you don't like F11 toggling you in/out of fullscreen mode, you can make a dummy alias to disable that too. But rather than having a silent alias like above, then forgetting about the alias and why the behavior doesn't work like /help says it does, you can include a status window message:

alias F11 { echo 4 -s F11 fullscreen mode hotkey disabled by alias F11 - use /view/fullscreen menu instead! }

The example I gave at the beginning is similar to the window for DCC sending you get from the "/dcc send $$1" command you see in the nicklist rightclick menu. The difference with those menus is that they always open up to whatever is the last folder you used those commands to dcc send something.

Next is a different version of the F9 alias, where it 'remembers' the last folder you were looking at without clicking CANCEL, and doesn't actually do anything with the diskfile you click on. Note that below is the form for putting the hotkey in the alt+D aliases, where it doesn't have the 'alias' prefix

Code
F9 {
  if (%F9 == $null) set -s %F9 $getdir
  var %a $sfile(%F9)
  if (%a != $null) set -s %F9 $nofile(%a)
}

Joined: Oct 2003
Posts: 12
O
otreux Offline OP
Pikka bird
OP Offline
Pikka bird
O
Joined: Oct 2003
Posts: 12
Fantastic! Thanks smile


Link Copied to Clipboard