How to copy text from a cell in a excel spreadsheet and paste into a different window and search the page?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Leon_Pence
Posts: 3
Joined: 12 Jun 2019, 10:28

How to copy text from a cell in a excel spreadsheet and paste into a different window and search the page?

12 Jun 2019, 11:02

Hi Everyone,

This is my first post on this forum and I'm very new to AHK, but I have found it to be a very useful tool for someone like me in the short time I have played around with it. With that being said I'm still a newbie with it and thus I have come to the forms for help.

I'm trying to make a script that will allow copy from an excel sheet onto a searchbox in a website then search the page for the specific word to stop the script if the word is found on the page and if not to continue to the next cell on excel sheet and to repeat the script.

Copy number from excel cell onto clipboard → Go to active webpage → Highlight & Delete content in search box → Paste clipboard content → Search by clicking enter → search page for "TAG NOT FOUND" → → If term not found return to excel sheet and move to next cell → repeat script
→ If term found stop/pause script

Is a script like this possible for AHK or is it too complex? Does anyone have a script similar to what I am looking to try to make? :think:

Thanks for the help in advance! :thumbup:
User avatar
YoucefHam
Posts: 372
Joined: 24 Aug 2015, 12:56
Location: Algeria
Contact:

Re: How to copy text from a cell in a excel spreadsheet and paste into a different window and search the page?

12 Jun 2019, 11:26

this is how to get text from Excel

Code: Select all

IfWinNotExist, ahk_exe Excel.exe ;Check if there is and existing Excel application
{
	MsgBox, There is no Excel Application Opened.
	ExitApp
}

msExcel := ComObjActive("Excel.Application") ;Attatch to Active Excel Application
msExcel.ActiveSheet.Range("A1").Value :=	"This is Cell A1" ;put this text in Cell A1 in Active Excel opened File
Cell_I2_Value := msExcel.ActiveSheet.Range("B1").Value ;Get the text from Cell B1

MsgBox, % Cell_I2_Value

msExcel := ""
:wave: There is always more than one way to solve a problem. ;)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Chunjee, Google [Bot], Mateusz53 and 155 guests