Please login or register.

Login with username, password and session length

Author Topic: Hotkeys for activehome? and batchfiles  (Read 21414 times)

Chargin

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 22
Hotkeys for activehome? and batchfiles
« on: November 10, 2010, 07:55:40 PM »

2 part question.
Firstly is there any sort of inbuilt hotkey setup in activehome?

Secondly how do I get batchfiles to work?

I made a bat with this

START "C:\Documents and Settings\SS\Desktop\lamps.EXE"

Lamps exe is just a shortcut a la

"C:\Program Files\Home Control\x10comm.EXE" a3 on

The shortcut works fine when I click it but when its called via a bat file it doesnt work.
Would a better way be to make a bat file that looks like this

"C:\Program Files\Home Control\x10comm.EXE" a3 on (I tried this but windows doesnt like the a3 on bit on the end?)
Logged

anthonylavado

  • Hero Member
  • *****
  • Helpful Post Rating: 23
  • Posts: 198
  • At a position relative to the observer.
    • anthonylavado.com
Re: Hotkeys for activehome? and batchfiles
« Reply #1 on: November 11, 2010, 01:31:09 AM »

@Chargin:

I've never used ActiveHome, so I can't comment on it for sure.
One thing I can suggest is that instead of:
Code: [Select]
"C:\Program Files\Home Control\x10comm.EXE" a3 onin a Batch file, try this instead:
Code: [Select]
"C:\Program Files\Home Control\x10comm.EXE a3 on"
Let us know how it goes!  :)
Logged
Follow me on Twitter: @anthonylavado
Now making guest appearances in the Home Automation Chat Room

Chargin

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 22
Re: Hotkeys for activehome? and batchfiles
« Reply #2 on: November 11, 2010, 02:39:57 AM »

yes I did try that but it didnt work, no error or anything and no lights either..
I read about batch files today and I think I understood the writeup to say I had to have a % before an argument, is that right? I tried %a3 on at the end but that didnt work either...
Logged

hawk1

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 625
Re: Hotkeys for activehome? and batchfiles
« Reply #3 on: November 11, 2010, 10:10:26 AM »

This is how I made a batch file for my camera software:

@echo
cd\
cd c:\program files\blue iris
ahcmd sendplc c1 on

Just an example you could go by.
Logged
koopr@sstelco.com, I don't know what I'm doin but I'm havin fun doin it!

jrwhit

  • Full Member
  • ***
  • Helpful Post Rating: 2
  • Posts: 39
Re: Hotkeys for activehome? and batchfiles
« Reply #4 on: November 11, 2010, 11:59:11 AM »

May we assume you have downloaded the ActivehomePro SDK?
This software interface allows you to use commands to interact with AHP and your CM15A via scripts.
I find this method of control works well sending all sorts of commands to my home automation PC from other PC's on my network.
Here is a typical command to make this work:

Set objProcess = GetObject("winmgmts:{impersonationLevel=impersonate}!\YourPCNameHere\root\cimv2:Win32_Process")
result = objProcess.Create ("C:\Program Files\Common Files\X10\Common\ahcmd.exe sendplc d11 on", null, null, intProcessID)

This is a visual basic scripting file which I saved as D11On.vbs. A simple shortcut on the desktop of a networked PC, when double-clicked, turns the D11 module on.
There are more examples in the SDK documentation for other programming languages.
Logged

Chargin

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 22
Re: Hotkeys for activehome? and batchfiles
« Reply #5 on: November 11, 2010, 05:13:39 PM »

Ok I should have said, this is just activehome not pro, no sdk and its a cm12AU (same as cm11)
Logged

Chargin

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 22
Re: Hotkeys for activehome? and batchfiles
« Reply #6 on: November 11, 2010, 07:09:34 PM »

Tried this

@echo
cd\
cd c:\Program Files\Home Control\x10comm.exe a3 on

Didnt work.

This is how I made a batch file for my camera software:

@echo
cd\
cd c:\program files\blue iris
ahcmd sendplc c1 on

Just an example you could go by.
Logged

hawk1

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 625
Re: Hotkeys for activehome? and batchfiles
« Reply #7 on: November 11, 2010, 08:06:49 PM »

Put the command on a different line, like the example and try.
Logged
koopr@sstelco.com, I don't know what I'm doin but I'm havin fun doin it!

Chargin

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 22
Re: Hotkeys for activehome? and batchfiles
« Reply #8 on: November 11, 2010, 08:10:17 PM »

Still nothing.

@echo
cd\
cd c:\Program Files\Home Control\x10comm.exe
a3 on
Logged

ITguy

  • Sr. Member
  • ****
  • Helpful Post Rating: 8
  • Posts: 105
Re: Hotkeys for activehome? and batchfiles
« Reply #9 on: November 11, 2010, 09:38:38 PM »

Looks like you have an extra "CD" in there!  You show:

@echo
cd\
cd c:\Program Files\Home Control\x10comm.exe
a3 on

It should probably be:

@echo
cd \
c:\Program Files\Home Control\x10comm.exe a3 on

ITguy
Logged

hawk1

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 625
Re: Hotkeys for activehome? and batchfiles
« Reply #10 on: November 11, 2010, 09:49:47 PM »

Oooppps.  Sorry!      B:(
Logged
koopr@sstelco.com, I don't know what I'm doin but I'm havin fun doin it!

Chargin

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 22
Re: Hotkeys for activehome? and batchfiles
« Reply #11 on: November 11, 2010, 10:22:28 PM »

Ok tried that still nothing

@echo
cd \
c:\Program Files\Home Control\x10comm.exe
a3 on
Logged

hawk1

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 625
Re: Hotkeys for activehome? and batchfiles
« Reply #12 on: November 11, 2010, 10:46:13 PM »

Okay, how about this:

@echo
cd \
"c:\Program Files\Home Control\x10comm.exe"
a3 on


The other thing you can do is put a pause at the end, that way you might be able to see what the problem is.
If this doesn't work you might want to try a AutoHotKey script instead of a batch file.
Logged
koopr@sstelco.com, I don't know what I'm doin but I'm havin fun doin it!

Chargin

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 22
Re: Hotkeys for activehome? and batchfiles
« Reply #13 on: November 11, 2010, 11:38:30 PM »

OK IT WORKS!

@echo
cd \
"c:\Program Files\Home Control\x10comm.exe" a3 on

I tried adding the pause and then it worked, I took the pause out and it still works...
Maybe there was a space or something somewhere, I dont know if that would cause a problem.

Thanks all.
Logged

-Bill- (of wgjohns.com)

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 81
  • Posts: 1340
  • He's just this guy. You know?
    • wgjohns.com
Re: Hotkeys for activehome? and batchfiles
« Reply #14 on: November 30, 2010, 10:52:36 PM »

Since the path to the executable; c:\Program Files\Home Control\x10comm.exe contains a space, you must surround the whole thing in quotes, or Windows gets confused and stops at the space.  ;)
 >!
Logged
-Bill- (of wgjohns.com)
bill@wgjohns.com

In the real world, the only constant is change.

When I'm online you can find me in the Home Automation Chat Room!
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.