X10 Community Forum

🖥️ActiveHome Pro => SDK => Topic started by: kize37 on June 22, 2011, 10:27:47 PM

Title: Where is the SDK Scripting Interface?
Post by: kize37 on June 22, 2011, 10:27:47 PM
 B:(  I must be stupid... I installed the SDK and have a CM19A.  Went to the AHSDK folder not a whole lot there. 

bin folder nothing will run except ahcview. Active Script I get Windows error needs to shut down.

Help!

Todd
Title: Re: Where is the SDK Scripting Interface?
Post by: Noam on June 23, 2011, 09:41:10 AM
Make sure you have the latest version of AHP (3.315) and the latest SDK installer (Updated 05/16/2011).

When you say "nothing will run", what is happening? Are you getting errors?

ahcmd.exe is a command-line program. There is no graphical interface for it.
Title: Re: Where is the SDK Scripting Interface?
Post by: kize37 on June 23, 2011, 12:24:20 PM
All new updates installed. ahcmd.exe will not stay open, keeps closing. If I click on Active Script I get Windows error do I want to report to Microsoft and needs to shut down.

Todd
Title: Re: Where is the SDK Scripting Interface?
Post by: Dan Lawrence on June 23, 2011, 01:06:07 PM
What version of Windows are you using?
Title: Re: Where is the SDK Scripting Interface?
Post by: kize37 on June 23, 2011, 02:01:32 PM
XP
Title: Re: Where is the SDK Scripting Interface?
Post by: Noam on June 23, 2011, 02:08:58 PM
All new updates installed. ahcmd.exe will not stay open, keeps closing.

ahcmd.exe is a command-line program, so double-clicking on it will briefly pop open a command prompt, it will run (not doing anything since you didn't pass it any parameters), and then close.

In order to use it, you either need to run it from a command prompt, create a shortcut to it with the correct parameters, or use it with the proper parameters in a script.
Title: Re: Where is the SDK Scripting Interface?
Post by: Tuicemen on June 23, 2011, 02:23:48 PM
kize37, are you trying to write a program with the SDK?
What language are you going to use?
The active home script must be accessed  from inside a project.
Stating which language your using could result in some simple example code.
 >!
Title: Re: Where is the SDK Scripting Interface?
Post by: Noam on June 23, 2011, 02:26:48 PM
... If I click on Active Script I get Windows error do I want to report to Microsoft and needs to shut down.

What are the file dates of these files in c:\program files\AHSDK\bin?

ahscript.dll
ActiveScript.exe
Interop.ActiveHomeScriptLib.dll

Title: Re: Where is the SDK Scripting Interface?
Post by: kize37 on June 23, 2011, 02:35:34 PM
I understand now -:)  What would be the easiest way to code something like this.

I'm designing a Wireless System using the KR19a and the CM19a to receive the button presses which will trigger a key press event for my computer software.

Example:  When I press On 1 on a KR19a, CM19A receives this transmission and interprets it as the letter H being pressed on my keyboard for my software to detect.
Title: Re: Where is the SDK Scripting Interface?
Post by: Tuicemen on June 23, 2011, 02:41:19 PM
What language code are you familiar with?
Microsoft makes a free programing kit for a number of languages.
Visual Express (http://www.microsoft.com/express) also has a wide support base.
 >!
Title: Re: Where is the SDK Scripting Interface?
Post by: kize37 on June 23, 2011, 02:46:55 PM
Not really a programmer I'm a hardware guy. Visual Basic would be the best.

Title: Re: Where is the SDK Scripting Interface?
Post by: Tuicemen on June 23, 2011, 02:49:08 PM
Okay, get the visual basic express.
There is a VB sample in the sdk/bin folder I believe!
 >!
Title: Re: Where is the SDK Scripting Interface?
Post by: Noam on June 23, 2011, 02:51:56 PM
It sounds like you need to write something to monitor the CM19A for a specific command, then have it run a script of some sort to send the keystroke to your program. Since you are "not a programmer" (neither am I, by the way), you might want something a bit easier than writing it yourself.

If you have the SmartMacros plugin, you can try to create a macro triggered by the button press, that then runs a script created using AutoIt or AutoHotKey to simulate the keyboard press.
Those applications can (usually) direct the keypress at a specific application window.

Title: Re: Where is the SDK Scripting Interface?
Post by: Tuicemen on June 23, 2011, 02:56:56 PM
The path to the VB sample is C:\Program Files\AHSDK\samples\vbapp\VBActiveHome.
It has been a while since I looked at that sample. ::) :'
Noams suggestion may be the best option for you unless you wish to dabble in programming.
Title: Re: Where is the SDK Scripting Interface?
Post by: kize37 on June 23, 2011, 03:04:30 PM
Thanks for the help! I completely understand now. Piece of cake :)%
Title: Re: Where is the SDK Scripting Interface?
Post by: dbemowsk on June 23, 2011, 05:13:33 PM
Understanding is half the battle.  Once you're over that hump, the skies the limit.