I continue my Smart NavBar actions series with the last standalone action – clipboard manager. So far, used the NavBar to cast stuff to active PC, automate WhatsApp, or control smart devices that are assigned to the room you are in. This time, I will add a clipboard overlay that can store up to 10 previous clipboards which is great for power users.
NavBar Clipboard manager
For this project to work, I used the clipboard manager idea I had with the fingerprint sensor. This post will explain how I used an array to create the AutoTools WebScreen. This article will focus on changes need to make this work in Smart NavBar actions.
NavBar Clipboard action
When a new clipboard is changed the %CLIP variable updates. I can monitor this to call in a new NavBar action. I want the clipboard icon to appear in the NavBar only for a couple of seconds. To achieve this I will create 2 variables that will take the value of %TIMES (%NBtimestart) and %TIMES+15 (%NBtimestop). Then I will set the NavBar icon.
These variables are used to define the duration of the time context from the 2nd profile. Unless action is taken, appearing web screen with clipboards will disappear after 15 sec.
On entry, I will simply push the clipboard value to my array and trim the array to show only 10 entries (explanation in this post). Since this is a time context, I assigned the exit task that will run once the %TIMES reflects %NBtimestop. On exit, I simply restore the original NavBar and set time variable to some arbitrary values (0,15).
Please note that to display the clipboard you have to create the array first. This is why you have the CM array numbers task to run first.
Extending lifespan of the clipboard
When one of the clips is used, an AutoApps command is sent. This command contains the
clipboard=:=#clippressed value. Sending it to the new profile, I’m setting the element of that number from the array as my new clipboard and I’m extending the %NBtimestop by 15 sec.
There are 2 more tasks that I have to create. One will actually open the Clipboad Manager and display the AutoTools web screen.
The only addition to the mix is swapping the NavBar icon for the one I can use to close the clipboard. If I change my mind, I want to have an option to close the clipboard manager completely.
The other task will run when the close clipboard is triggered and it will close the web screen and restore the original NavBar.
Smart NavBar integration
This is a stand-alone version of the Smart NavBar actions. Once I created the standalone versions for each NavBar Task I will show you how to integrate it together. The link to that write up will be up soon!
This very unintrusive NavBar Clipboard Manager can help you manage multiple clipboards without taking your precious screen estate when not needed. You can change the number of stored clipboards or the way the cards look. You can download the project from this link.
Powered by WPeMatico