openmolecules.org

 
Home » DataWarrior » Functionality » showing variable txt/values at "showMessage" macros (Trying to show variable txt/values to follow up WP macro code designs)
showing variable txt/values at "showMessage" macros [message #1880] Wed, 26 April 2023 11:46 Go to next message
juliocoll is currently offline  juliocoll
Messages: 33
Registered: January 2023
Location: Madrid SPAIN
Member
I tried different ways to identify variable txt and/or numeric values in DW macros by showing them using the DW macros "showMessage" to help in the designing of different macro codes.

I ended up experimenting with the simplest following code:

<macro name="Savenombre">
<task name="defineVariable">
name=filename
message= type your name, please....
</task>
<task name="showMessage">
message=$filename.txt?????????
</task>
</macro>

I got being asked and typing the name, but the "showMessage" did not even appeared, no matter what I tried it to type for the message to get the variable text/value (filename, $filename, name, $name, ±txt, etc, etc).....

Is there any other way to do it?
thank you
julio


Julio Coll
Profesor de Investigación. Emérito
Dpt.Biotecnología
CSIC-centro Nacional INIA, Madrid, SPAIN
Dr. Biologia Univ.Comp(UCM). Madrid, Spain
PHD. Biology Mass.Inst,Technol (MIT). Massachusetts, USA
orcid: 0000-0001-8496-3493
Re: showing variable txt/values at "showMessage" macros [message #1886 is a reply to message #1880] Sat, 29 April 2023 14:44 Go to previous messageGo to next message
thomas is currently offline  thomas
Messages: 715
Registered: June 2014
Senior Member
There is a simple answer: The 'ShowMessage' task did not do any variable resolution, yet.
In fact, variables are not resolved everywhere. I have built the resolution into various
tasks, where it makes sense, but unfortunately, it is not complete nor consistent yet.
I just added it to the ShowMessage task. Thus, after updating, the following macro will work:

<macro name="Savenombre">
<task name="defineVariable">
name=filename
message= type your name, please....
</task>
<task name="showMessage">
message=$filename
</task>
</macro>
Re: showing variable txt/values at "showMessage" macros [message #1887 is a reply to message #1886] Sat, 29 April 2023 20:35 Go to previous messageGo to next message
juliocoll is currently offline  juliocoll
Messages: 33
Registered: January 2023
Location: Madrid SPAIN
Member
Thank you Thomas !
It is very useful to follow up, confirm and simplify some macro designs........


Julio Coll
Profesor de Investigación. Emérito
Dpt.Biotecnología
CSIC-centro Nacional INIA, Madrid, SPAIN
Dr. Biologia Univ.Comp(UCM). Madrid, Spain
PHD. Biology Mass.Inst,Technol (MIT). Massachusetts, USA
orcid: 0000-0001-8496-3493
Re: showing variable txt/values at "showMessage" macros [message #1888 is a reply to message #1887] Mon, 01 May 2023 09:29 Go to previous messageGo to next message
juliocoll is currently offline  juliocoll
Messages: 33
Registered: January 2023
Location: Madrid SPAIN
Member
Sorry Thomas but after updating as recommended in two different computers, the <macro name="Savenombre"> still doesnt work. .....
I am working in Windows 10 64

Could I be making something wrong?

Thank you for your attention
julio


Julio Coll
Profesor de Investigación. Emérito
Dpt.Biotecnología
CSIC-centro Nacional INIA, Madrid, SPAIN
Dr. Biologia Univ.Comp(UCM). Madrid, Spain
PHD. Biology Mass.Inst,Technol (MIT). Massachusetts, USA
orcid: 0000-0001-8496-3493
Re: showing variable txt/values at "showMessage" macros [message #1896 is a reply to message #1888] Fri, 12 May 2023 13:01 Go to previous message
juliocoll is currently offline  juliocoll
Messages: 33
Registered: January 2023
Location: Madrid SPAIN
Member
Never mind!

I just found out: I had mixed up Linus Datawarrior.jar and Windows Datawarrior.exe during file replacements !

Now everything works in the 2 computers....

sorry for the inconvinience

julio


Julio Coll
Profesor de Investigación. Emérito
Dpt.Biotecnología
CSIC-centro Nacional INIA, Madrid, SPAIN
Dr. Biologia Univ.Comp(UCM). Madrid, Spain
PHD. Biology Mass.Inst,Technol (MIT). Massachusetts, USA
orcid: 0000-0001-8496-3493
Previous Topic: Search for "any atom" in structure editor
Next Topic: Add reaction from structure
Goto Forum:
  


Current Time: Sun Nov 24 14:14:10 CET 2024

Total time taken to generate the page: 0.03815 seconds