Author Topic: A better way to find a specifically numbered field?  (Read 2352 times)

librarian

  • Newbie
  • *
  • Posts: 15
A better way to find a specifically numbered field?
« on: March 02, 2022, 04:06:17 PM »
I am a library cataloguer and the attached screenshot is of a typical catalogue record in the library management software I use. I want to be able to skip to a specific field. There are common fields but some are not always there, sometimes there are extras so I can't select based on screen location.

I have worked out this command that takes my input and starts at the top (which is 001 unless I have scrolled down) until it matches the spoken field number. The three columns labelled tag, Ind and contents all have fields on each line that I can tab between. So to get from 001 to 003 for example it is three tabs. I chose to use mouse movement because it seemed faster when I tested it.

Command "find [089;100;245;500]"
Code: [Select]
Set text [desiredV] to '{CMDSEGMENT:1}'
Move mouse cursor to screen coordinates (537, 443)
Click right mouse button
Start Loop While : [desiredV] Does Not Equal [compareV]
    Double-click right mouse button
    Press Left Ctrl+C keys and hold for 0.1 seconds and release
    Set text [compareV] to '{CLIP}'
    Move mouse left [0] pixel(s), down [18] pixel(s) (from last position)
    Begin Text Compare : [compareV] Equals '596'
        Exit Command
    End Condition
End Loop
Set text [compareV] to [Not Set]
Press Tab key and hold for 0.1 seconds and release
Press Tab key and hold for 0.1 seconds and release

Can you suggest a better way?

Pfeil

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4790
  • RTFM
Re: A better way to find a specifically numbered field?
« Reply #1 on: March 03, 2022, 09:13:49 AM »
I notice you're right-clicking three times, and then pressing Ctrl-C to copy; is left-clicking to select and then using the keyboard shortcut to copy not feasible in the software you are using?


What may be more efficient, if the target application facilitates it, would be to copy the contents of the entire column, rather than checking each cell individually.

In applications like Excel and Google Sheets, selecting an entire column can be done using the Ctrl-Space keyboard shortcut, though this may not be available in your target application.
If it is not, you can try selecting the topmost cell of the column, then using the Shift-PageDown to select all items in the column.

If either of those allows you to copy the contents of those cells, preferably as text (if you can paste into notepad and the contents of each cell are on their own line, that's ideal), that data could then be used to look up which cells are available, and at which indices.
Using an inline function to split the newline-separated list would likely be the simplest method to process that data.

librarian

  • Newbie
  • *
  • Posts: 15
Re: A better way to find a specifically numbered field?
« Reply #2 on: March 06, 2022, 04:36:13 PM »
Thanks for the thoughts. Seems like unfortunately the software is too unique and limited to make it any easier.

The right click explanation is that I have my mouse buttons swapped. When I first had my injury I switched to left hand mouse only and I swapped the mouse buttons, now I have a dual mouse setup and I have found it easiest not to swap the buttons back.

The first right click selects the cell before the loop begins, the double right click highlights the text to copy at the start of each loop. I could change it to a ctrlA to highlight but that would still require a click in the cell after the mouse moves down. I migfht test that out to se if it speeds up the loop at all.

The softwared does not unfortunately treat the fileds like a spreadsheet. The only way to read the data is to click individually in each field.