ExeRun(CompleteDir(fCurrentDir()) + "WDOptimiseur.EXE /Fic=" + psDataDir + " /option=4 /Sauve=Non", exeActive, exeWait)
L'optimisation des fichiers contenus dans le répertoire
'N:\Net3F\SMS_CL\Data' s'est terminée correctement.
//Procédure pour traper les message envoyer par WDOptimiseur
PROCEDURE WaitForMsgWDO()
nHandle is int
nHandleBtn is int
LOOP
IF fbEndThread THEN BREAK
//Voir s'il ya une fenètre qui a WDOptimiseur comme titre
nHandle = SysFenHandle("WDOptimiseur")
IF nHandle <> Null THEN
IF SysValidHandle(nHandle) THEN
SysWinActive(nHandle)
//Voir si dans la fenêtre il y a une bouton OK
nHandleBtn = API("USER32", "FindWindowExA", nHandle, 0, "", "OK")
IF nHandleBtn <> Null THEN
//Si oui on simule le clic gauche
SendMessage(nHandleBtn, 513, 0, 0) //LEFt MOUSE DOWN
SendMessage(nHandleBtn, 514, 0, 0) //LEFT MOUSE UP
END
END
ELSE
//VOIR POUR LES ANGLOPHONES
nHandle = SysWinHandle("WDOptimizer")
IF nHandle <> Null THEN
IF SysValidHandle(nHandle) THEN
SysWinActive(nHandle)
//Voir si dans la fenêtre il y a une bouton OK
nHandleBtn = API("USER32", "FindWindowExA", nHandle, 0, 0, "OK")
IF nHandleBtn <> Null THEN
//Si oui on simule le clic gauche
SendMessage(nHandleBtn, 513, 0, 0) //LEFt MOUSE DOWN
SendMessage(nHandleBtn, 514, 0, 0) //LEFT MOUSE UP
END
END
END
END
Multitask(-100)
END
nHandle = SysFenHandle("")
nHandle = SysFenHandle("WDOptimiseur")
Cette contribution était de : http://old.wdforge.org/newbb/viewtopic.php?forum=12&topic_id=1712&post_id=7128