IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

VBScript Discussion :

checkbox - hta


Sujet :

VBScript

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre habitué
    Homme Profil pro
    Inscrit en
    Février 2013
    Messages
    10
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Février 2013
    Messages : 10
    Par défaut checkbox - hta
    Bonjour,
    Cela fait deux jours que je cherche un peu partout et une question me trotte dans la tête.
    Un bout de mon script est ainsi :
    Code HTML : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    <INPUT TYPE="checkbox" NAME="optLogiciel" VALUE="Acrobat">Acrobat<BR>
    <INPUT TYPE="checkbox" NAME="optLogiciel" VALUE="Firefox">Firefox<BR>
    <INPUT TYPE="checkbox" NAME="optLogiciel" VALUE="FlashIE">Flash IE<BR>
    <INPUT TYPE="checkbox" NAME="optLogiciel" VALUE="FlashFF" >Flash pour firefox<BR>
    <INPUT TYPE="checkbox" NAME="optLogiciel" VALUE="IZARC">IZARC<BR>
    <INPUT TYPE="checkbox" NAME="optLogiciel" VALUE="OPEN">Open office<BR>
    <INPUT TYPE="checkbox" NAME="optLogiciel" VALUE="pdfcreator" >pdfcreator<BR>
    <INPUT TYPE="checkbox" NAME="optLogiciel" VALUE="thunderbird">Thunderbird<BR>
    Ma question est la suivante :
    Est ce que la valeur saisie après le supérieur (ce qui correspond au mot en rouge) doit forcément être saisie manuellement ou peut on faire référence à un fichier texte par exemple.

    Si oui comment faire. Bonne journée.

    l'idée serait que j'aurai une liste de logiciel qui alimenterait ces checkbox et ainsi mon programme serait évolutif ou dynamique.

    Réalisable ou pas ? Faut changer le langage d'avance merci.

    Le bout de code précédément saisie est un bribre d'un hta couplé à du VBS.

    Je débutes et suis ouvert à toute proposition.

    Merci pour vos réponses. J'espère que mon POST est au bon endroit

  2. #2
    Expert confirmé
    Avatar de ProgElecT
    Homme Profil pro
    Retraité
    Inscrit en
    Décembre 2004
    Messages
    6 130
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 69
    Localisation : France, Haute Savoie (Rhône Alpes)

    Informations professionnelles :
    Activité : Retraité
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Décembre 2004
    Messages : 6 130
    Par défaut
    Salut

    Dans ce tutoriel
    Donner une interface à vos script VBS , HTA : Html Application il y a toutes les réponses .
    :whistle:pourquoi pas, pour remercier, un :plusser: pour celui/ceux qui vous ont dépannés.
    saut de ligne
    OOOOOOOOO👉 → → Ma page perso sur DVP ← ← 👈

  3. #3
    Expert confirmé
    Avatar de hackoofr
    Homme Profil pro
    Enseignant
    Inscrit en
    Juin 2009
    Messages
    3 844
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 50
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Enseignant

    Informations forums :
    Inscription : Juin 2009
    Messages : 3 844
    Par défaut

    Voila un autre exemple : HTA input exemple

  4. #4
    Membre habitué
    Homme Profil pro
    Inscrit en
    Février 2013
    Messages
    10
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Février 2013
    Messages : 10
    Par défaut
    excusez moi mais je me suis trompé dans ma demande.
    Je voudrais que le nom correspondant à la checkbox ne soit pas saisie manuellement (ce qui apparait à l'écran). Je ne par le pas du type ni du name et pas value non plus. J'ai beau relire je ne trouves pas comment faire .

    j'aurai donc un fichier de type

    a
    b
    c
    d
    e
    f
    g
    h

    ce qui me donnerai ce résultat :
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    <INPUT TYPE="checkbox" NAME="optLogiciel" VALUE="Acrobat">a<BR>
    <INPUT TYPE="checkbox" NAME="optLogiciel" VALUE="Firefox">b<BR>
    <INPUT TYPE="checkbox" NAME="optLogiciel" VALUE="FlashIE">c<BR>
    <INPUT TYPE="checkbox" NAME="optLogiciel" VALUE="FlashFF" >d<BR>
    <INPUT TYPE="checkbox" NAME="optLogiciel" VALUE="IZARC">e<BR>
    <INPUT TYPE="checkbox" NAME="optLogiciel" VALUE="OPEN">f<BR>
    <INPUT TYPE="checkbox" NAME="optLogiciel" VALUE="pdfcreator" >g<BR>
    <INPUT TYPE="checkbox" NAME="optLogiciel" VALUE="thunderbird">h<BR>
    Mais ce n'est peut être pas réalisable ?

    en tout cas merci pour vos réponses et de vos précieuses lumières.

  5. #5
    Expert confirmé
    Avatar de ProgElecT
    Homme Profil pro
    Retraité
    Inscrit en
    Décembre 2004
    Messages
    6 130
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 69
    Localisation : France, Haute Savoie (Rhône Alpes)

    Informations professionnelles :
    Activité : Retraité
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Décembre 2004
    Messages : 6 130
    Par défaut
    Re

    Pas super mon code , mais cela fonctionne
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    <head>
      <title> Un HTML Application </title>
      <hta:application
         id="NbrElementDynamique"
         applicationname="NbrElementDynamique"
         version="1" >
    </head>
    	<SCRIPT language="VBScript" type="text/VBScript" >
    	'------------------------------------------------------------------------------------------------------------------
    	Sub Window_Onload()
    		Dim FSO, LeFichier, PourTbl
    		Dim DossierDuProg 
    		Dim WshShell
     
    		Set WshShell = CreateObject("WScript.Shell")
    		DossierDuProg = WshShell.CurrentDirectory & "\"
    		Set WshShell = Nothing
     
    		Set FSO = CreateObject("Scripting.FileSystemObject")
    		Set LeFichier = FSO.OpenTextFile(DossierDuProg & "FichierArray.txt",1)
    		PourTbl = LeFichier.ReadAll: LeFichier.Close
    		Set FSO = Nothing
     
    		Dim MeTbl
    		MeTbl = split(PourTbl,vbNewLine)
    		N0.innerText = MeTbl(0)
    		N1.innerText = MeTbl(1)
    		N2.innerText = MeTbl(2)
    		N3.innerText = MeTbl(3)
    		N4.innerText = MeTbl(4)
    		N5.innerText = MeTbl(5)
    		N6.innerText = MeTbl(6)
    		N7.innerText = MeTbl(7)
     
    	End Sub
    	'----------------------------------------------------------------------------------------------------------------------
    	</SCRIPT>
    <body>
    <INPUT TYPE="checkbox" style="position:absolute; left:10px; top:10px; height:22px"
    		NAME="optLogiciel" VALUE="Acrobat"> <Div Id="N0" style="position:absolute; left:50px; top:10px; height:22px" > </Div>
    <INPUT TYPE="checkbox" style="position:absolute; left:10px; top:40px; height:22px"
    		NAME="optLogiciel" VALUE="Firefox"> <Div Id="N1" style="position:absolute; left:50px; top:40px; height:22px" > </Div>
    <INPUT TYPE="checkbox" style="position:absolute; left:10px; top:70px; height:22px"
    		NAME="optLogiciel" VALUE="FlashIE"> <Div Id="N2" style="position:absolute; left:50px; top:70px; height:22px" > </Div>
    <INPUT TYPE="checkbox" style="position:absolute; left:10px; top:100px; height:22px"
    		NAME="optLogiciel" VALUE="FlashFF" > <Div Id="N3" style="position:absolute; left:50px; top:100px; height:22px" > </Div>
    <INPUT TYPE="checkbox" style="position:absolute; left:10px; top:130px; height:22px"
    		NAME="optLogiciel" VALUE="IZARC"> <Div Id="N4" style="position:absolute; left:50px; top:130px; height:22px" > </Div>
    <INPUT TYPE="checkbox" style="position:absolute; left:10px; top:160px; height:22px"
    		NAME="optLogiciel" VALUE="OPEN"> <Div Id="N5" style="position:absolute; left:50px; top:160px; height:22px" > </Div>
    <INPUT TYPE="checkbox" style="position:absolute; left:10px; top:190px; height:22px"
    		NAME="optLogiciel" VALUE="pdfcreator" > <Div Id="N6" style="position:absolute; left:50px; top:190px; height:22px" > </Div>
    <INPUT TYPE="checkbox" style="position:absolute; left:10px; top:220px; height:22px"
    		NAME="optLogiciel" VALUE="thunderbird"> <Div Id="N7" style="position:absolute; left:50px; top:220px; height:22px" > </Div>
    </body>
    Le fichier FichierArray.txt et dans le dossier du HTA, il a 8 lignes, de a à h.
    :whistle:pourquoi pas, pour remercier, un :plusser: pour celui/ceux qui vous ont dépannés.
    saut de ligne
    OOOOOOOOO👉 → → Ma page perso sur DVP ← ← 👈

  6. #6
    Membre habitué
    Homme Profil pro
    Inscrit en
    Février 2013
    Messages
    10
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Février 2013
    Messages : 10
    Par défaut
    Merci beaucoup ProgElecT,
    Dans notre cas le nombre d'entrée de notre fichier atteint un total de 8.
    Si le nombre d'entrée du fichier est indéfini et sera donc aléatoire (par exemple un coup 2, 20, 25, 1, etc....)
    Comment gérer l'intitulé des checkbox et leur affichage en fonction de ce nombre aléatoire.
    En tout cas merci de votre aide.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Checkbox application HTA
    Par zilfou dans le forum VBScript
    Réponses: 7
    Dernier message: 10/06/2015, 00h48
  2. [VB.NET] Insérer une colonne de CheckBox dans un DataGrid
    Par Manue.35 dans le forum Windows Forms
    Réponses: 2
    Dernier message: 22/05/2003, 11h44
  3. Checkbox
    Par rgarnier dans le forum XMLRAD
    Réponses: 11
    Dernier message: 06/03/2003, 10h48
  4. Couleur d'un CheckBox
    Par benj63 dans le forum C++Builder
    Réponses: 4
    Dernier message: 15/07/2002, 14h48
  5. CheckBox en Read Only
    Par MrJéjé dans le forum C++Builder
    Réponses: 7
    Dernier message: 23/06/2002, 15h00

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo