HFS: Event scripts: Difference between revisions

From rejetto wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
'''Warning:''' this feature requires version 2.3 or above.
'''Warning:''' this feature requires version 2.3 or above.


This feature is not documented yet; in the while you can refer [http://www.rejetto.com/forum/?topic=6154 this topic on the forum].
Event scripts are scripts that run when something happens: an event.
 
The syntax is very similar to the one used in templates. The name of the event is on a line, surrounded by [square brakets]. The script commands follows.
 
Example:
<pre>
[upload completed]
{.move|%item-resource%|C:\another_folder\%item-name%.}
</pre>
 
Would you need to not overwrite an existing event script, you can prefix the event name with a "+" sign. Example: <tt>[+upload completed]</tt>.
 
You can read more [http://www.rejetto.com/forum/?topic=6154 on the forum].
 
== Events list ==
=== Network events ===
; request : an HTTP request has been made, this includes browsing, icons, archives, and normal downloads.
; request completed : the request was fulfilled.
; download : a download was requested.
; download completed : a download has just finished.
; unauthorized : this user has no permission to access the requested resource.
; server start : HFS was switched on, to accept connections.
; server stop : HFS was switched off, connections are accepted no more.
; connected : a new connection was established by a client.
; disconnected : a connection is ended.
; upload completed : a file has been uploaded.
; upload failed : a file has failed to be uploaded.
 
=== Naming events ===
You can use these events to change the name that will be given to the file that is about to be uploaded or downloaded.
; upload name
; archive name
; download name
 
=== Other events ===
; start : HFS was started.
; quit : HFS is quitting.
 
=== Timed events ===
You can ask HFS to run a script at a certain time, or interval.
 
To run a script at 1PM o'clock, you can make an event [at 13:00].
 
To run every 15 minutes instead you should make an event [every 15 minutes].
 
You can read more [http://www.rejetto.com/forum/index.php?topic=6588.msg1042304#msg1042304 on the forum].

Revision as of 18:59, 12 May 2009

Warning: this feature requires version 2.3 or above.

Event scripts are scripts that run when something happens: an event.

The syntax is very similar to the one used in templates. The name of the event is on a line, surrounded by [square brakets]. The script commands follows.

Example:

[upload completed]
{.move|%item-resource%|C:\another_folder\%item-name%.}

Would you need to not overwrite an existing event script, you can prefix the event name with a "+" sign. Example: [+upload completed].

You can read more on the forum.

Events list

Network events

request
an HTTP request has been made, this includes browsing, icons, archives, and normal downloads.
request completed
the request was fulfilled.
download
a download was requested.
download completed
a download has just finished.
unauthorized
this user has no permission to access the requested resource.
server start
HFS was switched on, to accept connections.
server stop
HFS was switched off, connections are accepted no more.
connected
a new connection was established by a client.
disconnected
a connection is ended.
upload completed
a file has been uploaded.
upload failed
a file has failed to be uploaded.

Naming events

You can use these events to change the name that will be given to the file that is about to be uploaded or downloaded.

upload name
archive name
download name

Other events

start
HFS was started.
quit
HFS is quitting.

Timed events

You can ask HFS to run a script at a certain time, or interval.

To run a script at 1PM o'clock, you can make an event [at 13:00].

To run every 15 minutes instead you should make an event [every 15 minutes].

You can read more on the forum.