Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Howto? ph_writefile CRLF Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: October 13 2012 at 13:17 | IP Logged Quote krommetje

Hey Guys,

I created this formula (to start with):

ph_writefile ("c:\logs\ph.log",0,string(today(),"yyyy-mm-dd hh:mm:ss") + if( [X10STATQ11] = 1, ' Bijkeukendeur: Open', ' Bijkeukendeur: Gesloten')+ if( [X10STATQ10] = 1, ' IRBijkeuken: Geen beweging', ' IRBijkeuken: Beweging')+ if( [X10STATQ10] = 1, ' IR-Huiskamer: Beweging', ' IR-Huiskamer: Geen Beweging'))

I want a New Line everytime there is a new entry in the log... how do I do this?

Peter
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: October 13 2012 at 19:09 | IP Logged Quote dhoward

Peter,

CR = "~r", LF = "~n", tab = "~t". Your formula should look like this:

ph_writefile ("c:\logs\ph.log",0,string(today(),"yyyy-mm-dd hh:mm:ss") + if( [X10STATQ11] = 1, ' Bijkeukendeur: Open', ' Bijkeukendeur: Gesloten')+ if( [X10STATQ10] = 1, ' IRBijkeuken: Geen beweging', ' IRBijkeuken: Beweging')+ if( [X10STATQ10] = 1, ' IR-Huiskamer: Beweging', ' IR-Huiskamer: Geen Beweging') + "~r~n")

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward'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