Hello,
I'm trying to send an email automatically with Outlook.
I got a script moving the mouse thanks to Script Writter tool and it worked well. However, after restarting my computer, the movement of the mouse doesn't click on the rght buttoms anymore although the desktop is exactly in the same conditions than before (item's positions, ...). I thought that the MousePosition was something absolute.
Here is the script I use :
#region --- Au3Recorder generated code Start (v3.3.9.5 KeyboardLayout=0000040C) ---
#region --- Internal functions Au3Recorder Start ---
Func _Au3RecordSetup()
Opt('WinWaitDelay',100)
Opt('WinDetectHiddenText',1)
Opt('MouseCoordMode',0)
Local $aResult = DllCall('User32.dll', 'int', 'GetKeyboardLayoutNameW', 'wstr', '')
If $aResult[1] <> '0000040C' Then
MsgBox(64, 'Warning', 'Recording has been done under a different Keyboard layout' & @CRLF & '(0000040C->' & $aResult[1] & ')')
EndIf
EndFunc
Func _WinWaitActivate($title,$text,$timeout=0)
WinWait($title,$text,$timeout)
If Not WinActive($title,$text) Then WinActivate($title,$text)
WinWaitActive($title,$text,$timeout)
EndFunc
_AU3RecordSetup()
#endregion --- Internal functions Au3Recorder End ---
MouseClick("left",599,1419,1)
_WinWaitActivate("Boîte de réception - ################## - Outlook","Dernière modificatio")
MouseClick("left",45,118,1)
_WinWaitActivate("Sans titre - Message (HTML) ","&Revenir au message")
Send("############{BACKSPACE}{BACKSPACE}{BACKSPACE}{BACKSPACE}{BACKSPACE}{SHIFTDOWN};{SHIFTUP}####{ENTER}")
MouseClick("left",216,244,1)
Send("{SHIFTDOWN}t{SHIFTUP}est")
MouseMove(31,268)
MouseDown("left")
MouseMove(71,284)
MouseUp("left")
_WinWaitActivate("Test - Message (HTML) ","&Revenir au message")
Send("{SHIFTDOWN}l{SHIFTUP}e{SPACE}bot{SPACE}fonctionne{SPACE}toujours{SHIFTDOWN};{SHIFTUP}")
MouseClick("left",45,212,1)
#endregion --- Au3Recorder generated code End ---
I really don't understand what's happenning.
Thank you for your help.