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.
Extract/retrieve cell contents from grid-based app
-
- Posts: 1472
- Joined: 05 May 2018, 12:23
Re: Extract/retrieve cell contents from grid-based app
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.