12-20-2011 10:52 AM
Bonjour,
J'ai une fichier ini qui contient une section et un ligne. Je veut lire un chiffre (exp 9) de ce ligne et l'affiche dans un champ texte.
exp;
[SIGNAL]
PRESENCE_1: 1: 9: 0: 1: 0:
Merci à votre aide.
12-20-2011 11:14 AM - edited 12-20-2011 11:15 AM
CVI offers you inifile instrument to read / write .INI files: you must load the instrument into Instrument menu if you haven't done it already. If you don't know this instrument you can find it in <cvidir>\toolslib\toolbox directory. I suggest you to read the online help and see the related example that comes with CVI.
Supposing you are reding the line with Ini_GetStringIntoBuffer () you can scan the line read to obtain desired text.
Scanning the line is quite easy if you rely on separators: you can either use strtok () or Scan () function to easily extracd desired value from the line.