Sparrow Core Operational Flow

How does it work? Edit

In the server settings you have an option to tell if hkml files being interpre

$_FILES (not fully working atm - therefore disabled in 0.1.3)

$_SERVER variables which have some vital information like referrer etc.

the server accepts POST and GET requests. File transfers will be possible, but are disabled for now (the server crashes, thats why) if u ever done something in PHP, you will find, that requests posted (as well as set via get) are stored globally in $_GET[Varname] Variables Same with $_POST[Varname]

On my list of things to do with Server Variables:

  • header injection - so the servers' header content can be changed from within a script,
  • superglobals - variables, that will be accessible from different code segments on _ONE_ hkml file.

Template Style Edit

Right now, doing some code like:

  <title>HKML TestFile</title>
<?ahk a := 5 ?>
<p>Some HTML content</p>
<?ahk echo(a) ?>

will simply not work - technically these are two scripts and run in seperate adress spaces. i need to resetup my IPC so server works as a variable buffer for scripts. along with that, cookie-session management and header injection will become possible.

Other languages Edit

php or asp like vbs wont work, unless someone writes a wrapper for that.

GUI elements Edit

i have setup a technical demo, which is also seen from the screenshot above, showing environment variables in a hkml file which were accessed at runtime of the script - not at that from server. besides each script may do whatever AHK script can do. control applications, create GUIS (no these are not send back to client, 'd be cool though ), whatever ... all GUI actions will physically happen on the server. the client only receives the html (content whatever) you sent back to it.

William: Could an hkml file have a script that takes a screenshot of a gui, and place an image in the public directory of the webserver, and display that image in a <img src="">? If so, then a tedious solution might be to chop a gui up into an image map, and assign buttons to links...

DerRaphael: Theoretically this might work. OTH It is not very practicable due to the nature of how webservices work in general. When a html file is requested, the server runs a script only once and when this exits the result is being returned. so when controlling an external program over web, each time the script need to run the entire procedure again (find the gui, screenshot and send). It might be a better solution to stream the content of the target window and use hkml to modify controls.

GDI (Serverside Graphics)

it is not working atm, but i have plans to include a demo showing how to use GDI+ libraries to dynamically create graphics on the fly and send these back to client.
there is a basic interface for a plugin structure but this needs more improvement, so plugins may be loaded at runtime (enabled or disabled)

Examples Edit

Have a look at the Hello World Example

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.