This is simply a preference of mine from the way other image applications work (e.g., ACDSee), since IrfanView's Ctrl-M key combination to select a random image seems a little counter-intuitive.
Works both in IrfanView's windowed and Full Screen views.
space:: { myvar:=false IfWinActive ahk_class IrfanView { myvar:=true } else { IfWinActive ahk_class FullViewClass { myvar:=true } else { myvar:=false } } if (myvar = true){ #space::^m } else { space::space } } return
Note: I'm by no means a skilled AutoHotkey script developer. The script above might have problems I haven't yet detected, or might (in fact, probably can) be put together much more efficiently.
If anyone has any ways in which this script can be improved, please let me know.
Much warmth,
planetthoughtful
---
"lost in thought"
http://www.planetthoughtful.org