Post by QuestVBA » 28 Nov 2019, 04:39
Bonjour joedf,
Merci pour toutes tes propositions.
Étant donné que je ne suis pas vraiment un spécialiste voici ce que j'ai fait.
Code: Select all
navOpenInBackgroundTab = 4096
navOpenInNewWindow = 1
#F1::
wb := ComObjCreate("InternetExplorer.Application") ; create a IE instance
IeHwnd := wb.Hwnd
wb.Visible := True
wb.Navigate("http lpxbrapp001a.cloud.famifed.be:7200 /itinera/pages/index.xhtml") Broken Link for safety
While wb.readyState != 4 || wb.document.readyState != "complete" || wb.busy ; wait for the page to load
Sleep, 10
Msgbox Done!
wb.Navigate("https appprod.rkw-onafts.fgov.be /Trivia/#!/", Broken Link for safety navOpenInNewWindow)
while !wb2
wb2 := New_IE("https appprod.rkw-onafts.fgov.be /Trivia/#!/") Broken Link for safety
While wb2.readyState != 4 || wb2.document.readyState != "complete" || wb2.busy ; wait for the page to load
Sleep, 10
Send, {TAB}{TAB}{TAB}{TAB}{TAB}{TAB}USER{TAB}MOTDEPASSE{TAB}{ENTER}
While wb2.readyState != 4 || wb2.document.readyState != "complete" || wb2.busy ; wait for the page to load
Sleep, 10
Msgbox Done!
return
New_IE(Url) {
For wb in ComObjCreate("Shell.Application").Windows
{
If instr( wb.LocationUrl, URL) && InStr( wb.FullName, "iexplore.exe" )
return wb
else
continue
}
}
CoordMode, Mouse, Client
#IfWinExist ahk_class Credential Dialog Xaml Host
^!q::
WinActivate, ahk_class Credential Dialog Xaml Host
sleep 100
MouseClick, Left, 10, 10
Send USER{Tab}
sleep 100
Send MOTDEPASSE{Enter}
Return
#IfWinExist
Évidemment, j'ai plusieurs questions :
Pour le moment, le raccourci m'ouvre la première application et s'arrête sur le pop-up. Avec ton code, j'appuie sur CTRL ATL Q et cela charge la page et passe ensuite à la seconde étape. Cela semble nickel
Questions :
- Est-il possible d'automatiser le MDP sans passer par le 'second' raccourci ?
- Parfois, pour le second code,le 1er ou les 2 premiers caractères sont manquants. Comme s'ils se perdaient dans la nature. Il faudrait un plus long sleep ?
Bonjour joedf,
Merci pour toutes tes propositions.
Étant donné que je ne suis pas vraiment un spécialiste voici ce que j'ai fait.
[code]navOpenInBackgroundTab = 4096
navOpenInNewWindow = 1
#F1::
wb := ComObjCreate("InternetExplorer.Application") ; create a IE instance
IeHwnd := wb.Hwnd
wb.Visible := True
wb.Navigate("http lpxbrapp001a.cloud.famifed.be:7200 /itinera/pages/index.xhtml") Broken Link for safety
While wb.readyState != 4 || wb.document.readyState != "complete" || wb.busy ; wait for the page to load
Sleep, 10
Msgbox Done!
wb.Navigate("https appprod.rkw-onafts.fgov.be /Trivia/#!/", Broken Link for safety navOpenInNewWindow)
while !wb2
wb2 := New_IE("https appprod.rkw-onafts.fgov.be /Trivia/#!/") Broken Link for safety
While wb2.readyState != 4 || wb2.document.readyState != "complete" || wb2.busy ; wait for the page to load
Sleep, 10
Send, {TAB}{TAB}{TAB}{TAB}{TAB}{TAB}USER{TAB}MOTDEPASSE{TAB}{ENTER}
While wb2.readyState != 4 || wb2.document.readyState != "complete" || wb2.busy ; wait for the page to load
Sleep, 10
Msgbox Done!
return
New_IE(Url) {
For wb in ComObjCreate("Shell.Application").Windows
{
If instr( wb.LocationUrl, URL) && InStr( wb.FullName, "iexplore.exe" )
return wb
else
continue
}
}
CoordMode, Mouse, Client
#IfWinExist ahk_class Credential Dialog Xaml Host
^!q::
WinActivate, ahk_class Credential Dialog Xaml Host
sleep 100
MouseClick, Left, 10, 10
Send USER{Tab}
sleep 100
Send MOTDEPASSE{Enter}
Return
#IfWinExist[/code]
Évidemment, j'ai plusieurs questions :
Pour le moment, le raccourci m'ouvre la première application et s'arrête sur le pop-up. Avec ton code, j'appuie sur CTRL ATL Q et cela charge la page et passe ensuite à la seconde étape. Cela semble nickel
Questions :
[list]Est-il possible d'automatiser le MDP sans passer par le 'second' raccourci ?[/list]
[list]Parfois, pour le second code,le 1er ou les 2 premiers caractères sont manquants. Comme s'ils se perdaient dans la nature. Il faudrait un plus long sleep ?[/list]