Dual Hbridge icon Dual Hbridge Two-channel Dual H-Bridge movement panel to control two DC motors (on/off) for forward, reverse, left, right via EZ-B digital ports; no PWM speed. Try it →

ARC Pro

Upgrade to ARC Pro

Elevate your robot's capabilities to the next level with Synthiam ARC Pro, unlocking a world of possibilities in robot programming.

Author Avatar
United Kingdom
LinkedIn Twitter Google+ YouTube
#1  

How do you plan on using the returned data? That line alone would be useless since it is not assigning it to anything or comparing it to anything.

To be able to use it the command would need to be part of a process, i.e.

IF(FileReadLineRandom("c:\users\dylan_000\documents\robotrreetings.txt") = "spoons")
  Print("Spoons")
EndIf

Or as a variable to call upon

$line = FileReadLineRandom("c:\users\dylan_000\documents\robotrreetings.txt")

It looks like you are trying to have a list or greetings for your robot, the script would be something like;

$greeting = FileReadLineRandom("c:\greetings.txt")
SayWait ($greeting)

or

SayWait(FileReadLineRandom("c:\greetings.txt"))

Bear in mind all;) are really closed brackets

#2  

Thanks, the third one is what I was doing. I'll test it soon.

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#3  

Look in the examples folder and preview the file example:)

#4  

It seems to work, don't have my speech recognition settings set up yet so the computer doesn't speak back, but it does complete the script with no errors. Thanks Rich

Author Avatar
PRO
Synthiam
LinkedIn Thingiverse Twitter YouTube GitHub
#5  

@Technopro keep in mind that there are syntax examples in the manual as well. When you find a command, such as FileReadRandom(), there is an example of the syntax in the description of the manual. And also, there are many many project examples of how to use each function included in ARC:)

#6  

@Technopro ... I have my speech recognition setup and working... Rich's above samples I have tried work perfectly...