openmolecules.org

 
Home » DataWarrior » Functionality » number of visible rows into macro saving variable (It is possible to read the number of the visible rows into a macro variable?)
Re: number of visible rows into macro saving variable [message #2361 is a reply to message #2360] Sun, 22 December 2024 19:20 Go to previous message
nbehrnd is currently offline  nbehrnd
Messages: 233
Registered: June 2019
Senior Member
Dear Thomas,

in the user case described above by Julio, one approach I pursued let DataWarrior complete its work and subsequently (when DataWarrior wasn't running any more) renamed the exported .dwar or .sdf files with a Python script (cf. attached scripts).

However, it is somewhat _post factum est_. Independent from Julio's feature request to access variable `rowcount` already written into the .dwar files to become an accessible item in the macro editor, I started to wonder if the macro editor could be extended further. Namely by one entry which would i) allow the dwam macro to launch a script (for instance, but not limited to Python), or an compiled executable outside DW, ii) await this assistant to complete its sub task, before iii) continue with actions defined in the .dwam macro. Something similar to the `system()` command in AWK, or `subprocess.Popen` in Python -- if there were an equivalent in Java.

With best regards,

Norwid
 
Read Message
Read Message
Read Message
Previous Topic: macro comments
Next Topic: Datawarrior Commandline Option to Use Template
Goto Forum:
  


Current Time: Thu Apr 03 13:41:02 CEST 2025

Total time taken to generate the page: 0.00664 seconds