Running a bunch of commands in Terminal
I went through the exact same process back when I was playing around with logKext. The unix command you may want to explore is /usr/bin/expect.

It can get complex quickly, but basically what it does is act as a mediator between you and the programs you're running so it can provide answers that you would normally have to type. As an example, I built this script so I could automate the process of printing the logKext output. You should recognize all of the commands you'd normally type to logkextClient yourself...

#!/usr/bin/expect -f
spawn logkextClient
expect "logKext Password:"
send "mylogkextpassword\r"
expect "logKextClient &gt; "
send "print\r"
expect "logKextClient &gt; "
send "quit\r"
close


Back in 10.5 and 10.6 this worked well for me for outputting the logKext print so I could pipe it into an email and send it. However, I was running this logged in as root to terminal, so it was simple.

Theoretically, if you weren't logged in as root, you could instead say

#!/usr/bin/expect -f
spawn sudo -k logkextClient
expect "Password:"
send “myrootpassword\r”
expect "logKext Password:"
send "mylogkextpassword\r"
expect "logKextClient &gt; "
send "print\r"
expect "logKextClient &gt; "
send "quit\r"
close


(note that I used sudo -k intentionally to be consistent and require a password every time)

So you could use your favorite command line editor to create this script, do a chmod +x to it and drag it to the dock for launching... Theoretically.

But I have been having problems in Mavericks getting /usr/bin/expect to behave properly with sudo, so this isn't working for me in other scripts like it should. And I don't have logKext installed at all anymore for testing anyway.

But I think this is the direction you may want to head.

Good luck!