in addition to plugins, Farr also supports aliases.. take a look at this thread for more usage example: FARR V2 core alias tables (https://www.donationcoder.com/forum/index.php?topic=9342.0).
if you want a single script that toggles open/close state then a Autohotkey (http://www.autohotkey.com/) script similar to this can do the trick..
;Run metapad only if it is not already started
Process, Exist, metapad.exe
If ErrorLevel = 0
Run, C:\Program Files\metapad\metapad.exe
Else ;close the app
WinClose, ahk_class metapad
Return
Likewise, I'd love to kill Live Messenger when I click to close it.-aidan_cage
I gave it a shot :
;; Kick messenger
;; by ak
~LButton::
SetBatchLines, -1
CoordMode, Mouse, Screen
SetMouseDelay, -1
SetKeyDelay, -1
MouseGetPos, ClickX, ClickY, winID
Wingetclass winClass, ahk_id %winID%
Winget winPID, PID, ahk_id %winID%
if (winClass != "MSBLWindowClass")
return
if IsOverCloseButton(ClickX, ClickY, winID)
Process close, %winPID%
return
IsOverCloseButton(x, y, hWnd)
{
SendMessage, 0x84,, (x & 0xFFFF) | (y & 0xFFFF) << 16,, ahk_id %hWnd%
return (ErrorLevel == 20)
}
It works on my computer. It kills Live Messenger's process when you click its close button. The only problem with killing the process is that Messenger's tray icon stays visible (until you hover it with your mouse). At least that's what it does on my XP.
EXE version here :
[ You are not allowed to view attachments ]