<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <span style="font-size:12.0pt;font-family:"Times New
      Roman",serif;mso-fareast-language:FR">dans ce qur tu as
      écrit, cela reste une chaine sans quote dans la chaine.<br>
      Il faut mettre des quotes à l'intérieur <br>
      <tt>"'chaine'"</tt><br>
      ou <tt><br>
        '"chaine"'</tt><br>
      <br>
      en python, une chaîne littérale est désignée soit par des simples
      quotes ou des doubles quotes.  (on peut aussi les tripler pour 
      faore des chaines multi lignes)<br>
      Cela permet de créer facilement une chaîne qui contient des double
      quotes.<br>
      <br>
    </span><span style="font-size:12.0pt;font-family:"Times New
      Roman",serif;mso-fareast-language:FR"><span
        style="font-size:12.0pt;font-family:"Times New
        Roman",serif;mso-fareast-language:FR">Quelque chose comme
        ça devrait marcher...</span><br>
      <br>
      create_shortcut(<br>
          makepath(start_menu(1),'Primaire','MonAppli.lnk'),<br>
          target=makepath(programfiles32,'Mozilla
      Firefox','firefox.exe'),<br>
          arguments='"%s"' %
      makepath(programfiles32,'MonAppli','index.htm'),<br>
         
      icon=makepath(programfiles32,'MonAppli','images','MonAppli.ico'))</span><br>
    <br>
    <div class="moz-cite-prefix">Le 16/11/2015 10:11, LEMAIRE Philippe a
      écrit :<br>
    </div>
    <blockquote
cite="mid:PS1PR02MB122887A86469E7F6D07E7435D51E0@PS1PR02MB1228.apcprd02.prod.outlook.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        color:black;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"Préformaté HTML Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.PrformatHTMLCar
        {mso-style-name:"Préformaté HTML Car";
        mso-style-priority:99;
        mso-style-link:"Préformaté HTML";
        font-family:Consolas;
        color:black;
        mso-fareast-language:EN-US;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.moz-smiley-s3
        {mso-style-name:moz-smiley-s3;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle23
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="color:#1F497D">Hubert tu es
            mon sauveur et un bon pédagogue car en plus j’ai enfin
            compris quand mettre les \<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">Il me reste un
            dernier petit problème : 
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">Le lien créé
            pour le raccourci est :<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">              
            "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
            C:\Program Files (x86)\MonAppli\index.htm<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">Il ne met pas
            l'argument entre guillemet et comme l'argument comporte des
            espaces cela ne fonctionne pas :c/<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">J'ai bien
            essayé un :<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D">              
          </span><span style="color:#1F497D" lang="EN-US">arguments=r"%s"%makepath(programfiles32,"appliplanet","index.html")<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US">mais
            sans succès …<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="color:#1F497D" lang="EN-US"><o:p> </o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #E1E1E1
            1.0pt;padding:3.0pt 0cm 0cm 0cm">
            <p class="MsoNormal"><b><span
                  style="color:windowtext;mso-fareast-language:FR">De :</span></b><span
                style="color:windowtext;mso-fareast-language:FR"> WAPT [<a
                  moz-do-not-send="true"
                  href="mailto:wapt-bounces@lists.tranquil.it"><a class="moz-txt-link-freetext" href="mailto:wapt-bounces@lists.tranquil.it">mailto:wapt-bounces@lists.tranquil.it</a></a>]
                <b>De la part de</b> Hubert TOUVET<br>
                <b>Envoyé :</b> lundi 16 novembre 2015 15:16<br>
                <b>À :</b> <a moz-do-not-send="true"
                  href="mailto:wapt@lists.tranquil.it">wapt@lists.tranquil.it</a><br>
                <b>Objet :</b> Re: [Wapt] Raccourci vers une page web
                avec un navigateur précis<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal" style="margin-bottom:12.0pt"><span
            style="font-size:12.0pt;mso-fareast-language:FR"><o:p> </o:p></span></p>
        <div>
          <p class="MsoNormal">Le 16/11/2015 04:18, LEMAIRE Philippe a
            écrit :<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal">Bonjour,<o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal">Pour une nouvelle application j’aurais
            besoin de faire un raccourci pour ouvrir,
            <b>avec Firefox</b>, une page web hébergée en local.<o:p></o:p></p>
          <p class="MsoNormal">Le but n’est pas de passer Firefox comme
            navigateur par défaut mais d’ouvrir cette page web
            spécifique avec Firefox.<o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal">Le problème que je rencontre est au
            niveau du create_shortcut, impossible de trouver comment
            obtenir un raccourci de type :
            <o:p></o:p></p>
          <p class="MsoNormal" style="text-indent:35.4pt">‘C:\Program
            Files (x86)\Mozilla Firefox\firefox.exe’ ‘C:\Program Files
            (x86)\MonAppli\index.htm'<o:p></o:p></p>
          <p class="MsoNormal">J’avoue aussi que je me perds un peu dans
            les escapes ‘\’, quand faut-il les doubler ou ne surtout pas
            les doubler …<o:p></o:p></p>
        </blockquote>
        <p class="MsoNormal" style="margin-bottom:12.0pt"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman",serif;mso-fareast-language:FR">si on met un "r"
            devant la chaine, cela veut dire "chaine brute, ne pas
            interpréter les \ comme des caractères de controle" et donc
            il ne faut pas doubler les \.<br>
            <br>
            Si on ne met pas de de r devant la chaine, alors ils sont le
            signe de caractères de controle (par exemple \n est un
            retour à la ligne, \t est une tabulation etc...<br>
            Et donc pour avoir un vrai \, on le double.<br>
            <br>
            donc il ne faut pas en même temps mettre un r et doubler les
            \, sil on ne peut qu'un seul \
            <br>
            <br>
            Sinon avec makepath, on n'a pas le problème de \ ... <span
              class="moz-smiley-s3">
              ;-) </span><o:p></o:p></span></p>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal">Voici mon paquet (create_shortcut non
            valide):<o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal">def install():<o:p></o:p></p>
          <p class="MsoNormal">               print('installation du
            raccourcis : MonAppli')<o:p></o:p></p>
          <p class="MsoNormal">               <span lang="EN-US">copytree2(“MonAppli",makepath(programfiles32,"MonAppli"))<o:p></o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US">              
              mkdirs(makepath(start_menu(1),"Primaire"))<o:p></o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US">              
              remove_file(r'%s\\Primaire\\MonAppli.lnk'%start_menu(1))<o:p></o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US">              
              create_shortcut(makepath(start_menu(1),"Primaire\MonAppli.lnk"),
              <span style="background:yellow;mso-highlight:yellow">target=makepath(programfiles32,"Mozilla
                Firefox\firefox.exe ' C:\Program Files
                (x86)\MonAppli\index.htm'")</span>,
              icon=makepath(programfiles32,"MonAppli\images\MonAppli.ico"))<o:p></o:p></span></p>
          <p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
        </blockquote>
        <p class="MsoNormal" style="margin-bottom:12.0pt"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman",serif;mso-fareast-language:FR" lang="EN-US"><br>
          </span><span style="font-size:12.0pt;font-family:"Times
            New Roman",serif;mso-fareast-language:FR">le problème
            est qu'il faut mettre dans le pramaètre target le chemin
            vers l'executable et dans arguments les paramètres de
            l'appli.
            <br>
            <br>
            create_shortcut(<br>
                makepath(start_menu(1),'Primaire','MonAppli.lnk'),<br>
                target=makepath(programfiles32,'Mozilla
            Firefox','firefox.exe'),<br>
               
            arguments=makepath(programfiles32,'MonAppli','index.htm'),<br>
               
            icon=makepath(programfiles32,'MonAppli','images','MonAppli.ico'))<br>
            <br>
            <o:p></o:p></span></p>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal">def uninstall():<o:p></o:p></p>
          <p class="MsoNormal">               print('Suppression du
            raccourcis : MonAppli')<o:p></o:p></p>
          <p class="MsoNormal">               <span lang="EN-US">remove_tree(r'%s\\MonAppli’%programfiles32)
              <o:p></o:p></span></p>
        </blockquote>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman",serif;mso-fareast-language:FR" lang="EN-US">remove_tree(r'%s\MonAppli'%programfiles32)
            <o:p></o:p></span></p>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal"><span lang="EN-US">              
              remove_file(r'%s\\Primaire\\MonAppli.lnk'%start_menu(1))<o:p></o:p></span></p>
        </blockquote>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman",serif;mso-fareast-language:FR" lang="EN-US">remove_file(r'%s\Primaire\MonAppli.lnk'%start_menu(1))
            <o:p></o:p></span></p>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal"><span lang="EN-US"> <o:p></o:p></span></p>
          <p class="MsoNormal">Alors si une bonne âme avait une idée,
            une piste, une solution …
            <o:p></o:p></p>
          <p class="MsoNormal">Merci d’avance pour toute aide<o:p></o:p></p>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p class="MsoNormal">Cordialement<o:p></o:p></p>
          <p class="MsoNormal"><span lang="EN-US">Philippe<o:p></o:p></span></p>
          <p class="MsoNormal" style="margin-bottom:12.0pt"><span
              style="font-size:12.0pt;font-family:"Times New
              Roman",serif;mso-fareast-language:FR" lang="EN-US"><br>
              <br>
              <o:p></o:p></span></p>
          <pre><span lang="EN-US">_______________________________________________<o:p></o:p></span></pre>
          <pre><span lang="EN-US">WAPT mailing list<o:p></o:p></span></pre>
          <pre><a moz-do-not-send="true" href="mailto:WAPT@lists.tranquil.it"><span lang="EN-US">WAPT@lists.tranquil.it</span></a><span lang="EN-US"><o:p></o:p></span></pre>
          <pre><a moz-do-not-send="true" href="http://lists.tranquil.it/listinfo/wapt"><span lang="EN-US">http://lists.tranquil.it/listinfo/wapt</span></a><span lang="EN-US"><o:p></o:p></span></pre>
        </blockquote>
        <p class="MsoNormal"><span
            style="font-size:12.0pt;font-family:"Times New
            Roman",serif;mso-fareast-language:FR" lang="EN-US"><o:p> </o:p></span></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
WAPT mailing list
<a class="moz-txt-link-abbreviated" href="mailto:WAPT@lists.tranquil.it">WAPT@lists.tranquil.it</a>
<a class="moz-txt-link-freetext" href="http://lists.tranquil.it/listinfo/wapt">http://lists.tranquil.it/listinfo/wapt</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>