Archive for the ‘CMD Scripts’ category

Create event in EventGhost

September 13th, 2009

There are two easy ways of creating events in EventGhost.

First by commandline:

C:\Program Files\EventGhost\EventGhost.exe -E MyTestEventFromCmd
C:\Program Files\EventGhost\EventGhost.exe -E MyTestEventFromCmd WithPayload

And then via VBScript

Dim oEventGhost
Set oEventGhost = CreateObject("EventGhost")
oEventGhost.TriggerEvent "MyTestEvent"
oEventGhost.TriggerEvent "AndSomeOtherEvent", "WithPayload"
Set oEventGhost = Nothing

With that you can get EventGhost to react on loads of stuff… why not react on incoming phonecalls?
eventghostevents

Tweet something

September 13th, 2009

It’s easy to tweet from the command-line… Google up some curl command-line application and download it.

curl --user MyTwitterUser:MyPassword --data "source=haStatus&status=This is what I want to tweet" http://twitter.com/statuses/update.json

I have a “source” called “haStatus” (Has Status or Home Automation Status) that is registered with Twitter. If you don’t want to use that one as source, just remove source=haStatus& from the command-line.

Since it’s a quite long commandline I have a small cmd-file that does the trick for me:

@echo off
h:\scripts\bin\curl --user MyTwitterUser:MyPassword --data "source=haStatus&status=%*" http://twitter.com/statuses/update.json

time /T >H:\Scripts\Log\lastTweet.log
date /T >>H:\Scripts\Log\lastTweet.log
echo %* >>H:\Scripts\Log\lastTweet.log