Extract/retrieve cell contents from grid-based app

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
ALYB
Posts: 7
Joined: 23 Feb 2018, 13:55

Extract/retrieve cell contents from grid-based app

24 Apr 2022, 03:20

I'm looking for a script to extract/retrieve the contents of cells from a(ny) grid-based app. The app at hand is the CAT tool www.across.net, but with a slight modification the script could be used for other grid-based apps (like Ms Excel, LibreOffice Calc) too...

Task 1: Extract the contents of all cells in a column and replace them with numbered placeholders.

Steps:

• Simulate Ctrl+A
• Simulate Ctrl+C
• Replace the cell content with a numbered placeholder, e.g. «1».
• Switch to an opened document in Ms Word or LibreOffice.
• Paste the numbered placeholder plus a tab character plus the extracted cell content plus a new paragraph character.
• Return to the grid-based app with the text to extract.
• Simulate Alt+Down (Across) or Down (Excel) to go to the next cell in the column.
• Repeat steps.

Task 2: Retrieve the content of every cell via the placeholder from the Ms Word/LibreOffice document.

Steps:

• Copy the content of the document (manual step; all formatting should be kept!).
• In Across (Excel etc.): Copy the content of a cell (e.g. «1»).
• On the clipboard, search the paragraph that contains the placeholder.
• Assign the paragraph's content to a variable (all formatting should be kept!).
• Delete the placeholder plus the tab character from the variable.
• Paste the variable into the cell.
• Simulate Alt+Down (Across) or Down (Excel).
• Repeat steps.

Image

Image
AHKStudent
Posts: 1472
Joined: 05 May 2018, 12:23

Re: Extract/retrieve cell contents from grid-based app

24 Apr 2022, 04:10

Run the WinSpy tool and post a screen shot of what happens when you roll over parts of the grid. The type of control it is will determine what methods should be tried.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], william_ahk and 361 guests