Named scripts not workting?
Named scripts not workting?
I am trying to send a command from another prorgam. The command is c:\program files\osa\osaservice.exe "Named-script"
This worked in 3.9 and I have not tried it since. Named scripts changes so I assume I have something wrong. There was mentioned in the 4.2 released thread about a problem with named scripts, and Matt posted OSAE.VR.zip file to fix VR grammer. I don't know what that is but I installed it. It did not help.
When I run the command, I see entries in the OSACL log:
04/25/2013 07:17:59.627 PM - Processing command: Door Closed, Named Script:
But on other log entries.
In patterns I have a pattern "Door Closed" with a script name "Door1 closed".
I have a script called "Door1 closed". Is this the correct way to set this up or am I missing something?
Should this work or is there some problem in 4.2? (Running 4.2 from 4/21)
This worked in 3.9 and I have not tried it since. Named scripts changes so I assume I have something wrong. There was mentioned in the 4.2 released thread about a problem with named scripts, and Matt posted OSAE.VR.zip file to fix VR grammer. I don't know what that is but I installed it. It did not help.
When I run the command, I see entries in the OSACL log:
04/25/2013 07:17:59.627 PM - Processing command: Door Closed, Named Script:
But on other log entries.
In patterns I have a pattern "Door Closed" with a script name "Door1 closed".
I have a script called "Door1 closed". Is this the correct way to set this up or am I missing something?
Should this work or is there some problem in 4.2? (Running 4.2 from 4/21)
Re: Named scripts not workting?
You might give this a try. I was having the same issue and this fixed the problem. This bug will be fixed in the next release.
PS: Use cation when editing the Data base...
From MAT:
If you open the OSAE data base in WorkBench and take a look at the osae_sp_pattern_scripts_get stored procedure you should see what I mean when you look at the code. The problem is occurring because both tables have a script_id column meaning the select is ambiguous as to which one should be retrieved. at present it is:
it should probably be:
(The syntax change is valid for SQL Server might want to double check it is valid for MYSQL)
PS: Use cation when editing the Data base...
From MAT:
If you open the OSAE data base in WorkBench and take a look at the osae_sp_pattern_scripts_get stored procedure you should see what I mean when you look at the code. The problem is occurring because both tables have a script_id column meaning the select is ambiguous as to which one should be retrieved. at present it is:
Code: Select all
BEGIN
SELECT script_id
FROM osae_pattern_script s
INNER JOIN osae_pattern p ON p.pattern_id = s.pattern_id
WHERE p.pattern = ppattern;
END
Code: Select all
BEGIN
SELECT s.script_id
FROM osae_pattern_script s
INNER JOIN osae_pattern p ON p.pattern_id = s.pattern_id
WHERE p.pattern = ppattern;
END
Re: Named scripts not workting?
I know nothing about mysql. But I tried this. Specifically the change is "SELECT script_id" is changed to "SELECT s.script_id".
I was able to change that with mySQL bench. But no change in functionality. I think that is correct syntax but I am not positive.
Any other idea what my problem may be?
From the command line: c:\Program Files\OSA>osaeservice "Door opened"
In the CSACL log I get this:04/26/2013 09:32:01.067 AM - Processing command: Door opened, Named Script:
In patterns there is Door opened with script called Door1 Open.
There is script called Door1 Open that is simply a speach command.
It does not work and I see no other log entries other than the CSACL log.
I was able to change that with mySQL bench. But no change in functionality. I think that is correct syntax but I am not positive.
Any other idea what my problem may be?
From the command line: c:\Program Files\OSA>osaeservice "Door opened"
In the CSACL log I get this:04/26/2013 09:32:01.067 AM - Processing command: Door opened, Named Script:
In patterns there is Door opened with script called Door1 Open.
There is script called Door1 Open that is simply a speach command.
It does not work and I see no other log entries other than the CSACL log.
Re: Named scripts not workting?
The fact that you don't have anything in the log line after "Named Script:" means it did not find a script / pattern match.
Are you sure the SQL stored procedure change was saved? Try re-opening the sp and make sure the change is there.
Are you sure the SQL stored procedure change was saved? Try re-opening the sp and make sure the change is there.
Re: Named scripts not workting?
Yes, I already confirmed the change was persisted.
I was not sure I set this up correctly. Does the command I specify have to match the pattern or do I need something in the Match. My command is "Door opened" which is the pattern name. I added these to the Match list "Door Opened", "DOOR OPENED" and 'door opened". Now it works. So then to see which it was matching I tried to delete them but I cannot. (is this a bug I should report?)
So I tried a few things. The command does not match the pattern, only the match. It also seems to be case insensitive. It does not matter what case I use for the pattern in the command, it will match the match string (but not the pattern).
I thought the Match were only aliases.
I was not sure I set this up correctly. Does the command I specify have to match the pattern or do I need something in the Match. My command is "Door opened" which is the pattern name. I added these to the Match list "Door Opened", "DOOR OPENED" and 'door opened". Now it works. So then to see which it was matching I tried to delete them but I cannot. (is this a bug I should report?)
So I tried a few things. The command does not match the pattern, only the match. It also seems to be case insensitive. It does not matter what case I use for the pattern in the command, it will match the match string (but not the pattern).
I thought the Match were only aliases.
Re: Named scripts not workting?
Oh, I can't delete a match it there is a script attached. Cant delete a pattern if there is a match or a script attached. It makes sense that you cannot delete a pattern if there is a script attached, but I don't see why you cannot delete a match if there is a script attached. If you have several names in a list, I should be able to delete one without detaching all from script. Not a big deal, just weird.
Re: Named scripts not workting?
Not being able to delete something where there is an associated link in another table is a fundamental principle of databases and has no relation to OSA, its known as a "Foreign Key Constraint"
- bwoodworth
- Site Admin
- Posts: 1563
- Joined: Tue May 04, 2010 6:49 am
- Location: California
Re: Named scripts not workting?
You should be able to delete a match from a pattern since the script is associated to the pattern, not the match. It looks like deleting any match sin't working. I will take a look.
Brian
- bwoodworth
- Site Admin
- Posts: 1563
- Joined: Tue May 04, 2010 6:49 am
- Location: California
Re: Named scripts not workting?
I found the error with deleting matches. The fix will be in the next release.
As for your questions about how patterns and matches work, Patterns are simply a name used to group the matches together and link scripts to. Matches are the things that commands are matched to. If you want to run a script that is attached to a Pattern you must run any command that matches any of the Pattern's matches.
As for your questions about how patterns and matches work, Patterns are simply a name used to group the matches together and link scripts to. Matches are the things that commands are matched to. If you want to run a script that is attached to a Pattern you must run any command that matches any of the Pattern's matches.
Brian
Re: Named scripts not workting?
I see. How about the case question. Is it actually case insensitive?