"mIRC is the active application and the alias should run when i call it."
To me, it seems like the open dialog is the active window.. (despite what mIRC's identifiers return).
As was mentioned, this would be a good feature suggestion. Maybe an addition to the onDIALOG event would be better than using the existing ALIAS F4 syntax. That way dialog designers could have complete control over F* buttons within their dialogs without having existing F* aliases interfering. Possible syntax:
on *:DIALOG:test:FKEY:F4: echo -s F4 pressed
on *:DIALOG:test:FKEY:sF4:echo -s Shift+F4 pressed
on *:DIALOG:test:FKEY:cF4:echo -s Ctrl+F4 pressed
Each dialog has its own set of onDIALOG events, so each dialog could have its own F* key actions. And if no F* event is specified for the active dialog, maybe the default F* aliases could be used instead.
-genius_at_work