FstScript - CMDs for FlowStone
Posted: Thu Jan 17, 2013 3:58 pm
Hello!
Since over one year back i allways tried to fix up a idea how to manage CMD-String based commands within Flowstone. Well i fear i got one - and i like it
The idea is realy simple i want to controll a whole shematic throu one CMD-String (For Networkmodules, HTTP-Post modules and so on verry usefull)
So what is my basic idea that i want to preset:
It is more a Script language that i will call FlowScript. What was verry important to me, is that every user could add own functions easily. So the whole flowscript could host every module that works with Strings, Floats, Integers, Bools and their array-partners. The whole scripts calculates Stringdata.
So what is this CMD system?
You enter a command and do anything, this command will post back a reply. And this reply can be saved to the variable system meanwile ore use the reply within the next command.
Syntax of every CMD:
cmd_group -> Function Group
cmd_name -> Basic Function
( -> Show Interpreter that there are variables coming
) -> Show Interpreter that CMD is over. After that you can wrinte anny comment - it is ignored by the interpreter
variables:
If you want to write a constant variable, just tyle your text you want to have without any extra digits!!!
if you want to use a variable out of the variable-System (var-sys) then type this: var.variablename
if you want to use a variable of the reply of the last executed CMD use this: reply.variablename -> You'll get the reply variables displayed by the window.
Example: (Also in shematic)
This is a little example how this flowscript is working:
We want now HTTP-Post something to a Website then store te reply to variable "html-file" and then we will save the contet of "html-file" to a *.txt file. So let us beginn:
httppost(myip.is,index.php,test,test) #testvariable included because it is needed
var.edit(html-file,reply.http_reply)
Now we can read out the variable:
var.read(html-file)
Let us continue and save this variable to a text file:
fs.save(C:\httppost.html,var.html-file)
Congrats now there is a HTML file on C:\httppost.html created by FlowScript - Well ok it sais forbidden, i found no other website at the moment that would alow http-post
Cheers! I hope you like it.
Well i like it my selve and i also need it. I think the whole FS community needs it
Best regards C.Hackl
Since over one year back i allways tried to fix up a idea how to manage CMD-String based commands within Flowstone. Well i fear i got one - and i like it
The idea is realy simple i want to controll a whole shematic throu one CMD-String (For Networkmodules, HTTP-Post modules and so on verry usefull)
So what is my basic idea that i want to preset:
It is more a Script language that i will call FlowScript. What was verry important to me, is that every user could add own functions easily. So the whole flowscript could host every module that works with Strings, Floats, Integers, Bools and their array-partners. The whole scripts calculates Stringdata.
So what is this CMD system?
You enter a command and do anything, this command will post back a reply. And this reply can be saved to the variable system meanwile ore use the reply within the next command.
Syntax of every CMD:
Code: Select all
cdm_group.cmd_name(Any Text to variable 1,var.variable2,reply.variable3) Any user commentcmd_group -> Function Group
cmd_name -> Basic Function
( -> Show Interpreter that there are variables coming
) -> Show Interpreter that CMD is over. After that you can wrinte anny comment - it is ignored by the interpreter
variables:
If you want to write a constant variable, just tyle your text you want to have without any extra digits!!!
if you want to use a variable out of the variable-System (var-sys) then type this: var.variablename
if you want to use a variable of the reply of the last executed CMD use this: reply.variablename -> You'll get the reply variables displayed by the window.
Example: (Also in shematic)
This is a little example how this flowscript is working:
We want now HTTP-Post something to a Website then store te reply to variable "html-file" and then we will save the contet of "html-file" to a *.txt file. So let us beginn:
httppost(myip.is,index.php,test,test) #testvariable included because it is needed
var.edit(html-file,reply.http_reply)
Now we can read out the variable:
var.read(html-file)
Let us continue and save this variable to a text file:
fs.save(C:\httppost.html,var.html-file)
Congrats now there is a HTML file on C:\httppost.html created by FlowScript - Well ok it sais forbidden, i found no other website at the moment that would alow http-post
Cheers! I hope you like it.
Well i like it my selve and i also need it. I think the whole FS community needs it
Best regards C.Hackl