HomeProductsDownloadOrderSupportSearch
  
Myriad Forum « [Résolu]Fichier de configuration »
 Welcome, Guest.
 You can read all messages, but to be able to post,
 please Login or Register.
Mar 19th, 2024, 7:20am 
   Myriad Forum
   MyrScript Language
(Moderator: Forum Administrator)
   [Résolu]Fichier de configuration
« Previous topic | Next topic »
Pages: 1  Reply | Notify of replies | Print
   Author  Topic: [Résolu]Fichier de configuration  (Read 838 times)
JP
Board Master
*****






   
WWW | Email

Gender: male
Posts: 3307
[Résolu]Fichier de configuration  
« on: May 8th, 2012, 6:08pm »
Quote | Modify

Bonjour!
 
Je cherche à comprendre un phénomène bizarre:
 
Dans la nouvelle version du script Basses Chiffrées, je désire disposer d'un fichier de configuration qui permette aux utilisateurs de retrouver certaines informations d'une fois sur l'autre.
 
J'écris donc dans la méthode Init Code:

        local prefFileName = "FBASS-Config.cfg"
      local currentPath = GetCurrentPath()
      SetCurrentPath(GetPreferencesPathName())
      local file, caption
      file = OpenFile(prefFileName, "r", HTML_STR_ENCODING)
        if file == nil then
            ...

 
et dans la méthode Exit Code:

        local prefFileName = "FBASS-Config.cfg"
      local currentPath = GetCurrentPath()
      SetCurrentPath(GetPreferencesPathName())
      local file = OpenFile(prefFileName, "w", HTML_STR_ENCODING)
      file.WriteString(...)
            ...

 
Surprise: ça semble marcher parfaitement, mais je ne trouve nulle part trace du fichier "FBASS-Config.cfg"
 
Quelqu'un peut il m'expliquer ce "miracle"?
 
Je n'aime pas beaucoup les choses qui marchent sans que je comprenne pourquoi, en particulier parce que ça pourrait ne pas marcher chez d'autres utilisateurs sans que je puisse les dépanner.
« Last Edit: May 9th, 2012, 10:09am by JP » offline
Daniel Frouvelle
Board Master
*****






   
WWW | Email

Gender: male
Posts: 1609
Re: Fichier de configuration  
« Reply #1 on: May 8th, 2012, 10:20pm »
Quote | Modify

Bnjour JP,
Chez moi (win XP) je trouve ça dans :
C:\Documents and Settings\Mon Identifiant\Application Data\ACAMPREF\Myriad\MyrScript
Après avoir pris soin de visualiser les fichiers et dossiers cachés.
Amistats, Danièl.
offline
JP
Board Master
*****






   
WWW | Email

Gender: male
Posts: 3307
Re: Fichier de configuration  
« Reply #2 on: May 8th, 2012, 10:26pm »
Quote | Modify

Merci Danièl
J'avais copié le code à partir de l'un de tes scripts, doc je pensais bien que ça devait marcher sans problèmes (sauf d'eventuelles erreurs de copie), mais je préfère comprendre comment ça marche.
offline
JP
Board Master
*****






   
WWW | Email

Gender: male
Posts: 3307
Re: Fichier de configuration  
« Reply #3 on: May 9th, 2012, 10:08am »
Quote | Modify

Pour ceux que ça intéresse, le chemin sur Windows 7 est
C:\Users\Mon Identifiant\AppData\Roaming\ACAMPREF\Myriad\MyrScript
offline
Pages: 1  Reply | Notify of replies | Print

« Previous topic | Next topic »

« Myriad Forum » Powered by YaBB 1 Gold - SP 1.1!
YaBB © 2000-2002,
Xnull. All Rights Reserved.

Top of page
Legal information Cookies Last update:  (c) Myriad