Expanding EnvVars

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
MBaas
Posts: 683
Joined: 15 Feb 2016 21:08

Expanding EnvVars

Post by MBaas »

I am currently reorganizing some old scripts of mine which build a menu for popupnested. "Suddenly" I now have a problem with environment variables in that menu not being expanded (they still show as %var%).
Unfortunately I don't have much right now time to dig into this and built a repro, so I thought for a quick fix I could just do set $MyMenu,$MyMenu,r and that indeed expanded those variables - but also and <crlf>s I had embedded in script command, so the whole thing became unuseable!

Do I have to postpone fixes until I have time (possibly next week) or this there perhaps a way to just expand the environment variables (like an undocumented "e" option for set)...
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.0600 * * LinkTree

highend
Posts: 14926
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Expanding EnvVars

Post by highend »

Replace <crlf> with e.g. the pilcrow char and then do the set / eval() (and afterwards replace it again)?
One of my scripts helped you out? Please donate via Paypal

admin
Site Admin
Posts: 66102
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Expanding EnvVars

Post by admin »

Posting your code would help.

Post Reply