Welcome Guest.   Make a donation to an author on the site September 16, 2014, 04:31:50 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Read the Practical Guide to DonationCoder.com Forum Search Features
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1] 2 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: NANY 2011 Release: Cautomaton  (Read 18969 times)
worstje
Honorary Member
**
Posts: 555



The Gent with the White Hat

View Profile Give some DonationCredits to this forum member
« on: November 14, 2010, 06:34:06 PM »

NANY 2011 Entry Information

Application NameCautomaton
Versionv0.9.0
Short DescriptionAutomating actions that are hidden away in the context menu of a file.
Supported OSesWindows XP+, 32 and 64-bit
Web PageWebsite
Download Link(open directory of released versions)
System Requirements
Version History
  • 2010-11-15 Cautomaton v0.8.1
  • 2010-11-15 Cautomaton v0.8.2
  • 2010-11-16 Cautomaton v0.8.3
  • 2012-02-23 Cautomaton v0.9.0
Author worstje
Screencast

Description
There are many applications that stick themselves into that little corner in a files context menu, yet offer no way to automate their otherwise wonderful functions. Cautomaton is the answer that allows you to automate context menu actions using a simple commandline syntax that nevertheless tries to aim to support every possible action one might want to make. Through the means of crumb matching, where Cautomaton follows the crumbs of information you lay out, nothing is beyond your reach! smiley

Or you can simply abuse it to call up a popup menu of your liking. I wouldn't know why, but the possibilities are endless!

Features
  • three different action sources:
    • Popup (/p) a menu - pick your option like you would in explorer!
    • Verb (/v) - Select a verb, the Windows way of picking a menu item.
    • Match (/m) - Throw down some 'crumbs', and let Cautomaton match them to the menu.
  • a builtin analyzer (/a) advices you on (the best?) parameters to use for this file and action
  • a noop modifier (/n) makes it possible to test matching without stuff happening
  • quiet mode (/q) - sometimes it is nice not to spam your errors and other messages around
  • debug mode (/d) - for when you think the bugs are nibbling your crumbs, your crumbs have grown feet or stuff simply isn't happening. (Mostly meant for me, the author, to try and help people with bugs they might come across.)
  • expansive help screen (/?) mentioning all the options briefly.
  • stylish like a gentleman should be - hat included!

Readme.txt
Cautomaton
v0.9.0 (2012-02-23)

REQUEST TO TESTERS: please give the /i:w and /i:u options special attention!
  In any combination with any of the other commands. If stuff works as you
  expect it to, great. If it doesn't, less great, but either way, I want to
  hear to what extent those options work with non-standard menu items.
  Especially /i:w gives me cause to worry where Windows XP is concerned!

Make sure to use the proper build for your system. While the 32-bit executable
works on a 64-bit machine, you likely do not have the proper context menu
extensions installed for the 32-bit (WOWSYS64) subsystem. End result is that
items will be missing where you might expect to see them.

(All 32-bit applications suffer this - try a 32-bit explorer some time.)

VERSION HISTORY
---------------

v0.9.0 (2012-02-23)

    Not much new. Or so I thought. I prepared a release a long long time ago,
    or it was supposed to be part of 0.8.3 and ended up not being included,
    and in the end I had unreleased features. I've tidied it up a it and am
    now releasing this stuff... if I remember it, that is.
   
      Added: proper support for the 'Properties' and 'Previous Versions' verbs.
      Added: mentions of all new options in v0.8.3 in the /? screen.
      Added: more debug messages, in case of people having troubles.
      Changed: /i:a was removed, and is implied by default.
        It's barely supported (if at all) anyway; same as /i:w which remains
        but is equally unlikely to make a difference. If this breaks stuff
        for anyone, let me know and I will revert the functionality to how it
        was in v0.8.3.

