View Single Post
Old 11-19-2012, 07:48 AM   #15
silver18
THE NOOB
silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.silver18 ought to be getting tired of karma fortunes by now.
 
silver18's Avatar
 
Posts: 701
Karma: 1545649
Join Date: Jan 2012
Location: Italy
Device: Kindle Touch 5.3.2
Quote:
Originally Posted by silver18 View Post
Some WAFs use kindle.messaging.sendMessage to send messages to lipc. Here's how the adviewer does it:

Code:
kindle.messaging.sendMessage('com.lab126.adManager', 'adViewerMessage', buildMsgReq(START_BROWSE, params));
As lipc it something outside the WAF, this is used to send messages for logs and for performing actions.
If we could bind our WAFs lipcId to some properties, we could use lipc to run a script from inside a WAF by sending the corresponding message.
I'm here again...The biggest problem when using a WAF is the lack of shell scripting.
While I still think the solution posted above is the real solution to this problem, one could also act this way:

1) use inside JavaScript
Code:
kindle.messaging.sendMessage(YOUR_WAF_HERE, YOUR_PROPERTY_HERE, YOUR_MESSAGE_HERE);
2) place in config.xml
Code:
<kindle:app name="YOUR_WAF_HERE" value="yes" />
3) once the sendMessage command is launched, you can see this in showlog -f:
Code:
121119:133711 wafapp[1882]: W lipc:pnr:prop=YOUR_PROPERTY:Property not registered
121119:133711 wafapp[1882]: E com.silver18.komic001:LipcAdapter::setProperty:Failed to set string property YOUR_PROPERTY:
4) One could, hypothetically, run a script in background (using the same starting script used to run the WAF with the launcher) to continuously check the log for the correct property and, if found, do something.

This means, on the other hand, having something running in background (I don't like this!!)
silver18 is offline   Reply With Quote