Ask and answer questions related to any type of OSA scripting.
-
Vaughn
- Site Admin
- Posts: 1432
- Joined: Thu May 13, 2010 2:17 pm
#1
Post
by Vaughn » Sat May 16, 2015 11:45 am
My intentions for the internal scripting was to be in plain English, but I chickened out and molded after VB (as I have 0 experience in creating a language!). But after playing with the system parsing, I believe English scripting is possible.
IF Vaughn.Full Name = Vaughn Rupp THEN (this is the current way)
Code: Select all
END IF
Would become:
If Vaughn's full name is Vaughn Rupp then (would be the NLP way)
{code block}
Because of code blocks and stuff, multiline scripts would not read in pure English, but much of the scripting logic would read more like English, and would get rid of . seperators for object.property etc.
On commands:
Speech.Run Method.Say.Hello world
would become
Speech say hello world
or
Speech say "hello world"
My dream would be to open up the logic more to non-programmers. I have seen automation projects that use C# for scripting, but that literally makes any user a real programmer, and we should have that option, but I would love a simple English option too.
Anyone for the changes to make the default script process more English based?
Vaughn
-
volfan6415
- Posts: 175
- Joined: Sun Jun 08, 2014 9:24 am
#2
Post
by volfan6415 » Sun May 17, 2015 7:59 am
I am all for any changes that lower the barrier to entry. The scripting feature is one of the more powerful features of osa and if it could be made where it's "programmed" in plain English that just means that more people can use it.
-
GaryFunk
- Posts: 1
- Joined: Fri May 08, 2015 9:12 pm
#3
Post
by GaryFunk » Sun May 17, 2015 12:54 pm
Vaughn wrote:Anyone for the changes to make the default script process more English based?
So, do you think it will easier to teach someone English rather than a scripting language?
-
Vaughn
- Site Admin
- Posts: 1432
- Joined: Thu May 13, 2010 2:17 pm
#4
Post
by Vaughn » Sun May 17, 2015 6:10 pm
Since we support multiple Script engines, I think I will make the NLP scripting a separate plugin, then I don't risk breaking people's scripts. Plus The script processor was one of the first pieces I hacked together in VB, so I can make the new one in C#, which I wanted to do anyways.
As for teaching people English, of course people would prefer to program in English, but if it could be done well, it would have already, and I am not that smart. But I never let that stop me, so it make be weak as far as scripting power goes, but yes, is has an obvious place if I can get it to work.