|
Use with caution. These public beta programs contain new fixes and new features that haven't been fully tested. I need you to tell me if you find any problems with these program or even if the changes listed work as you expect. |
ArsClip Update Part 3
This is a "silent" update. I've created 2 new Clip Menu scripts and 1 new Permanent Clip script for the "View > Online Code Examples" section. Currently, Clip Menu scripts are accessed under Configuration>Clip Menu>Custom Menus. When "New" is selected from this location, the Online Code Examples shows a list specifically for the Clip Menu. Permanent Clips have their own separate list of example scripts.
The first Clip Menu script, called 'Open Clip as File (JavaScript)', saves the selected clip to a file and then runs a program that accepts a filename as command line parameter. This example uses Notepad, Wordpad, and Paint as standard installed programs, but these can be replaced with any program.
The second Clip Menu script, called 'Paste Clip into Program (JavaScript)', copies the selected clip to the clipboard and then runs a program and simulates a paste. This example also uses standard programs that can be replaced.
The Permanent Clip script, called 'Open Clipboard as File (JavaScript)', detects the type of clip on the clipboard and then runs a program that accepts a filename as a command line parameter. This is similar to the Clip Menu script, but it is designed to only work with the clipboard contents.
These scripts show of how to use the new Clip Menu functions and the Save Clip to Folder functions. These scripts are a little more complicated than normal, so they'll work on a default install of Windows.
ArsClip Update Part 2
This update is focused on the scripting part. I spent a few hours working on some scripts to exercise the routines and noticed quite a few shortcomings in the process. My goal is to have new Online Code Examples created for the Clip Menu that show off the new features better than my minimal patch notes.
These new changes are almost exclusively JavaScript, because conditional statements are usually a requirement. The new Save Clip to Folder routines return the full generated filename, and that type of work just doesn't fit in the AC Macro design scheme. The Clip Menu information could be a Pinned, Popup, or Clipboard Clip that requires using specific routines.
First, the Clip Menu debugging was a pain. Having to exit out of the editor, open the Popup, activate the Clip Menu, and select the custom script was tedious. The new Index/Location functions in JavaScript are great for writing a single script that will work with the Pinned, Popup, and Clipboard Clips. However, it needed some help. So, I created a function that will fake selecting a specific clip from the Clip Menu to make debugging much easier.
Next, getting debug information from the script wasn't straight forward. There is a writeDebugText() function that writes to the AC Debug Window. This is fine if you know how to show it, know where it is in Configuration, or know the double right-click system tray trick. The showDebugText() function show a message box, but it stops the flow of the script. A simple change was to add a textbox under the Results that only shows when you use the writeDebugText() routine. So, when you run a JavaScript clip, you can see the clipboard state, the pasted results (if any) and all the debug text you've created.
Lastly, the JavaScript Reference section was completely re-written. It now uses a control system just like the Command Reference that mimics the "Insert JavaScript" menu.
I've a few minor ideas for tweaks for improving the experience. For example, some code-insight like features would be nice. Clicking on a function or command and being able to right-click it to show the reference material would be a nice QoL feature. So, there may be a part 3 update. I first needed to make the new changes to see what feedback I receive. I'm well aware that a small group of users try macros and an even smaller part use JavaScript clips or custom Clip Menu scripts. I'm also thinking of creating a new "_ClipMenu" system group and importing all the custom Clip Menu scripts to the database. Having them hidden away in a separate location makes discovery harder.
---
Public Beta uploads are now going to be slightly delayed, if the changes are significant. Returning to the program a second day to review my changes lets me see details that I'd probably miss the day before. It also gives me more time to use the program as I normally do to find issues that may crop up. I've been testing this method for the last few betas and fell it improves the quality.
ArsClip QoL changes and the Next Update
The current Public Beta addresses a lot of quality of life issues. The next Public Beta release will add scripting support accessing clip information when using Custom Menus and will add methods to save clips to files. The scripting support has a lot of design details to iron out, so this current Public Beta is "part 1" of a planned update.
First, I've update the Clipboard Bar to show more information about its mouse interaction. The Tooltip now has a footer to announce Drag-and-Drop support. It will also conditionally show information for toggling the Toolbar back on when it's disabled. I've added 2 new menu items under System to describe drag-and-drop features and to hide the Toolbar. I've also updated the mouse cursors used drag-and-drop.
Second, I've updated the Clip Menu configuration. The previously created INDEX command doesn't work when using custom macros on the Current Clipboard or Pinned Clips. An error message will appear instead of blinding running a command designed only for Popup Clips.
I've created a new [CLIPMENUTOCLIPBOARD] command for the macros on the Clip Menu. This will copy the selected clip to the clipboard and works for either Pinned or Popup Clips. This replaces the default [INDEX=$i][TOCLIPBOARD=$i] script that would move Popup Clip "$i" to the clipboard. INDEX will be left for legacy scripts, but the next beta will add better support for JavaScript accessing the selected clip. Regular AC macros aren't flexible enough to support this. I also plan on added new Online Code Example scripts for the Custom Menu section that will show off the new features.
Lastly, the Taskbar Jump Menu commands were broken in a previous release. This likely occurred when I added the "-runclip" command line option. Also, I discovered a bug in my language that was causes part of the issue. So, part of this was my fault, but the other was an issue with the Delph compiler. The Jump Menu support is obviously not a popular feature, since I never received feedback about it even when it broke. I rarely use Jump Menus for programs, so I'm not sure if this Windows feature ever became popular.
The "Pin" button under Taskbar Jump List broke in Configuration. I've not had time to diagnose, but I expected that Windows made a change so that programs couldn't automatically pin themselves to the Taskbar.
ArsClip, Files, and the Clipboard Bar
I've received a lot of feedback from one user about AC's limited ways of turning clips into files. You can mass export them in the Edit Clips/Macros window. You can also drag the clip from the Clipboard Bar to make them into a file. In Permanent Clips, JavaScript can be used to save clips as plaintext and AC's macro has a [TOTEXTFILE] command for saving the clipboard as a text file. So, you can currently manually do some tasks or have limited ways to script others.
The Clipboard Bar hasn't changed in a very long time. When it was first created, Microsoft had announced that system tray icon usage would be deprecated for regular programs. Vista would hide icons by default, so I was looking for ways replicate the features of this menu. I figured the Clipboard Bar would be a place for doing quick things with the clipboard, but could also have a way to show the system menu.
Since then, the Popup was completely rewritten, and it made a lot of other features redundant. So, I added features to the Clipboard Bar to make it a quick way alter the clipboard. An "alter" menu was added execute quick scripts on the contents of the clipboard. Drag-and-drop support was added so you could drop a file on the window and it would put the contents on the clipboard. Also, you could drag the current clipboard to another program for pasting or creating a file. I've had quite a few ideas for changes to this window, but haven't implemented any of them. I just think most people don't find the Clipboard Bar useful or know about it, so I'd be putting work into a window that users don't see.
As a first test, I updated the default filename to reduce name collisions. Next, I added the ability to drag-and-drop a clip (as a clip or file) directly from the Popup. There is a "Paste > As File" Clip Menu item, but there's AC has no idea of the target program supports this feature - so it can fail silently. The drag-and-drop routine use mouse icons to show if a drop is allowed.
Before adding a bunch of buttons or windows for dealing with files, I figured I just need create some better scripting support first. AC needs a way to save any type of clip as a file (TXT, BMP, RTF are currently supported). AC also needs a way to report the name of the file created, so it can be used in scripting. In the Online Code Examples section of the Edit Permanent Clip window, there's currently a JavaScript example that shows how to edit the clipboard by detecting the clip type. This method, however, works by pasting into the target window and will fail if the program takes a long time to load. Saving clips as files, the RUN command could be used to load these files and it won't fail due to timing issues.
So, I'm looking for more feedback about better copy-and-paste automation with these features. Scripting support for files would be for advanced users, so it's a very niche feature. The Clipboard Bar is more designed for mouse users, but it's optional and I've not received feedback on it for years. I'm also looking to better support the custom Clip Menu macros, so adding information about the target clip would be very useful for scripting - even if it's only in JavaScript. I've also not received feedback about Clip Menu macros for years.
ArsClip Backup Issue
I'm working with a user that had an install where his backups of the clip database would be corrupted in the ZIP file. The current Public Beta is updated to do a checksum of the files after the ZIP is created.
For users that have backups, I ask you to open the ZIP file and "verify/test" your older backups. You'll need to use a ZIP program that has a verify option, or you'll need to extract all the files to a temporary location. I need to find if someone has the same issue, so I can figure out a way to reproduce it.
ArsClip Current Beta (Test 2)
This was a lot of work. The macro engine had to be re-vamped to support the new RUNCLIP command. This command will run any Permanent Clip before or after the current clip, so there is a minor limitation.
In JavaScript clips, you can execute AC macros using a convenience label system or by using the manuallyExecuteMacro() function. The new RUNCLIP command lets you call any type of clip to execute. So, you could run a JavaScript clip from an AC Macro. This lets you technically combine plain text with pictures and other formatted text. From a JavaScript macro, you could also use the RUNCLIP command to execute other Permanent Clips.
Nesting is supported. You can create a clip that uses RUNCLIP and the clip you run could also use RUNCLIP, and so on. Currently, there's no cyclical checking - so beware of infinite loops.
AC will do its best to optimized these clips. Clips will run faster if they can be combined into one big clip instead of running each clip separately. Only Plain Text and other Macros are candidates for optimization; JavaScript, Pictures, and Formatted Text are not. If a macro uses specific pasting features (like Mimic or Clipboard Only), it cannot be combined.
A clips specific paste settings will not override another clips settings. If you use Clipboard Only in the current clip, it will not cause all run clips to use this mode.
There's also an undocumented [INLINECLIP="Group\Clipname"] command that will let you run a clip at a very specific part of the macro instead of Before or After. This is also not optimized.
Current Beta Roadmap
Rename Master is getting ready for an official release. It's been in beta for a long time, since there weren't many changes to the program to warrant a new release. The last beta fixed a freeze issue, so I figured this would be a good time for a new release. Unless new issues are found, the current build will be the official release.
I've a few ideas for an ArsCip update to help with outside automation and scripting. The problem with these ideas is they're very niche and for advanced users. I wouldn't use the features, but I could see how they could be useful.
The first idea is to add a command line parameters to execute a Permanent Clip/Macro. Currently, the only way for outside programs to trigger AC is to simulate a global hotkey associated with a clip. Having a command line parameter option would be less limiting.
The second idea is to add a command to execute another script before or after the current script. This would help to reduce clutter in macros that perform common tasks. You could chain together several clips, so this would take some work to figure out.
ArsClip Pending Release
The current Public Beta of ArsClip is likely to be an official Release soon. I was waiting for some new features to be added first, but it's been a long time since an official release.