v0.8.3 (2010-11-16)

    New functionality! The tip of an iceberg yet to crash into your boat...
   
      Added: invocation now honours whether you press Ctrl and/or Shift.
      Added: popup (/p) suboptions, of the format /p:...
          @         Do not show off our trademark hat.
          XXX,YYY   Display at these screencoordinates (has to go last).
        Example: cautomaton.exe /p:@-300,500 myfile.jpg
      Added: invocation (/i) suboptions. The /i on its own is pretty much
        useless as invocation is the default (which /n cancels). A list:
          a     _try_ to do invocation asynchronously.
          w     _try_ to wait till the invocation is done (=synchronous).
          r     if possible, try to count this as a 'recent document'
          u     allow windows ui to popup where needed. This is often used for
                  errors and thus disabled by default, but also needed for
                  the 'delete' verb to popup a window asking for confirmation.
          z     no zone checks (UAC: This file comes from the internet, ok?)
          S/s   Force the Shift key into a pressed (S) or unpressed (s) state.
          C/c   Force the Ctrl key into a pressed (S) or unpressed (s) state.
      Fixed: modal dialogs running in the same thread work now. The 'delete'
        verb uses this, but for example 'properties' does not, so the holy
        grail of UI interaction has not been discovered yet.
      Fixed: the debug (/d) shows a bit more now, and less at the same time.
      Known issue: canceling 'delete' operation gives Cautomaton an unknown
        error code, which it treats as a standard failure that can only be
        recognised when running in debug (/d) mode. Can add a special exit
        code meaning 'delete canceled' if requested. Opinions please?
      Known issue: documentation still sucks.

v0.8.2 (2010-11-15)

    Bugfix release. Oh my, the bugs.
   
      Added: error messages when failing to compete.
      Fixed: Windows XP ownerdraw-glitch fest, which also caused crashes.
      Fixed: debug messages would print wrong data.
      Fixed: Windows XP now gets _the_ hat. And Vista+ get a smaller hat.
      Changed: added some new exit codes and restructured them.
      Fixed: Pointless /v /n combination is pointless.

v0.8.1 (2010-11-15)

    Initial release.



KNOWN ISSUES
------------
1) Using /a /p, and choosing an item in the Open With menu will cause the
     analysis to throw out an incorrect first crumb ('&Choose de' as opposed
     to the correct 'Open wit&h'). Other action sources work fine.

2) Cautomaton only supports a single file at present.
   
   Context menus are a pain in the arse, simply put. With _tons_ of low-level
     hacking that is beyond my personal grasp at present, it could be possible
     to support any combination of random files passed. (This would be what
     the search function does, but it is horribly documented and riddled with
     bugs according to the sources I have seen on the subject.)
   
   For the final release however, I will aim towards the built-in limitation
     of Windows context menus, which basically means only multiple selections
     WITHIN THE SAME FOLDER are supported.
   
   Working out how to properly bulletproof the input mechanism against wrong
     input combinations is going to be a pain though, hence my not having
     included such functionality just yet.

3) Canceling a 'delete' verb operation gives Cautomaton an error code it
     cannot recognise, which it then treats as a standard failure that can
     only be recognised when running in debug (/d) mode.



CREDITS
-------

Thanks to...

* mouser for his request @
    http://www.donationcoder....b/index.php?topic=24266.0

* Raymond Chen for his awesome blog & series on context menus @
    http://blogs.msdn.com/b/oldnewthing/

* Nikos Bozinis for reminding me about my suicidal tendencies @
    http://www.zabkat.com/blog/08Jul07.htm

* DonationCoder.com as a whole @
    http://www.donationcoder.com/

* Rui Lopes for his sample project on per-pixel alpha-blending @
    http://www.codeproject.co.../KB/GDI/pxalphablend.aspx

* stackoverflow.com for solving those issues I have before I have them @
    http://stackoverflow.com/

* Babosse for his awesome Old-School icon set @
    http://babasse.deviantart...m/art/Old-School-79460710


Screencast
<a href="http://www.youtube.com/watch?v=AtQIkgGenXk" target="_blank">http://www.youtube.com/watch?v=AtQIkgGenXk</a>

Usage
Installation
Extract the zip archive anywhere you'd like. Or just the one file you need for your Windows to shine. (See the Readme above why this is important.)

Using the Application
Open cmd.exe, powershell or whatnot. Go to the directory where you extracted the proper file for your architecture. Run it with the universal /? help parameter, and get started on automating the actions you need automated. smiley

Uninstallation
Just delete the files you extracted. That's all, folks! smiley

Screenshot
See attachment.


* Cautomaton1.png (108.23 KB, 1266x652 - viewed 699 times.)
« Last Edit: February 22, 2012, 10:13:47 PM by worstje » Logged
mouser
First Author
Administrator
*****
Posts: 33,352



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: November 14, 2010, 06:38:28 PM »

I am *extremely* excited about this.. i was unsure how feasible it would be and i'm delighted to test it!

After figuring out how to use it (readme could use some simpler intro), i have to say it is working!!! WOW! GREAT WORK and CONGRATULATIONS!
 beerchug

