Source language: Translate to:

[résolu]using [Embedded]MyFile.dat in a screen saver?

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

[résolu]using [Embedded]MyFile.dat in a screen saver?

Postby mycomenius » Fri Feb 11, 2011 3:04 pm

Hello

Can I use[Embedded]screen saver chiffresdelay.dat in a screen saver?

I read the delay beetween 2 actions in the file
Code: Select all
.lire delay chiffres 0 à 9 dans fichier creen_saver_chiffres_delay.dat
FileRead "[Embedded]screen_saver_chiffres_delay.dat" "[bcl]+1" "[delaychiffres]"
Delay "[delaychiffres]"


I insert this file in Embedded files

ans I have a message error when I use the screen saver.
I have the message in French: " erreur inconnue n° 123"

can you help me?
thanks
didier
Last edited by mycomenius on Wed Feb 23, 2011 4:03 am, edited 1 time in total.
User avatar
mycomenius
 
Posts: 78
Joined: Sun Jan 30, 2011 6:15 am
Location: France / Provence

Postby Gaev » Fri Feb 11, 2011 5:25 pm

didier:

From the Help file
FileToVar

Purpose:
Read the contents of a file into a variable. This is similar to using FileRead with the “All” option, but unlike FileRead, FileToVar can be used with Embedded files.

Category:
Files

Syntax:
FileToVar "file name" "variable"

file name

The name of an existing external or embedded file.

variable

The name of the variable to store the contents of the file.

Example:
FileToVar "[Embedded]dealers.txt" "[TextEntry1]"

If you need to read just one or two lines ... do a StrParse on the variable used in the FileToVar command ... then use the appropriate Arrayed Variable.
User avatar
Gaev
 
Posts: 3718
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby mycomenius » Sat Feb 12, 2011 3:09 am

thank you very much
it's OK with this code and the embedded file chiffresdelay.txt
Code: Select all
.lire delay chiffres 0 à 9 dans fichier chiffresdelay.txt
Loop "1" "10" "[bcl]"
FileToVar "[Embedded]chiffresdelay.txt" "[lecture chiffre delay]"
StrParse "[lecture chiffre delay]" ";" "[delaychiffres]" "[nombre éléments]"
Delay "[delaychiffres[bcl]]"
EndLoop

didier
User avatar
mycomenius
 
Posts: 78
Joined: Sun Jan 30, 2011 6:15 am
Location: France / Provence


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest