Retarder le lancement d'un logiciel

Résolu
centaure59 Messages postés 43 Date d'inscription mardi 21 septembre 2004 Statut Membre Dernière intervention 10 juillet 2017 - 7 nov. 2005 à 21:42
centaure59 Messages postés 43 Date d'inscription mardi 21 septembre 2004 Statut Membre Dernière intervention 10 juillet 2017 - 8 nov. 2005 à 09:20
bonjour, j'ai un petit soucis je voudrai retarder le demarrage d'un logiciel (45sec a peu pres) apres le lancement de windows, je cherché un logiciel pouvant faire cela et on ma conseiller un script visual basic, est ce que quelqu'un a une idée merci

4 réponses

cs_jeanmarc Messages postés 34 Date d'inscription mardi 18 juin 2002 Statut Membre Dernière intervention 22 novembre 2005
8 nov. 2005 à 06:16
Bonjour,
Exemple pour ouvrir un doc et l'imprimer.
Dim Fso, path, fichier, fichiers, WshShell
path = "E:\Affaires\EUROFACTOR - AP02N008\4.3 Formulaires\Formulaires spécifiques"


Set WshShell = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
Set dossier = fso.GetFolder(path)
Set fichiers = Dossier.Files


For Each fichier in fichiers
'MsgBox "shortPath=" & fichier.ShortPath & vbCrLf & "Path=" & fichier.Path
'MsgBox "shortName=" & fichier.ShortName & vbCrLf & "Name=" & fichier.Name
If Left(fichier.name,19) = "Main courante Ifdex" Then
WScript.Sleep(3000)
WshShell.Run fichier.ShortPath
WScript.Sleep(3000)
WshShell.SendKeys "^p"
WScript.Sleep(2000)
WshShell.SendKeys "{ENTER}" 'imprimer => ok
WScript.Sleep(3000)
WshShell.SendKeys "%(fq)" 'fermeture du document
WScript.Sleep(3000)
End If
Set fso = Nothing
3
cs_jeanmarc Messages postés 34 Date d'inscription mardi 18 juin 2002 Statut Membre Dernière intervention 22 novembre 2005
7 nov. 2005 à 21:53
Bonsoir,

Exemple de timer, en VBS:
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
WScript.Sleep(3000)
0
centaure59 Messages postés 43 Date d'inscription mardi 21 septembre 2004 Statut Membre Dernière intervention 10 juillet 2017
7 nov. 2005 à 22:05
UN grand merci pour ce debut de reponse, le probleme, je connais plus grand chose a la programmation(ca fait longtemps)
comment lance t'on un logiciliel apres??
MERCI
0
centaure59 Messages postés 43 Date d'inscription mardi 21 septembre 2004 Statut Membre Dernière intervention 10 juillet 2017
8 nov. 2005 à 09:20
Merci Jean-Marc pour cette reponse rapide, super sympa
0
Rejoignez-nous