LibreOffice macro user instruction - libreoffice

I have a LibreOffice Calc document which needs to be downloaded by remote users. It uses macros - so they need to have macros enabled for it to work at all and there is no control over user machines.
To help with this I have a text message on the first tab telling them they need to enable macros and some instructions how. On document open I run a macro to remove this message - as long as they have macros enabled they never see it and all is well.
This solution works but is not perfect because:
It will trigger the save changes dialogue even if they did no changes.
It leaves the message removed if they save and pass the document directly to another user.
Just doesn't feel like a well-engineered solution
Is there a better way to accomplish showing this message only when macros are not enabled?

Related

Unity C#: How to rebind buttons via script while game is running?

Title says it all, I'd like to implement a controls menu so the player can rebind controls, which changes the positive input key of a button in the Input Manager. But I can't find anything about it online.
How would I go about changing the positive key for a button while ingame?
Unfortunately, I believe you can't set Input Manager values via code at all. That's probably why you didn't find anything about it.
You've got two alternatives:
Use the "Input System" aka. the new input system that is available as a package. It is not as easy to use as the legacy input system, but you should check it out. It's also open source.
Use an asset store package. I've tested Rewired in the past and found it extremely powerful, especially compared to the legacy input system.
Personally, I'd first go with option 1 and see if you are happy with it. It's an official package and not 3rd party. Option 2 is still there, if you have issues with option 1, but it'll probably cost you money.

VSCode Find / Replace History

New to VSCode and notice there's not a dropdown history of previous find/replace strings. I am also striking out on finding this functionality via extensions.
Most every editor I've ever used has had this, so I find its absence conspicuous.
I see exact and similar feature requests on github, but alas it could never get the required 20+ votes in time before it was closed. I was prepared to open another feature request, but the directions when opening a new feature request state
<!-- Please search existing issues to avoid creating duplicates. -->
so I'm uncertain of the protocol. Does this only mean active tickets?
The closed feature request garnered 9 votes, so there was some interest.
The up/down cursor prompt only works per session and hence, only if you have already done a search. I too use a regular expression routinely from session to session, so I have to open up a notepad file that has my patterns then copy them to the search/replace window. Royal pain.
And I agree, there should be a drop-down.
Use the up and down arrows. There is placeholder text to mention this - see the gif - but it is easy to miss. Not as nice as a dropdown though as you have to cycle through recent entiries.

Writing a macro-like tool

Recently I've been finding myself doing repetitive tasks. I would click button A, highlight text field A, type in some text, click an APPLY button, click on a drop-down box and select a specific option depending on the item I'm working with, select it and hit APPLY, then repeat this process only a couple hundred to thousand times.
So I thought maybe there's a way I could automate this? Macros then came to mind. However I've never wrote macros before so am not sure of several details such as
-what tools should I even work with?
-how do I determine which button to click?
-ideally, I would want to be able to read input from a text file to specify what should be typed in and which option should be selected from the dropdown list. Is this even possible? It seems like an operation that require some intelligence.
I am not picky on tools nor about cleanliness. I just want to be able to automate the process. It will be for personal use unless I find a convenient way such that others can use it as well.
Some details about the dropdown box: when the box is focused, I can hit the DOWN key to scroll from option to option. The items that I have to associate with these options are named exactly the same, so they appear in the same "index" order (meaning, the first item and first option appear at the top of the list, second item and second option appear after, thid item and third option...etc)
The placement of all of these fields can be fixed, so if I have to manually specify where on the screen I should be clicking, that is also a possibility.
Any idea where I should look?
If you're using Windows, AutoIt is a really nice tool.
It records actions (like a word/excel macro)
It offers a BASIC like language + API which is really easy to program (if you need to)
The API is pretty powerful
Check for Windows with a certain title
Automate klicks
...
You can "compile" your scripts into exe files so you can share your tools
It comes bundled with Scite (a nice text editor) + AutoIt syntax higlighting
But you can use any editor you want
It's well documented
It's Freeware
http://www.autoitscript.com/site/
On the Mac, there is Automator. Java has the Robot class in the basic library, to help with such automation. No doubt there are other similar tools.

How should I provide help for a related set of functions?

I built tfs.el to allow developers to do TFS things (checkout, checkin, etc) from within emacs.
There are 13 interactive commands in the tfs package, like tfs/checkout, tfs/rename, tfs/diff, and so on, and I'd like to be able to provide help on all of them in a single place. An overview of all the available functions.
What's the "emacs way" of doing that? I thought of defining an additional function, like tfs/help , that would invoke describe-function-1 on each of the tfs functions, and then present all that in a TFS-Help buffer.
Is there a better way?
Well, there are many "Emacs way"s.
The most polished would be to write an info page, see the page "Info for Experts", which basically says to use Texinfo and convert that into an info page. You can be as verbose as you want there, and the user can search, use hyperlinks, etc. The user can easily get there via C-h F tfs/checkout.
Another way some folks seem to do it is to write short documentation strings for each of the commands, ending with "see documentation for tfs-mode for details" and put all the common documentation in the docstring for tfs-mode.
Another way some packages document things is with a big comment at the top of the tfs.el file.
Take your pick, they all have trade-offs.
You can use
(describe-bindings "\C-xv")
You have multiple, related commands. So far, I guess, they are related only by their names.
Two possibilities come to mind:
Create a mode for this stuff. Document everything in the doc string of the command that turns the mode on/off. It could be a major mode or a minor mode. If a minor mode it could be buffer-local or global.
Create a group (defgroup) for this stuff and document everything in its doc string.
The basic idea is to somehow actually relate these commands: bundle them together in some way, so you can document them together as the doc for the bundle.
Offhand, without knowing more, my guess is that you might want to create a global minor mode.

VS2005 - Automatically requesting checkout of form on open, with "View Designer"

I'm trying to integrate our Source Control(SourceAnywhere) with VS and are getting a lot of push back because of this one issue.
Almost every time we open some of our Windows forms using 'View Designer' it edits the file (* appears beside file name). Nothing has yet been changed, I've tried comparing the before and after files and they are exactly the same. If we have the solution bound it will check the file out, but even if its not bound it still 'edits' the file. When you try to check the file back in, it doesn't get a new version or anything.
I've done some searching and haven't been able to find any way to change this behavior.
This is a huge pain point for me as if someone already has the form checked out and someone else tries to open it, they just get told that it can't be checked out, and the form won't open. Or, someone who has no intention to edit the form, will now have the form checked out but hasn't made any changes.
Thoughts?
This usually happens when there are controls within the form that have "Dock" set. If the IDE feels it needs to resize the form, then those controls will also be resized, and all of that information needs to get re-written to the source file. In the case where you're editing a form named "Form1" this source file is not Form1.cs, but rather Form1.Designer.cs - try comparing that file with the version from source control.
Alternatively, move to a source control system that doesn't use locking by default (for example, Subversion) or disable that feature in SourceAnywhere. This will require users to manage merge conflicts, but allows multiple users to work on a single file at the same time.