Really really cool that you figured out how to do this.
« Last Edit: November 14, 2010, 07:12:56 PM by mouser » Logged
mouser
First Author
Administrator
*****
Posts: 33,352



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: November 14, 2010, 07:09:22 PM »

This works wonderfully with my Drag and Drop Robot, to provide easy batch execution of a right-click command on a list of files:



You can see from this screenshot that D+D Robot is just invoking Cautomaton with the /m command and a $pattern, meaning text to match a substring of the context menu.
In my sample screenshot i put "Scan with" as the pattern, which matches against my context menu entry for scanning a file with Eset.



For those who don't know, Drag and Drop Robot is meant to help you perform commandline actions on large batches of files/folders.

It works great with Cautomaton, EXCEPT the only thing I never anticipated with Drag and Drop Robot is that it won't let you specify DELAYS between calls on files.  Because Cautomaton doesn't block while the process launches, you would get all processes running at the same time.  I'll add a delay option, and maybe worstje can see if he can add an option that says "don't exit until launched process exits" which would be even better.
« Last Edit: November 14, 2010, 07:18:10 PM by mouser » Logged
mouser
First Author
Administrator
*****
Posts: 33,352



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: November 14, 2010, 07:10:10 PM »

I think ill make a custom version of Drag+Drop robot made specifically to work with Cautomaton, preconfigured to use it.
Logged
worstje
Honorary Member
**
Posts: 555



The Gent with the White Hat

View Profile Give some DonationCredits to this forum member
« Reply #4 on: November 14, 2010, 07:18:06 PM »

I am glad Cautomaton is of such good use to you. Definitely makes the time I put into it so far worth it. smiley
Logged
cranioscopical
Friend of the Site
Supporting Member
**
Posts: 4,170



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #5 on: November 14, 2010, 07:22:18 PM »

Cautomaton sounds intriguing… I'm off to try it out  Thmbsup
Logged

Chris
mouser
First Author
Administrator
*****
Posts: 33,352



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: November 14, 2010, 07:30:03 PM »

Be warned this isnt a tool for everyone and the beta is still a bit rough -- it's not clear how to use it unless you are talking to worstje in a chat window smiley

But here's what you would do,

First run it on a file with /a parameter, like:

Cautomaton32.exe /a "C:\Readme.txt"

It will show the popup right click menu, and you should select some item on the menu.

It will then perform the action AND also show you a recommended way to invoke it automatically.

So i my case if i choose to perform an ESET scan on the file i see output:
Recommended Cautomaton parameters: /m "Scan with ESET Smart Security"

So then if i want to simulate that I would run:
Cautomaton32.exe /m "Scan with ESET Smart Security" "C:\Readme.txt"
OR just
Cautomaton32.exe /m "$Scan with ESET" "C:\Readme.txt"

You can see why such a utility would be useful running from batch files, shortcuts, or with a batch processor like D+D Robot.
Logged
cranioscopical
Friend of the Site
Supporting Member
**
Posts: 4,170



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #7 on: November 14, 2010, 07:33:45 PM »

That's very nifty!
Just tried it out using 4NT.
Works well, just have to stick automaton in my path and/or make a command-line alias for cautomaton  Wink
Logged

Chris
worstje
Honorary Member
**
Posts: 555



The Gent with the White Hat

View Profile Give some DonationCredits to this forum member
« Reply #8 on: November 14, 2010, 08:07:19 PM »

List of problems in v0.8.1 / feature requests thus far pointed out to me by mouser:

  • Bug: There's no visible error message if it can't find the action. Total oversight on my part. Error code should be > 0 though.
  • Bug: XP is no gentleman, and refuses to wear the hat. (At least the window it is supposed to adorn is completely invisible without loss of functionality...)
  • Feature request: when using /a, give an example for /match even when a /verb is available.
  • Feature request tongue: better readme.txt file, including examples and a list of parameters and such
  • Bug? On mouser's XP Cautomaton totally messes up all the icons, also garbling the Send to submenu into blocks and other semi-geometrical shapes. Any XP users around here who can test with the /p option on a random file, and tell me how their menu compares to rightclicking said file?
  • Bug: debug messages are worth crap if you print the wrong stuff at the wrong places.
« Last Edit: November 14, 2010, 10:35:09 PM by worstje » Logged
cranioscopical
Friend of the Site
Supporting Member
**
Posts: 4,170



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #9 on: November 14, 2010, 08:22:35 PM »

On XP SP3

Just a note; Cautomaton dies here if I hover over "Open With" from the popup - before even I can left-click on it.

From inside the Cautomaton folder I type this;
cautomaton /a readme.txt

Here's a comparison of right-click menus
Logged

Chris
worstje
Honorary Member
**
Posts: 555



The Gent with the White Hat

View Profile Give some DonationCredits to this forum member
« Reply #10 on: November 14, 2010, 08:22:54 PM »

Ok, so that officially makes it a Cautomaton bug. *scratches head*
Unless somehow you two have the same software installed that messes stuff up in Cautomatons specific case, but with 100% of the XP users having this problem I'll have to dive into finding an actual cause and solution. smiley
« Last Edit: November 14, 2010, 08:26:40 PM by worstje » Logged
cranioscopical
Friend of the Site
Supporting Member
**
Posts: 4,170



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #11 on: November 14, 2010, 08:36:41 PM »

Ok, so that officially makes it a Cautomaton bug. *scratches head*
Unless somehow you two have the same software installed that messes stuff up in Cautomatons specific case, but with 100% of the XP users having this problem I'll have to dive into finding an actual cause and solution. smiley
I do have a bunch of custom sub-menus under that '… Stuff' menu

I just checked, I can call items from that sub menu using /m… using the results from /a… either by item name or #ID

If I hit the key accelerator ('h') for 'Open With' Cautomaton dies.
« Last Edit: November 14, 2010, 08:48:07 PM by cranioscopical » Logged

Chris
worstje
Honorary Member
**
Posts: 555



The Gent with the White Hat

View Profile Give some DonationCredits to this forum member
« Reply #12 on: November 14, 2010, 08:55:31 PM »

Good news!

I can reproduce it on my old laptop. Bad news.. I can't debug it on there. :-(

Edit: mystery bug goes squash!  Thmbsup

A totally harmless flag ment for Vista and higher remained somewhere after fooling around with the options in said menu. Windows 7 ignored it, XP shouldn't even know of its existence according to the docs, but it is enough to make it go nuts thinking it needs to go ownerdraw and stuff.

Will be fixed in my next release. smiley
« Last Edit: November 14, 2010, 09:07:48 PM by worstje » Logged
cranioscopical
Friend of the Site
Supporting Member
**
Posts: 4,170



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #13 on: November 14, 2010, 09:13:39 PM »

Well done  Thmbsup
Logged

Chris
worstje
Honorary Member
**
Posts: 555



The Gent with the White Hat

View Profile Give some DonationCredits to this forum member
« Reply #14 on: November 14, 2010, 10:43:49 PM »

And version 0.8.2 is up.

v0.8.2 (2010-11-15)

    Bugfix release. Oh my, the bugs.
    
      Added: error messages when failing to compete.
      Fixed: Windows XP ownerdraw-glitch fest, which also caused crashes.
      Fixed: debug messages would print wrong data.
      Fixed: Windows XP now gets _the_ hat. And Vista+ get a smaller hat.
      Changed: added some new exit codes and restructured them.
      Fixed: Pointless /v /n combination is pointless.


Current state of affairs of stuff I've got in my head...

  • Feature request : better readme.txt file, including examples and a list of parameters and such
  • Feature request: when using /a, give an example for /match even when a /verb is available.
  • Feature request: document those exit codes I've been adding
« Last Edit: November 14, 2010, 10:47:27 PM by worstje » Logged
mouser
First Author
Administrator
*****
Posts: 33,352



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #15 on: November 14, 2010, 11:31:33 PM »

Bugs fixed, and icons are perfect now.. NICE!!!  thumbs up thumbs up thumbs up
Logged
justice
Supporting Member
**
Posts: 1,888



Solve issues simply.

View Profile WWW Give some DonationCredits to this forum member
« Reply #16 on: November 15, 2010, 03:43:27 AM »

I'd like to see a few more real world examples because I think it might be an interesting program for many (and me) if they could see in what situations it would be useful.  Thmbsup
Logged

worstje
Honorary Member
**
Posts: 555



The Gent with the White Hat

View Profile Give some DonationCredits to this forum member
« Reply #17 on: November 15, 2010, 08:21:56 AM »

I'd like to see a few more real world examples because I think it might be an interesting program for many (and me) if they could see in what situations it would be useful.  Thmbsup

How to pin/unpin documents to the Start Menu using Cautomaton.
Logged
mouser
First Author
Administrator
*****
Posts: 33,352



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #18 on: November 15, 2010, 09:04:51 AM »

As I was testing worstje's implementation I realized that the way he built it, it actually has a totally different use from the one I originally envisioned when i posted the idea.

The original idea, which is to let you (or more likely another program) invoke one of the commands on the right-click menu programatically without direct user interaction.  This use still stands and I think will have some very cool uses.

But when worstje implemented it, he also added a feature that basically just pops up the right-click menu for a file at the cursor location.  That seems to me to be useful in and of itself.  It means that if you are writing a utility that shows a file list, you can now let the user bring up the right click context menu (either the 32bit or 64bit) from your utility, by invoking the Cautomaton executable from your utility, using the /p commandline argument, without having to write your own code for showing a file's right-click context menu (which i think is pretty hairy unless someone can correct me).
« Last Edit: November 15, 2010, 09:08:21 AM by mouser » Logged
worstje
Honorary Member
**
Posts: 555



The Gent with the White Hat

View Profile Give some DonationCredits to this forum member
« Reply #19 on: November 15, 2010, 09:16:06 AM »

Hairy does not describe it nearly well enough. smiley
Logged
cranioscopical
Friend of the Site
Supporting Member
**
Posts: 4,170



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #20 on: November 15, 2010, 10:54:54 AM »

Looking good  Thmbsup Thmbsup
I now have a hat in the bottom left corner of my console.

I also have this
Logged

Chris
mouser
First Author
Administrator
*****
Posts: 33,352



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #21 on: November 15, 2010, 11:12:34 AM »

It's interesting to see a few things re-ordered, like "Run Sandboxes" which is near top in Cautomaton.
Logged
worstje
Honorary Member
**
Posts: 555



The Gent with the White Hat

View Profile Give some DonationCredits to this forum member
« Reply #22 on: November 15, 2010, 11:14:53 AM »

That screenshot is mighty interesting. What application is it that you compare Cautomaton's popup against? The custom theming makes me assume it isn't explorer. I'm pretty curious why some of those items (Run sandboxed, Kedit this) are in different spots.

As for the rename option... it is an oddball. I can definitely get the option to go in, but Windows itself doesn't handle it. I'd need to handle the command within Cautomaton, and then the question becomes - how? Popup a dialog and let someone type something there? Return an exit code that tells the calling application rename was selected so they can handle it? A new flag to let one pick between those two choices?

Don't get me wrong - it is very possible. But the nature of the command wreaks a bit of havoc since you can basically select an option in two different ways, and then the output would also be pretty drastically different for both.

There is a lot of paths the code can take, and it would be pretty easy to have an addition break some other usecase as a side-effect. So before I throw myself onto that particular problem, can you give a usecase where you would use said rename option?
Logged
cranioscopical
Friend of the Site
Supporting Member
**
Posts: 4,170



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #23 on: November 15, 2010, 12:21:40 PM »

Sorry for the time lapse, I was lunching  smiley

That screenshot is mighty interesting. What application is it that you compare Cautomaton's popup against? The custom theming makes me assume it isn't explorer. I'm pretty curious why some of those items (Run sandboxed, Kedit this) are in different spots.

Duh… never forget that you're dealing with a moron here! That menu was from Directory Opus. I was clinging to my favourite adage, 'act before you think.'


Quote
As for the rename option... it is an oddball. I can definitely get the option to go in, but Windows itself doesn't handle it. I'd need to handle the command within Cautomaton, and then the question becomes - how? Popup a dialog and let someone type something there? Return an exit code that tells the calling application rename was selected so they can handle it? A new flag to let one pick between those two choices?

There is a lot of paths the code can take, and it would be pretty easy to have an addition break some other usecase as a side-effect. So before I throw myself onto that particular problem, can you give a usecase where you would use said rename option?

Usecase? Heavens, no! Merely pointing out its absence. I don't use it ,but simply haven't bothered to remove it from my menus. Good idea to leave it out, if you ask me.

Here's Cautomaton/Explorer on my system


Logged

Chris
worstje
Honorary Member
**
Posts: 555



The Gent with the White Hat

View Profile Give some DonationCredits to this forum member
« Reply #24 on: November 15, 2010, 12:47:45 PM »

Ah, that looks pretty sweet. smiley

Glad to see the difference in the visual style isn't because I forgot to include a manifest. Doublechecked as I saw your image, and it seems I popup menus always look right even if there's no manifest. And that explorer looks exactly the same minus the Rename option also makes me happy. smiley

Also, I have no clue why you would be a moron. Because you use DOpus? I doubt that is a proper reason. smiley
Logged
Pages: [1] 2 Next   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.065s | Server load: 0.07 ]