PROCEDURE SetText(Txt est chaîne)
AppelDLL32("USER32","SendMessageA",AOL_EditBox, WM_SETTEXT, Taille(Txt), Txt)
PROCEDURE ClickIconSend() // Click sur une icone AOL
AppelDLL32("USER32","SendMessageA",AOL_IconSend,WM_LBUTTONDOWN, 0, 0)
AppelDLL32("USER32","SendMessageA",AOL_IconSend,WM_KEYUP, VK_SPACE, 0)
FONCTION AOL_GetHandles()
ValeurRetour est booléen
// Déclare les variables
AOL est entier; Mdi est entier; Child est entier; Rich est entier; AOLList est entier; AOLIcon est entier; AOLStatic est entier; RichLS est entier; Ico1 est entier; Ico2 est entier
// Récupère des handles principaux
AOL=API("USER32","FindWindowA","AOL FRAME25", Caract(0))
Mdi=API("USER32","FindWindowExA",AOL,0,"MDIClient", Caract(0))
// Boucle pour trouver le salon
// Trouve la child
Child=API("USER32","FindWindowExA",Mdi,Child,"MDIClient", "AOL Child", Caract(0))
// Si n 'existe pas alors on est pas en salon
SI Child = 0 ALORS
// MsgBox "Aucune child trouvée..."
RENVOYER ValeurRetour
FIN
// Récupère les objets
Rich=API("USER32","FindWindowExA",Child,0,"RICHCNTL", Caract(0))
AOLList=API("USER32","FindWindowExA",Child,0,"_AOL_Listbox", Caract(0))
AOLIcon=API("USER32","FindWindowExA",Child,0,"_AOL_Icon", Caract(0))
AOLStatic=API("USER32","FindWindowExA",Child,0,"_AOL_Static", Caract(0))
RichLS=API("USER32","FindWindowExA",Child,0,"richcntlreadonly", Caract(0))
// Si on a tout trouvé, alors c'est le salon
SI ((Rich <> 0) ET( AOLList <> 0 ET( AOLIcon <> 0 ET AOLStatic <> 0 )))ALORS
// Stoque les handles dans la structure
AOL_RoomChild = Child
AOL_EditBox = Rich
// Récupère l'icone envoyant le texte en salon
AOLIcon = 0
i est un entier
POUR i = 0 A 3
AOLIcon = API("USER32","FindWindowExA",Child,AOLIcon,"_AOL_Icon", Caract(0))
FIN
AOL_IconSend = AOLIcon
// Tout s'est bien passé
ValeurRetour = Vrai
RENVOYER ValeurRetour
FIN
RENVOYER ValeurRetour
CONSTANT
WM_LBUTTONDOWN = 513
WM_KEYUP = 257
VK_SPACE = 32
WM_SETTEXT = 12
FIN
// ===============================================================================
// Variables globales
// ===============================================================================
AOL_RoomChild est entier // Handle de la child du salon
AOL_EditBox est entier // Handle de la zone de texte
AOL_IconSend est entier
command2
SetText( "") // On vide la zone de saisie)
SetText( txtSend..Valeur) // On met le texte)
ClickIconSend // Click sur l'icone d'envoit
Cette contribution était de : http://old.wdforge.org/newbb/viewtopic.php?forum=17&topic_id=4508&post_id=18692