vetold 0 Posted September 16, 2022 Share Posted September 16, 2022 #include <Date.au3> #include <GUIConstants.au3> #include <Excel.au3> Global $Paused HotKeySet("{ESC}", "Terminate") Func Terminate() Exit 0 EndFunc $oExcel = ObjGet("C:\Users\tvois\Desktop\Start\Start.xlsx\", "Excel.Application") WinActivate("Start.xlsx - Excel", "") For $i= 1 To 120 $sCellValue = _Excel_RangeRead($oExcel, "A" & $i) Opt("MouseCoordMode",0) MouseClick("left" ,154, 345) MouseClick("left" ,101, 378) MouseClick("left" ,250, 144) _Excel_RangeWrite($oExcel, "1", "B"&$i) Next Link to post Share on other sites
SkysLastChance 35 Posted September 16, 2022 Share Posted September 16, 2022 (edited) #include <Date.au3> #include <GUIConstants.au3> #include <Excel.au3> HotKeySet("{ESC}", "Terminate") Func Terminate() Exit 0 EndFunc ;==>Terminate Local $oExcel = _Excel_Open() Local $sWorkbook = "C:\Users\tvois\Desktop\Start\Start.xlsx" Local $oWorkbook = _Excel_BookOpen($oExcel, $sWorkbook) WinWaitActive("Start.xlsx", "", 10) For $i = 1 To 120 Local $sCellValue = _Excel_RangeRead($oWorkbook, Default, "A" & $i) Opt("MouseCoordMode", 0) MouseClick("left", 154, 345) MouseClick("left", 101, 378) MouseClick("left", 250, 144) _Excel_RangeWrite($oWorkbook, Default, $sCellValue, "B" & $i) Next Edited September 16, 2022 by SkysLastChance Subz and vetold 1 1 Life's simple. You make choices and you don't look back. Link to post Share on other sites
water 2,703 Posted September 16, 2022 Share Posted September 16, 2022 Check the value of @error and @extended after each _Excel_* function call. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to post Share on other sites
vetold 0 Posted September 28, 2022 Author Share Posted September 28, 2022 On 17.09.2022 at 00:40, water said: Проверяйте значение @error и @extended после каждого вызова функции _Excel_*. On 16.09.2022 at 23:16, SkysLastChance said: #include <Date.au3> #include <GUIConstants.au3> #include <Excel.au3> HotKeySet ( "{ESC}" , "Завершить" ) Func Terminate ( ) Exit 0 EndFunc ;==>Terminate Локальный $oExcel = _Excel_Open ( ) Локальный $sWorkbook = "C:\Users\tvois\Desktop\Start\Start.xlsx" Локальный $oWorkbook = _Excel_BookOpen ( $oExcel , $sWorkbook ) WinWaitActive ( "Start.xlsx" , "" , 10 ) Для $i = от 1 до 120 Local $sCellValue = _Excel_RangeRead ( $oWorkbook , по умолчанию , "A" и $i ) Opt ( "MouseCoordMode" , 0 ) MouseClick ( "влево" , 154 , 345 ) MouseClick ( "влево" , 101 , 378 ) MouseClick ( "влево" , 250 , 144 ) _Excel_RangeWrite ( $oWorkbook , по умолчанию , $sCellValue , "B" и $i ) Далее _Excel_RangeWrite ( $oWorkbook , по умолчанию , $sCellValue , "B" и $i ) How to make it paste data from the clipboard (copied) in a loop Link to post Share on other sites
SkysLastChance 35 Posted September 28, 2022 Share Posted September 28, 2022 ClipPut("Test") $vClip = ClipGet ( ) Msgbox(0,"",$vClip) vetold 1 Life's simple. You make choices and you don't look back. Link to post Share on other sites
vetold 0 Posted September 28, 2022 Author Share Posted September 28, 2022 (edited) expandcollapse popup#include <Date.au3> #include <GUIConstants.au3> #include <Excel.au3> Global $Paused HotKeySet("{ESC}", "Terminate") Func Terminate() Exit 0 EndFunc Local $oExcel = _Excel_Open() Local $sWorkbook = "C:\Users\tvois\Desktop\Start\Start.xlsx" Local $oWorkbook = _Excel_BookOpen($oExcel, $sWorkbook) WinWaitActive("Start.xlsx", "", 10) For $i = 1 To 120 Local $sCellValue = _Excel_RangeRead($oWorkbook, Default, "A" & $i) MsgBox(4096, "", "Значение ячейки " & "A" & $i & ":" & @CRLF & $sCellValue, 2) Sleep(2000) if ProcessExists("chrome.exe") > 0 then ;MsgBox(0,"Chrome","esiste") Opt("WinTitleMatchMode", -2) WinActivate("Google Chrome") Opt("WinTitleMatchMode", 1) Else MsgBox(0,"Chrome","non esiste") endif Opt("MouseCoordMode",0) MouseClick("left" , 103, 376) Sleep(1000) MouseClick("left" , 196 , 148) Sleep(500) Send("{Delete 10}") Send($sCellValue,1) Sleep(1000) Opt("MouseCoordMode",0) MouseClick("left" ,1328, 716) Sleep(500) MouseClick("left" , 397, 267, 2, 100) Sleep(1000) MouseClick("left" , 379, 301, 1, 50) Sleep(2000) MouseClick("left" , 462, 427, 2, 500) Sleep(1000) MouseClick("left" , 192, 237, 2, 500) Sleep(1000) Send("^{INSERT}") Sleep(500) MouseClick("left" , 1354, 117, 1, 500) Sleep(500) MouseClick("left" , 497, 123, 1, 50) Sleep(500) MouseClick("left" , 365, 125, 1, 50) Sleep(500) Do Sleep(10) ;ждать пока курсор нестанет стрелкой Until MouseGetCursor( ) = 2 _Excel_RangeWrite($oWorkbook, Default, $sCellValue, "B" & $i = (ClipGet ( )) Next HERE is the whole code It's in a loop Edited September 28, 2022 by vetold Link to post Share on other sites
Solution vetold 0 Posted September 29, 2022 Author Solution Share Posted September 29, 2022 21 hours ago, SkysLastChance said: ClipPut ( "Тест" ) $vClip = ClipGet ( ) Msgbox ( 0 , "" , $vClip ) Maybe write a loop to paste values from the clipboard? Link to post Share on other sites
SkysLastChance 35 Posted September 30, 2022 Share Posted September 30, 2022 (edited) Ill leave that up to you. You have everything you need in this thread to do that yourself. Edited September 30, 2022 by SkysLastChance Life's simple. You make choices and you don't look back. Link to post Share on other sites
vetold 0 Posted September 30, 2022 Author Share Posted September 30, 2022 I did it through inserts Send. It doesn’t work Link to post Share on other sites
vetold 0 Posted September 30, 2022 Author Share Posted September 30, 2022 (edited) Doesn't work in loop Edited September 30, 2022 by vetold Link to post Share on other sites
vetold 0 Posted September 30, 2022 Author Share Posted September 30, 2022 2 hours ago, SkysLastChance said: Я оставлю это на ваше усмотрение. У вас есть все необходимое в этой теме, чтобы сделать это самостоятельно. Suggest where to go? Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now