Je me suis mis récemment à AutoIt pour automatiser mes tâches.
Je réalise un petit bot pour poster des annonces régulièrement et j'ai quelques difficultés à contrôler une fenêtre.
Le problème c'est que l'exécution du script a l'air de "s'arrêter" au moment où cette fenêtre apparait.
J'ai mis des msgbox pour vérifier mais elles ne s'affichent que quand je clique sur "Annuler", donc quand la fenêtre n'est plus active.
D'où cela peut-il venir svp ?
Merci !
Jerkiou.
Code : Tout sélectionner
#include <IE.au3>
Local $oIE = _IECreate("http://www2.leboncoin.fr/ai/form/0?ca=2_s")
Local $category = _IEGetObjById($oIE,"category")
_IEFormElementOptionSelect($category, 33, 1, "byValue")
Local $image0 = _IEGetObjById($oIE,"image0")
_IEAction($image0, "click")
if WinExists($handle) then
;ControlSetText ($handle, "", "[CLASS:ToolbarWindow32; INSTANCE:2]", "chemin_fichier")
MsgBox(0,"","Exists")
Else
MsgBox(0,"","does not exist")
endif