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 :

Affichage d'un message d'attente pendant l’exécution du script


Sujet :

VBScript

  1. #1
    Nouveau membre du Club
    Homme Profil pro
    Responsable de service informatique
    Inscrit en
    Juillet 2014
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Responsable de service informatique

    Informations forums :
    Inscription : Juillet 2014
    Messages : 26
    Points : 30
    Points
    30
    Par défaut Affichage d'un message d'attente pendant l’exécution du script
    Bonjour le forum,

    Je cherche désespérément depuis plusieurs jours le moyen d'afficher un popup pendant l'exécution de mon script.
    J'ai trouvé qqes petits bouts de code qui permettent d'afficher le message pendant un laps de temps déterminé mais pas pendant toute l'exécution de mon script.
    J'ai des commandes de copies de fichiers très lourds, donc le temps d'attente peut se compter en heure.

    Avez-vous une idée?
    Pour info voici mon code:
    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
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    Dim objFileSystemObject, fsO, FL, FD, strFolderPath, oFSO, oFld 
    Dim oShell, oExec, sK, ScriptPath
     
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set objFileSystemObject = CreateObject("Scripting.FileSystemObject")
     
    strFolderPath = "F:\CopyTool"
     
    If Not objFileSystemObject.FolderExists(strFolderPath) Then
    	msgBox("Vérifiez que le lecteur USB3.0 est bien référencé en lecteur réseau F:\, ou bien vérifiez qu'il existe bien un répertoire CopyTool sur le disque de données.")
    Else 
    	Set FD = fso.GetFolder("F:\CopyTool\Database")
    	FD.Name="Data"
    End If
    Set fso = Nothing
    Set FD = Nothing
     
    Set fso = CreateObject("Scripting.FileSystemObject")
     
    path = "C:\bvsys\TurnoutView3.7.2\Parameter\Directories.var"
    content = fso.OpenTextFile(path,1).ReadAll
    With New RegExp 
            .Global = True
            .Pattern = "W:\\SIM09\\[^\\]+"
            srepl = .Replace(content, GetRef("repl"))
    End With 
    fso.CreateTextFile(path,True).Write srepl
     
    Set objFileSystemObject = CreateObject("Scripting.FileSystemObject")
     
    strFolderPath = "W:\SIM09\" & Date
     
    CreateFullPath = False
    If Not objFileSystemObject.FolderExists(strFolderPath) Then
    	Set fs = CreateObject("Scripting.FileSystemObject") 
    	fs.CreateFolder (strFolderPath)
    	    'msgbox("Dossier Date créé")
            If Err.number <> 0 Then
               CreateFullPath = False ' Error while creating
               Call Err.Clear()
            End If
            On Error Goto 0
    Else
       CreateFullPath = True
       'msgbox("Le dossier Date existe déjà")
    End If
     
    Set objFileSystemObject = Nothing
     
    Set oFSO = CreateObject("Scripting.FileSystemObject") 
    Set oCrFld= CreateObject("Scripting.FileSystemObject")
     
    set oFld = oFSO.GetFolder("F:\CopyTool\Data") 
    oCrFld.CreateFolder("W:\SIM09\" & Date & "\Data")
    oFld.Copy "W:\SIM09\" & Date & "\Data",True
    set oFld = oFSO.GetFolder("F:\CopyTool\RawData") 
    oCrFld.CreateFolder("W:\SIM09\" & Date & "\RawData")
    oFld.Copy "W:\SIM09\" & Date & "\RawData",True
    set oFld = oFSO.GetFolder("F:\Zoes") 
    oCrFld.CreateFolder("W:\SIM09\" & Date & "\Zoes")
    oFld.Copy "W:\SIM09\" & Date & "\Zoes",True
     
    WScript.Quit
     
    Function FolderExists(strFolderPath)
        Dim fileObject
     
        Set fileObject = CreateObject("Scripting.FileSystemObject")
     
        On Error Resume Next ' Si erreur, continuer
        FolderExists     = fileObject.FolderExists(strFolderPath)
        If Err.number <> 0 Then
            FolderExists = False
            Call Err.Clear()
        End If
        On Error Goto 0
        Set fileObject = Nothing
    End Function
     
    Function repl(m,p,s)
        repl =  "W:\SIM09\" & Date 
    End Function
    D'avance merci pour votre aide.

  2. #2
    Nouveau membre du Club
    Homme Profil pro
    Responsable de service informatique
    Inscrit en
    Juillet 2014
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Responsable de service informatique

    Informations forums :
    Inscription : Juillet 2014
    Messages : 26
    Points : 30
    Points
    30
    Par défaut
    Bon j'ai finalement trouvé un petit bout de code me permettant de faire qqchose.

    Résolu, et bonne journée à tous!

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

    Informations professionnelles :
    Activité : Enseignant

    Informations forums :
    Inscription : Juin 2009
    Messages : 3 839
    Points : 9 222
    Points
    9 222
    Par défaut
    Citation Envoyé par nikkss Voir le message
    Bon j'ai finalement trouvé un petit bout de code me permettant de faire qqchose.
    Résolu, et bonne journée à tous!

    Tu sais que tu peux partager ta solution avec nous, ça peut aider d'autres personnes

  4. #4
    Nouveau membre du Club
    Homme Profil pro
    Responsable de service informatique
    Inscrit en
    Juillet 2014
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Responsable de service informatique

    Informations forums :
    Inscription : Juillet 2014
    Messages : 26
    Points : 30
    Points
    30
    Par défaut
    Bien sûr,

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    Set oSh=CreateObject("WScript.Shell")
    If WScript.Arguments.Count = 1 Then
    If WScript.Arguments(0) = "popup" Then
    While True
    oSh.Popup "Copie en cours, patientez..."
    Wend
    End If
    End If
     
    Set oExec=oSh.Exec ("WScript " & WScript.ScriptFullName & " popup")

  5. #5
    Nouveau membre du Club
    Homme Profil pro
    Responsable de service informatique
    Inscrit en
    Juillet 2014
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Responsable de service informatique

    Informations forums :
    Inscription : Juillet 2014
    Messages : 26
    Points : 30
    Points
    30
    Par défaut
    Parc contre, j'ai un message d'erreur à la ligne:
    Dans mon code global:
    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
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    Dim objFileSystemObject, fsO, FL, FD, strFolderPath, oFSO, oFld 
    Dim oSh, oExec, sK, ScriptPath
     
    Set oSh=CreateObject("WScript.Shell")
    If WScript.Arguments.Count = 1 Then
    If WScript.Arguments(0) = "popup" Then
    While True
    oSh.Popup "Copie en cours, patientez..."
    Wend
    End If
    End If
     
    Set oExec=oSh.Exec ("WScript " & WScript.ScriptFullName & " popup")
     
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set objFileSystemObject = CreateObject("Scripting.FileSystemObject")
     
    strFolderPath = "F:\CopyTool"
     
    If Not objFileSystemObject.FolderExists(strFolderPath) Then
    	msgBox("Vérifiez que le lecteur USB3.0 est bien référencé en lecteur réseau F:\, ou bien vérifiez qu'il existe bien un répertoire CopyTool sur le disque de données.")
    Else 
    	Set FD = fso.GetFolder("F:\CopyTool\Database")
    	FD.Name="Data"
    End If
    Set fso = Nothing
    Set FD = Nothing
     
    Set fso = CreateObject("Scripting.FileSystemObject")
     
    path = "C:\bvsys\TurnoutView3.7.2\Parameter\Directories.var"
    content = fso.OpenTextFile(path,1).ReadAll
    With New RegExp 
            .Global = True
            .Pattern = "W:\\SIM09\\[^\\]+"
            srepl = .Replace(content, GetRef("repl"))
    End With 
    fso.CreateTextFile(path,True).Write srepl
     
    Set objFileSystemObject = CreateObject("Scripting.FileSystemObject")
     
    strFolderPath = "W:\SIM09\" & Date
     
    CreateFullPath = False
    If Not objFileSystemObject.FolderExists(strFolderPath) Then
    	Set fs = CreateObject("Scripting.FileSystemObject") 
    	fs.CreateFolder (strFolderPath)
    	    'msgbox("Dossier Date créé")
            If Err.number <> 0 Then
               CreateFullPath = False ' Error while creating
               Call Err.Clear()
            End If
            On Error Goto 0
    Else
       CreateFullPath = True
       'msgbox("Le dossier Date existe déjà")
    End If
     
    Set objFileSystemObject = Nothing
     
    Set oFSO = CreateObject("Scripting.FileSystemObject") 
    Set oCrFld= CreateObject("Scripting.FileSystemObject")
     
    set oFld = oFSO.GetFolder("F:\CopyTool\Data") 
    oCrFld.CreateFolder("W:\SIM09\" & Date & "\Data")
    oFld.Copy "W:\SIM09\" & Date & "\Data",True
    set oFld = oFSO.GetFolder("F:\CopyTool\RawData") 
    oCrFld.CreateFolder("W:\SIM09\" & Date & "\RawData")
    oFld.Copy "W:\SIM09\" & Date & "\RawData",True
    set oFld = oFSO.GetFolder("F:\Zoes") 
    oCrFld.CreateFolder("W:\SIM09\" & Date & "\Zoes")
    oFld.Copy "W:\SIM09\" & Date & "\Zoes",True
     
    oExec.Terminate
    WScript.Quit
     
    Function FolderExists(strFolderPath)
        Dim fileObject
     
        Set fileObject = CreateObject("Scripting.FileSystemObject")
     
        On Error Resume Next ' Si erreur, continuer
        FolderExists     = fileObject.FolderExists(strFolderPath)
        If Err.number <> 0 Then
            FolderExists = False
            Call Err.Clear()
        End If
        On Error Goto 0
        Set fileObject = Nothing
    End Function
     
    Function repl(m,p,s)
        repl =  "W:\SIM09\" & Date 
    End Function
    Je pense que ça doit être un truc simple, mais je ne comprends pas bien..

  6. #6
    Membre averti
    Homme Profil pro
    Administrateur systèmes et réseaux
    Inscrit en
    Novembre 2011
    Messages
    163
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Administrateur systèmes et réseaux
    Secteur : High Tech - Opérateur de télécommunications

    Informations forums :
    Inscription : Novembre 2011
    Messages : 163
    Points : 304
    Points
    304
    Par défaut
    EDIT : Première réponse erronée !

    Bonjour,

    Peux-tu essayer ceci :
    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
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    Dim objFileSystemObject, fsO, FL, FD, strFolderPath, oFSO, oFld 
    Dim oSh, oExec, sK, ScriptPath
     
    Set oSh=CreateObject("WScript.Shell")
    If WScript.Arguments.Count = 1 Then
    If WScript.Arguments(0) = "popup" Then
    While True
    oSh.Popup "Copie en cours, patientez..."
    Wend
    End If
    End If
     
    Set oExec=oSh.Exec ("WScript " & WScript.ScriptFullName & " popup") : oExec.Terminate
     
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set objFileSystemObject = CreateObject("Scripting.FileSystemObject")
     
    strFolderPath = "F:\CopyTool"
     
    If Not objFileSystemObject.FolderExists(strFolderPath) Then
    	msgBox("Vérifiez que le lecteur USB3.0 est bien référencé en lecteur réseau F:\, ou bien vérifiez qu'il existe bien un répertoire CopyTool sur le disque de données.")
    Else 
    	Set FD = fso.GetFolder("F:\CopyTool\Database")
    	FD.Name="Data"
    End If
    Set fso = Nothing
    Set FD = Nothing
     
    Set fso = CreateObject("Scripting.FileSystemObject")
     
    path = "C:\bvsys\TurnoutView3.7.2\Parameter\Directories.var"
    content = fso.OpenTextFile(path,1).ReadAll
    With New RegExp 
            .Global = True
            .Pattern = "W:\\SIM09\\[^\\]+"
            srepl = .Replace(content, GetRef("repl"))
    End With 
    fso.CreateTextFile(path,True).Write srepl
     
    Set objFileSystemObject = CreateObject("Scripting.FileSystemObject")
     
    strFolderPath = "W:\SIM09\" & Date
     
    CreateFullPath = False
    If Not objFileSystemObject.FolderExists(strFolderPath) Then
    	Set fs = CreateObject("Scripting.FileSystemObject") 
    	fs.CreateFolder (strFolderPath)
    	    'msgbox("Dossier Date créé")
            If Err.number <> 0 Then
               CreateFullPath = False ' Error while creating
               Call Err.Clear()
            End If
            On Error Goto 0
    Else
       CreateFullPath = True
       'msgbox("Le dossier Date existe déjà")
    End If
     
    Set objFileSystemObject = Nothing
     
    Set oFSO = CreateObject("Scripting.FileSystemObject") 
    Set oCrFld= CreateObject("Scripting.FileSystemObject")
     
    set oFld = oFSO.GetFolder("F:\CopyTool\Data") 
    oCrFld.CreateFolder("W:\SIM09\" & Date & "\Data")
    oFld.Copy "W:\SIM09\" & Date & "\Data",True
    set oFld = oFSO.GetFolder("F:\CopyTool\RawData") 
    oCrFld.CreateFolder("W:\SIM09\" & Date & "\RawData")
    oFld.Copy "W:\SIM09\" & Date & "\RawData",True
    set oFld = oFSO.GetFolder("F:\Zoes") 
    oCrFld.CreateFolder("W:\SIM09\" & Date & "\Zoes")
    oFld.Copy "W:\SIM09\" & Date & "\Zoes",True
     
    WScript.Quit
     
    Function FolderExists(strFolderPath)
        Dim fileObject
     
        Set fileObject = CreateObject("Scripting.FileSystemObject")
     
        On Error Resume Next ' Si erreur, continuer
        FolderExists     = fileObject.FolderExists(strFolderPath)
        If Err.number <> 0 Then
            FolderExists = False
            Call Err.Clear()
        End If
        On Error Goto 0
        Set fileObject = Nothing
    End Function
     
    Function repl(m,p,s)
        repl =  "W:\SIM09\" & Date 
    End Function

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

    Informations professionnelles :
    Activité : Enseignant

    Informations forums :
    Inscription : Juin 2009
    Messages : 3 839
    Points : 9 222
    Points
    9 222
    Par défaut Message d'attente avec une barre de progression

    Essayez d’adapter ce bout de code
    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
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    Option Explicit
    Dim fso,ws,Temp,Titre,MsgTitre,MsgAttente,Copyright,oExec
    Set fso = CreateObject("Scripting.FileSystemObject")
    Copyright = "© Hackoo © 2014"
    Set ws = CreateObject("WScript.Shell")
    Temp = ws.ExpandEnvironmentStrings("%Temp%")
    Titre = "Veuillez patienter le proccessus de la copie est en cours . . . " & Copyright
    MsgAttente = "Veuillez patienter le proccessus de la copie est en cours . . ." 
    Call CreateProgressBar(Titre,MsgAttente)
    Call LancerProgressBar()
    '******************************************************************
    'Pause de 30s pour simuler un processus (copie par exemple) en cours.
    'Vous pouvez remplacer cette pause par votre programme prinicpal.
    Call Pause(30) 
    '******************************************************************
    Call FermerProgressBar()
    MsgBox "La copie est terminé !",VbInformation,"La copie est terminé !"
    '***********************************************************************************************************
    Sub CreateProgressBar(Titre,MsgAttente)
        Dim ws,fso,f,f2,ts,ts2,Ligne,i,fread,LireTout,NbLigneTotal,Temp,PathOutPutHTML,fhta,oExec
        Set ws = CreateObject("wscript.Shell")
        Set fso = CreateObject("Scripting.FileSystemObject")
        Temp = WS.ExpandEnvironmentStrings("%Temp%")
        PathOutPutHTML = Temp & "\Barre.hta"
        Set fhta = fso.OpenTextFile(PathOutPutHTML,2,True)
        fhta.WriteLine "<HTML>"
        fhta.WriteLine "<HEAD>"
        fhta.WriteLine "<Title>  " & Titre & "</Title>"
        fhta.WriteLine "<HTA:APPLICATION"
        fhta.WriteLine "ICON = ""magnify.exe"" "
        fhta.WriteLine "BORDER=""THIN"" "
        fhta.WriteLine "INNERBORDER=""NO"" "
        fhta.WriteLine "MAXIMIZEBUTTON=""NO"" "
        fhta.WriteLine "MINIMIZEBUTTON=""NO"" "
        fhta.WriteLine "SCROLL=""NO"" "
        fhta.WriteLine "SYSMENU=""NO"" "
        fhta.WriteLine "SELECTION=""NO"" "
        fhta.WriteLine "SINGLEINSTANCE=""YES"">"
        fhta.WriteLine "</HEAD>"
        fhta.WriteLine "<BODY text=""white""><CENTER>"
        fhta.WriteLine "<marquee DIRECTION=""LEFT"" SCROLLAMOUNT=""3"" BEHAVIOR=ALTERNATE><font face=""Comic sans MS"">" & MsgAttente &"</font></marquee>"
        fhta.WriteLine "<img src=""data:image/gif;base64,R0lGODlhgAAPAPIAAP////INPvvI0/q1xPVLb/INPgAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAgAAPAAAD5wiyC/6sPRfFpPGqfKv2HTeBowiZGLORq1lJqfuW7Gud9YzLud3zQNVOGCO2jDZaEHZk+nRFJ7R5i1apSuQ0OZT+nleuNetdhrfob1kLXrvPariZLGfPuz66Hr8f8/9+gVh4YoOChYhpd4eKdgw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5sXXScYnvcP6swJqux2MMjTeiEjlbyl5MAHAlTEarzasv+8RCu9uvjTuWTgXedFhdBLfLbGf5jF7b30e3PA+/739ncVp4VnqDf2R8ioBTgoaPfYSJhZGIYhN0BZqbBROcm56fnQ+iow6loZ+pnKugpKKtmrGmAAO2twOor6q7rL2up7C/ssO0usG8yL7KwLW4tscA0dPCzMTWxtXS2tTJ297P0Nzj3t3L3+fmzerX6M3hueTp8uv07ezZ5fa08Piz/8UAYhPo7t6+CfDcafDGbOG5hhcYKoz4cGIrh80cPAOQAAAh+QQJCgAAACwAAAAAgAAPAAAD5wi0C/6sPRfJpPGqfKv2HTeBowiZGLORq1lJqfuW7Gud9YzLud3zQNVOGCO2jDZaEHZk+nRFJ7R5i1apSuQ0OZT+nleuNetdhrfob1kLXrvPariZLGfPuz66Hr8f8/9+gVh4YoOChYhpd4eKdgwFkJEFE5KRlJWTD5iZDpuXlZ+SoZaamKOQp5wAm56loK6isKSdprKotqqttK+7sb2zq6y8wcO6xL7HwMbLtb+3zrnNycKp1bjW0NjT0cXSzMLK3uLd5Mjf5uPo5eDa5+Hrz9vt6e/qosO/GvjJ+sj5F/sC+uMHcCCoBAA7AAAAAAAAAAAA"" />"
        fhta.WriteLine "</CENTER></BODY></HTML>"
        fhta.WriteLine "<SCRIPT LANGUAGE=""VBScript""> "
        fhta.WriteLine "Set ws = CreateObject(""wscript.Shell"")"
        fhta.WriteLine "Temp = WS.ExpandEnvironmentStrings(""%Temp%"")"
        fhta.WriteLine "Sub window_onload()"
        fhta.WriteLine "    CenterWindow 500,110"
        fhta.WriteLine "    Self.document.bgColor = ""DarkOrange"" "
        fhta.WriteLine " End Sub"
        fhta.WriteLine " Sub CenterWindow(x,y)"
        fhta.WriteLine "    Dim iLeft,itop"
        fhta.WriteLine "    window.resizeTo x,y"
        fhta.WriteLine "    iLeft = window.screen.availWidth/2 - x/2"
        fhta.WriteLine "    itop = window.screen.availHeight/2 - y/2"
        fhta.WriteLine "    window.moveTo ileft,itop"
        fhta.WriteLine "End Sub"
        fhta.WriteLine "</script>"
        fhta.close
    End Sub
    '**********************************************************************************************
    Sub LancerProgressBar()
        Set oExec = Ws.Exec("mshta.exe " & Temp & "\Barre.hta")
    End Sub
    '**********************************************************************************************
    Sub FermerProgressBar()
        oExec.Terminate
    End Sub
    '**********************************************************************************************
    Sub Pause(NSeconds)
        Wscript.Sleep(NSeconds*1000)
    End Sub  
    '**********************************************************************************************
    Function DblQuote(Str)
        DblQuote = Chr(34) & Str & Chr(34)
    End Function
    '**********************************************************************************************

  8. #8
    Rédacteur
    Avatar de omen999
    Profil pro
    Inscrit en
    Février 2006
    Messages
    1 296
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2006
    Messages : 1 296
    Points : 3 549
    Points
    3 549
    Par défaut
    bonjour,
    Je pense que ça doit être un truc simple, mais je ne comprends pas bien..
    c'est toujours le même problème avec le copié/collé, y'a toujours des bouts qui se perdent en route ou qui
    ne sont pas raccord...supprime ta ligne oExec.Terminate qui ne sert à rien
    nomen omen, nemo non omen - Consultez la FAQ VBScript et les cours et tutoriels VBScript
    le plus terrible lorsqu'une voiture renverse un piéton, c'est que ce sont les freins qui hurlent. (ramón)
    pas de questions techniques par mp

  9. #9
    Nouveau membre du Club
    Homme Profil pro
    Responsable de service informatique
    Inscrit en
    Juillet 2014
    Messages
    26
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 43
    Localisation : France, Hauts de Seine (Île de France)

    Informations professionnelles :
    Activité : Responsable de service informatique

    Informations forums :
    Inscription : Juillet 2014
    Messages : 26
    Points : 30
    Points
    30
    Par défaut
    Merci bien à tous.
    Je regarde ça asap.

    Résolu.

  10. #10
    Modérateur
    Avatar de l_autodidacte
    Homme Profil pro
    Retraité : Directeur de lycée/Professeur de sciences physiques
    Inscrit en
    Juillet 2009
    Messages
    2 415
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 68
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Retraité : Directeur de lycée/Professeur de sciences physiques
    Secteur : Enseignement

    Informations forums :
    Inscription : Juillet 2009
    Messages : 2 415
    Points : 5 806
    Points
    5 806
    Par défaut
    Citation Envoyé par nikkss Voir le message
    Merci bien à tous.
    Je regarde ça asap.
    Résolu.
    Si c'est résolu, merci de cliquer sur le bouton en bas de cette page
    Ne pas oublier le tag si satisfait.
    Voter pour toute réponse satisfaisante avec pour encourager les intervenants.
    Balises CODE indispensables. Regardez ICI
    Toujours utiliser la clause Option Explicit(VBx, VBS ou VBA) et Ne jamais typer variables et/ou fonctions en VBS.
    Vous pouvez consulter mes contributions
    Ne pas oublier de consulter les différentes FAQs et les Cours/Tutoriels VB6/VBScript
    Ne pas oublier L'Aide VBScript et MSDN VB6 Fr

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

Discussions similaires

  1. Affichage message d'attente pendant mon traitement Java
    Par djerk dans le forum Développement Web en Java
    Réponses: 11
    Dernier message: 16/07/2013, 10h02
  2. Affichage d'un message d'attente pendant l'exécution d'une macro
    Par shadok6 dans le forum Macros et VBA Excel
    Réponses: 1
    Dernier message: 08/10/2008, 14h49
  3. Message d'attente pendant traitement côté serveur
    Par bouliz dans le forum ASP.NET
    Réponses: 13
    Dernier message: 09/07/2007, 11h55
  4. Réponses: 3
    Dernier message: 29/11/2006, 10h45
  5. Message d'attente pendant pilotage Ole Excel
    Par yottatiger dans le forum C++Builder
    Réponses: 3
    Dernier message: 13/09/2005, 09h14

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