Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: YACSendText.exe Question Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: January 24 2007 at 19:22 | IP Logged Quote smarty

I am using the “YACSendText.exe” utility to send messages to my touch screens and TV’s. The messages are used to confirm incoming IR commands (IR commands incoming to PH). In looking over the YAC documentation, I know I can send up to 300 text characters documenation link.

Here is the question: Does anyone know how to send a carriage return and line feed using “YACSendText.exe”?


What I would like to send might take the form of: YACTextSend.exe ROOM: {PH Room Variable} <CR, LF> DEVICE: {PH Device Variable} <CR,LF> STATUS: {PH Device Status Variable}

So the output would look like:

ROOM: Master bedroom
DEVICE: Fan light
STATUS: On

I am not code savy enough to understand the source code of “YACTextSend.exe”, but here it is:
Link.

__________________
Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
Back to Top View smarty's Profile Search for other posts by smarty
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: January 24 2007 at 20:56 | IP Logged Quote TonyNo

Check out Bubble Message, too (here somewhere)!

Quote:
In all YAC network traffic, line breaks are sent as CRLF (\r\n), which is the Windows standard.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: January 24 2007 at 21:16 | IP Logged Quote dhoward

Steve,

You can also accomplish this type of notification with the PowerHome DCC and the ph_openiewindow function. Most likely overkill for this application though.

Anyways, I took a quick look at the source code for YAC and it's written in C. I see where the command line is passed so you should be able to just use standard C escape characters. In this case \r and \n. So, an example would be: This is\r\na test.

HTH,

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: January 25 2007 at 11:23 | IP Logged Quote smarty

Dave and Tony,

It appears not to work with the \r \n characters; they are simpley passed through just how they are typed.

I guess I should have mentioned that I did try these earlier (yep, I did see what Tony had quoted).

Any other ideas?

Since I due run DCC on all the machines I could look at the ph_openiewindow function. This function DOES NOT appear to be in the "ph-help.chm" help file (hope I have the latest help file).

Any examples of how this function works?

EDIT: I found this

thread

But the complete useage of this function is not documented (No issues...good things come to those who can be a bit patient).

Edited by smarty - January 25 2007 at 11:42


__________________
Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
Back to Top View smarty's Profile Search for other posts by smarty
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: January 25 2007 at 12:50 | IP Logged Quote dhoward

Steve,

Sorry to hear that the \r\n is not working for YAC. I thought for sure it would.

I also cant believe I havent documented the ph_openiewindow function yet...sometimes I don't know where my brain is. Anyways, here docs are posted below:

ph_openiewindow PowerHome formula function
Description
Allows the user to open a specialized window object consisting of an Internet Explorer control. Full control of this window is available by sending Windows messages.
Syntax
ph_openiewindow ( title, url, flags, x, y, width, height, timeout )
Argument Description
title String. The Title you wish to appear on the IE window.
url String. The URL you wish to be opened in the Internet Explorer window control. You can use the system variable [HANDLE] to have the handle of the IE Wndow substituted within the URL.
flags Integer. Individual flag values summed together to control how the window appears. The individual flag values are: 1 to suppress the Title bar. 2 to make the Window not resizeable. 4 to remove the Control menu. 8 to remove the minimize box. 16 to remove the maximize box. 32 to suppress the display of the countdown timer if a timeout value is passed. 64 to suppress scrollbars. 128 to have the IE Window NOT be a child window of the PowerHome environment. 256 to have the window open maximized.
x Integer. The X location you wish the IE Window to appear. Use - 1 to have the window centered horizontally.
y Integer. The Y location you wish the IE Window to appear. Use - 1 to have the window centered vertically.
width Integer. The width of the IE Window. Use - 1 to set the width of the window to the screen width.
height Integer. The height of the IE Window. Use - 1 to set the height of the window to the screen height.
timeout Integer. The time in seconds for the IE Window to remain open. Use 0 if you don't wish the window to timeout and close automatically.

Return value
Unsigned Long. Returns the handle of the new IE Window. Using this handle, Windows Messages can be sent to remotely control aspects of the window.
Usage
You can use this function to create highly configurable user display windows to also control aspects of PowerHome if the URL contains control code to manipulate the PH environment.

Hope this helps,

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: January 25 2007 at 13:11 | IP Logged Quote TonyNo

Ah! That's the pop-up or OSD we spoke of!
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: January 26 2007 at 07:42 | IP Logged Quote TonyNo

It's in my help file.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum