09-15-2019, 04:05 PM

I have a repetitive daily task where I take data from Excel and type it into another program we use at work. Unfortunately I can't simply copy and paste the data because the other program uses drop down menus to select the numbers. I did search and find another thread with a similar question and used some script from there:

get selected cells in Excel

ExcelSheet es.Init

ARRAY(str) a

es.CellsToArray(a "sel")

type first selected column in Notepad

act "Notepad" ;;activate window

spe 20 ;;speed

act(win("Hour Moves - Google Chrome" "Chrome_WidgetWin_1"))

int row

for row 0 a.len

key (a[0 row]) Y ;;type cell and press Enter

act(win("Transfer Hours - Excel" "XLMAIN"))

'T ;; Tab

It did work to input the first number, but I was trying to figure out how to do multiple sets of numbers and repeat until it runs into a blank cell. Here is the Excel sheet:

And here is where it would be keyed into:

You just press Enter to move between each dropdown menu. Any advise would be appreciated, thanks!

get selected cells in Excel

ExcelSheet es.Init

ARRAY(str) a

es.CellsToArray(a "sel")

type first selected column in Notepad

act "Notepad" ;;activate window

spe 20 ;;speed

act(win("Hour Moves - Google Chrome" "Chrome_WidgetWin_1"))

int row

for row 0 a.len

key (a[0 row]) Y ;;type cell and press Enter

act(win("Transfer Hours - Excel" "XLMAIN"))

'T ;; Tab

It did work to input the first number, but I was trying to figure out how to do multiple sets of numbers and repeat until it runs into a blank cell. Here is the Excel sheet:

And here is where it would be keyed into:

You just press Enter to move between each dropdown menu. Any advise would be appreciated, thanks!