i release code (autoit-Script)for open excel file and moving it in desktop, that work as well but i found problem if that excel file was already open , so for that i need to add in my code condition to pass if excel file was opened my code :
#include<excel.au3>
Func _WinWaitActivate($title,$text,$timeout=0)
WinWait($title,$text,$timeout)
If Not WinActive($title,$text) Then WinActivate($title,$text)
WinWaitActive($title,$text,$timeout)
EndFunc
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
HotKeySet("{F2}", "COMP")
Func COMP()
local $var = "C:\Users\Relkassah\Desktop\changment data.xlsx"
local $oExcel_1 = _Excel_Open()
_Excel_BookOpen($oExcel_1,$var)
Sleep(300)
_WinWaitActivate("changment data - Excel","")
Send("{ALTDOWN}{SPACE}m{ALTUP}")
MouseClick("left")
MouseDown("left")
MouseMove(150,444)
MouseUp("left")
Send("{ALTDOWN}{SPACE}{ALTUP}{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}")
EndFunc
While 1
Sleep(1)
WEnd
thank you in advance
Aucun commentaire:
Enregistrer un commentaire