Away from my computer so can't verify, but, they're is probably a dispatch command to enter edit mode and another for the there key but not certain this is true.
Get BlueMail for Android On Jul 29, 2025, 1:17 AM, at 1:17 AM, Dave Close <d...@compata.com> wrote: >I asked: > >>Near as I can tell, the way to do this is with a macro. I've tried >>following several guides but it isn't working. What I want is really >>simple: Select a shortcut (say F3) and have my spreadsheet respond as >>though I had pressed four keys, F2 to start editing a cell, HOME to >>position my cursor at the start of the cell, DEL to delete the first >>character in the cell, ENTER to finish editing. But when I tried to >>record this macro, nothing happened until I selected a cell. Then when >>I tried to run the macro, the current cell was changed to contain what >>the cell contained where recording was performed. What am I doing >wrong? > >Andrew Pitonyak answered: > >>First, let me tell you what your macro does. >> >>You clicked in a specific cell, which made that cell the current cell. >In this >> case you clicked in Cell E4, so these lines in your macro set the >cell E4 to >>be current. >> >>args1(0).Name = "ToPoint" >>args1(0).Value = "$E$4" >>dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1()) >> >>Next, you enter \u201cInput Mode\u201d >>dispatcher.executeDispatch(document, ".uno:SetInputMode", "", 0, >Array()) >> >>And finally, you enter the string 132, which is NOT simply removing >the first >>character. >>args3(0).Name = "StringName" >>args3(0).Value = "132" >>dispatcher.executeDispatch(document, ".uno:EnterString", "", 0, >args3()) >> >>What you want to do is to check to see where the cursor is located or >to check >> what cells are selected rather than selecting a specific cell. > >What I want to do is exactly what I wrote initially. Without changing >the selected cell, just act like I had pressed those four keys in >order. >If I do that manually, the cell content doesn't change except for the >removal of the first character. It shouldn't be hard to do that with a >macro or other repeatable process. I'm not worried about checking the >existing content of the cell; I won't run the macro unless the current >cell is an appropriate one. I'm not asking to run the macro on more >than >one cell at a time, just the current cell. > >You seem to be telling me that I can't do this in a simple way, even >though my desire is extremely simple. It shouldn't be necessary to >write >a program to do it. For example, with VI, it's just ":map z xxxx" where >xxxx is some sequence of VI commands. Surely LO can do the equivalent. >-- > Dave Close, Compata, Irvine CA +1 714 434 7359 > d...@compata.com dhcl...@alumni.caltech.edu > "Computers are useless. They can only give you answers." > -- Pablo Picasso > > > >-- >To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org >Problems? >https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ >Posting guidelines + more: >https://wiki.documentfoundation.org/Netiquette >List archive: https://listarchives.libreoffice.org/global/users/ >Privacy Policy: https://www.documentfoundation.org/privacy -- To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette List archive: https://listarchives.libreoffice.org/global/users/ Privacy Policy: https://www.documentfoundation.org/privacy