With the following code I am able to identify a and move to a ThunderRT6TextBox. But when I use the SetControlText with a value from an Excel spreadsheet, that command does not work.
I have tried with a simple string an that does'nt work.
I have use the the View System Windows to confirm the instance of the ClassName.
Could someone tell me what am I missing.
Thank you!
Code: Select all
////Démarrer Trad T-20////
Let>RP_WAIT=2
Run Program>C:\Desjardins\Suvriq\Suvriq.exe /SUVRIQ /REP:100 /PROD:T20HARMTRAD
WaitReady>1
Wait>5
////////////Attendre l'ouverture de Traditionnel en Fr ou An
Let>WIN_USEHANDLE=0
WaitWindowOpen>Tradition*
SetFocus>Tradition*
////
GetWindowHandle>Traditionnel - version*,tfHandle
////
////Excel
//
Let>path=C:\Desjardins\ABF_au_décès\ABF_Décès.xls
DDERequest>Excel,%path%:Info,L3C8,Prénom_Client,1
StringReplace>Prénom_Client,CRLF,,Prénom_Client
//
DDERequest>Excel,%path%:Info,L4C8,Nom_Client,1
StringReplace>Nom_Client,CRLF,,Nom_Client
//
DDERequest>Excel,%path%:Info,L3C6,Sexe_Client,1
StringReplace>Sexe_Client,CRLF,,Sexe_Client
//
DDERequest>Excel,%path%:Info,L5C3,Statut_Client,1
StringReplace>Statut_Client,CRLF,,Statut_Client
//
DDERequest>Excel,%path%:Info,L1C13,Age_Client,1
StringReplace>Age_Client,CRLF,,Age_Client
//
//--------------------->
//
DDERequest>Excel,%path%:Fusion,L8C7,Montant_Client,1
StringReplace>Montant_Client,CRLF,,Montant_Client
//
DDERequest>Excel,%path%:Fusion,L9C7,Montant_Conj,1
StringReplace>Montant_Conj,CRLF,,Montant_Conj
//--------------------->
//
DDERequest>Excel,%path%:Fusion,L4C11,Montant_ConjDeuxDeces,1
StringReplace>Montant_ConjDeuxDeces,CRLF,,Montant_ConjDeuxDeces
//
DDERequest>Excel,%path%:Info,L8C9,Nb_Client,1
StringReplace>Nb_Client,CRLF,,Nb_Client
//
DDERequest>Excel,%path%:Info,L6C8,Prénom_Conj,1
StringReplace>Prénom_Conj,CRLF,,Prénom_Conj
//
DDERequest>Excel,%path%:Info,L7C8,Nom_Conj,1
StringReplace>Nom_Conj,CRLF,,Nom_Conj
//
DDERequest>Excel,%path%:Info,L6C6,Sexe_Conj,1
StringReplace>Sexe_Conj,CRLF,,Sexe_Conj
//
DDERequest>Excel,%path%:Info,L8C3,Statut_Conj,1
StringReplace>Statut_Conj,CRLF,,Statut_Conj
//
DDERequest>Excel,%path%:Info,L2C21,DDN_Cient_An,1
StringReplace>DDN_Cient_An,CRLF,,DDN_Cient_An
//
DDERequest>Excel,%path%:Info,L3C21,DDN_Cient_Mois,1
StringReplace>DDN_Cient_Mois,CRLF,,DDN_Cient_Mois
//
DDERequest>Excel,%path%:Info,L4C21,DDN_Cient_Jour,1
StringReplace>DDN_Cient_Jour,CRLF,,DDN_Cient_Jour
//
DDERequest>Excel,%path%:Info,L2C22,DDN_Conj_An,1
StringReplace>DDN_Conj_An,CRLF,,DDN_Conj_An
//
DDERequest>Excel,%path%:Info,L3C22,DDN_Conj_Mois,1
StringReplace>DDN_Conj_Mois,CRLF,,DDN_Conj_Mois
//
DDERequest>Excel,%path%:Info,L4C22,DDN_Conj_Jour,1
StringReplace>DDN_Conj_Jour,CRLF,,DDN_Conj_Jour
//
DDERequest>Excel,%path%:Info,L10C131,Prov,1
StringReplace>Prov,CRLF,,Prov
////
////Importer les données du preneur
//Accéder au bouton DDN et insérer la DDN
//
Wait>.3
LibFunc>User32,FindWindowExA,1_hwnd1,tfHandle,0,ThunderRT6Frame,
LibFunc>User32,FindWindowExA,2_hwnd1,tfHandle,1_hwnd1,ThunderRT6Frame,
LibFunc>User32,FindWindowExA,3_hwnd1,tfHandle,2_hwnd1,ThunderRT6Frame,Frame1
LibFunc>User32,FindWindowExA,4_hwnd1,tfHandle,3_hwnd1,ThunderRT6Frame,Clients
LibFunc>User32,FindWindowExA,5_hwnd1,tfHandle,4_hwnd1,ThunderRT6Frame,
LibFunc>User32,FindWindowExA,btnDDN,5_hwnd1,0,ThunderRT6CommandButton,DDN
LibFunc>User32,FindWindowExA,txtBox_1,5_hwnd1,0,ThunderRT6TextBox,
Let>WIN_USEHANDLE=1
GetWindowPos>txtBox_1,npX3,npY3
MessageModal>%npX3% et %npY3%
MouseMove>npX3,npY3
Wait>.3
SetControlText>txtBox_1,ThunderRT6TextBox,15,%Nom_Client%