Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1473 connectés 

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Script

n°2593102
plopiche
Posté le 13-12-2006 à 11:16:40  profilanswer
 

Bonjour,
 
Je voudrais écrire un petit script pour lancer un logiciel mais je ne sais pas trop comment m'y prendre.
J'ai compris qu'il fallait écrire mes instructions en langage MS Dos dans un fichier .text puis le renommer en .bat
 
Je dois exécuter successivement 2 fichiers :
l'un est un fichier.bat qui ouvre une fenêtre Dos (qui doit rester ouverte réduite en bas de l'écran)
L'autre lance un fichier .kml qui doit être lancé lorsque le 1er fichier à terminé son exécution
Peut-être avec une pause entre les deux si je ne sais pas faire mieux.
 
Quelqu'un sait m'aider ?
 
Merci
 


---------------
Je suis le génial inventeur des lunettes de soleil avec un petit grillage sur les trous de nez permettant de humer le parfum enivrant des fleurs sans respirer un horrible insecte piquant !!! :lol:
mood
Publicité
Posté le 13-12-2006 à 11:16:40  profilanswer
 

n°2594638
plopiche
Posté le 15-12-2006 à 10:24:29  profilanswer
 

:cry:  Personne ne sait ?


---------------
Je suis le génial inventeur des lunettes de soleil avec un petit grillage sur les trous de nez permettant de humer le parfum enivrant des fleurs sans respirer un horrible insecte piquant !!! :lol:
n°2594643
Z_cool
HFR profile rating:⭐⭐⭐⭐
Posté le 15-12-2006 à 10:29:49  profilanswer
 

c est quoi un fichier .kml ?
 
cela dit, attendre qu un fichier existe ca risque d etre pas facile, peut etre avec des Goto .... ?
ce fichier qui doit exister ou non, il y aurra quoi dedant ?

n°2594659
blueteen
Posté le 15-12-2006 à 10:42:50  profilanswer
 

salut,
tu n'as plus d'infos sur les commandes à exécuter ? (pourquoi 2 batchs différents par exemple ?)
tu as, en batch, la commande 'start' avec ces options : (notamment l'option 'wait')
 

Citation :


START Command
 
The START command can launch a Windows program either by specifying the program name (and its command-line parameters), or by specifying a data file name that is associated with a particular program (one that would automatically launch if you clicked on it in Windows).
 
For example, if you have NOTEPAD.EXE associated with all TXT files, then you could open the file SOME.TXT in any of the following four ways:
 
NOTEPAD SOME.TXT
SOME.TXT
START NOTEPAD.EXE SOME.TXT
START SOME.TXT
 
Why use one or the other? Well, sometimes you may have to use one particular form to get a result — depending, for example, on how the particular program is coded. Though the first form usually will work, you may want, for example, to write a more general batch file to open any particular program and associated file — without knowing what the requirements of all such files might be. You could, then, write a general batch file line such as START %1% %2%.
 
One particular use of the START command is to launch the default browser and go directly to a URL, for example: START http://google.com
 
You may use any of four command line parameters with the START command. These go after the word START, but before the program name:
 
/minimized or /m
/maximized or /max
/restored or /r
/wait or /w
 
The first three determine the screen status in which the program opens. The last one forces the batch file to halt processing until the called program has finished executing. (This can be useful, for example, if you are loading multiple items in your windows Startup folder, and the nature of the programs require that one be finished before the next starts loading. Put them all in a single batch file, using the /wait parameter, and only put a shortcut to the batch file in the Startup folder.) Command line parameters of the START command can be combined in a single line. Example:
 
START /max /wait NOTEPAD.EXE SOME.TXT


 
tu as aussi la commande 'CHOICE'
 

Citation :


Make Your Batch Files Wait a Bit by Using CHOICE.   CHOICE has an option to wait `n' seconds and then execute one of the choices as pre-selected by the batch file author. The limit is only 99 seconds, but may be useful if a short delay will suffice. See the `/T' switch option in your DOS documentation.  


qui peut lancer une action avec un décalage de 99 seconde.
 
on peut envisager que tu lances le second batch, à la fin de l'exécution du premier, avec cette temporisation.
mais ce n'est pas parfait, car s'il y un retard pour une raison quelconque dans l'exécution du premier batch, ça peut foirer.
bref, on manque un peu d'éléments :)
ce script va être exécuté sur quel windows ?
au pire il existe d'autres langages.
"autoit" peut dépanner dans bien des cas !
tu pourrais exécuter sans problème tes scripts de façon successive.


Message édité par blueteen le 15-12-2006 à 10:51:19

Aller à :
Ajouter une réponse
 

Sujets relatifs
Lancer un script toutes les minutes (VBS)script php qu'utilise par ex streetfire, youtube etc
Windows Script host est désactivé ....Script Connexion
Aidez moi a faire un scriptScript Wake On Lan via Internet (Wake On Wan)
dézipper un script par FTPScript windows server 2k3
Plus de sujets relatifs à : Script


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR