unearthed Posted April 27, 2014 Share Posted April 27, 2014 Has anyone written a script to enable comments in worksheet cells - it would make such a difference with complex worksheets? I'm currently building a planting module for a large scale planting and the current method of keeping paper notes is so old... Quote Link to comment
michaelk Posted April 28, 2014 Share Posted April 28, 2014 Do you mean comments as in scripting comments {note goes here in brackets but doesn't display}? Great idea. mk Quote Link to comment
unearthed Posted April 28, 2014 Author Share Posted April 28, 2014 (edited) Scripting comments {or note goes in here and pop ups with mouse proximity} I suppose so, also popups like you can set in Excel. I don't know if it's even possible but TuiWalker and others are making interesting noises about the capabilities of Python etc (admittedly with v2014). If the program can really be extended as much as the chatter suggests it may even be worthwhile upgrading. I'll (probably) never write a script, but I can always come up with ideas - its my sole way of making a living! Edited April 28, 2014 by nig Quote Link to comment
Miguel Barrera Posted April 28, 2014 Share Posted April 28, 2014 Neither vectorscript nor python could do this easily because there is no event defined yet for hovering over an object. I have seen some functions for an event enabled tool plug-in but it is not well documented. Even if you could identify the cell where the mouse is, where would you store the note and link it to the cell? That would take a lot of thinking to make it happen. Quote Link to comment
michaelk Posted April 28, 2014 Share Posted April 28, 2014 For a workaround I sometimes use a cell with white text on a white cell background above the cell I want to comment on. That's the best there is for the moment. Quote Link to comment
unearthed Posted April 28, 2014 Author Share Posted April 28, 2014 Thanks for your comments Miguel and Michael Quote Link to comment
Miguel Barrera Posted April 29, 2014 Share Posted April 29, 2014 Expanding on Michael's workaround, you can enter comments in another row or column and then toggle its visibility either manually or with a script for multiple rows/columns by setting the height or width to 0. I do have a script for an estimate worksheet that hides rows of items with zero quantity. Another idea that comes to mind is a symbol or pio assigned to a defined class that will display the comment when selected. Before printing, the symbol or pio can then be hidden by turning off its class. Quote Link to comment
michaelk Posted April 29, 2014 Share Posted April 29, 2014 Great idea, Miguel! Consider it stolen. This is way above my scripting abilities, but can the selection of a cell be an event? I'm wondering if a script can be triggered by the selection of a cell to message(); the contents of another cell in the same or different worksheet. mk Quote Link to comment
Miguel Barrera Posted April 29, 2014 Share Posted April 29, 2014 As I said before, there might be a workable solution but it will take time to test all the different schemes possible. You cannot get events from a cell directly. This can only be accomplished by having a background app listen and receive vw events but the scripting environment does not have this capability yet. I am not really sure if it would be wise to have this capability though since this is how spyware apps work. Another possible workaround would be to include the worksheet in a pio, calculate the position of the cell within the pio when clicked, and show the note in the object info palette for editing purposes. Storing & linking the notes will be another task but it is possible with an external file (text or xml) just like the general notes/callouts are stored. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.