[14 Aug 2009] setting an environmental variable to a Hollywood variable value.

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
JosDuchIt
Posts: 17
Joined: Mon Jun 20, 2016 6:26 pm

[14 Aug 2009] setting an environmental variable to a Hollywood variable value.

Post by JosDuchIt »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 14 Aug 2009 21:05:03 +0200

Hello, I don't succeed using the execute (setenv MyEnvVar myHWVar$) or variants of this to set the environmental variable MyEnvVar

Code: Select all

Execute("Setenv .mytest myfile$ ")  ; .mytest is set but it contains the
string myfile$ not its content
; Execute("Setenv .mytest" myfile$ ) ; closing bracket expected
; Execute(Setenv .mytest myfile$ ) ; closing bracket expected
cdstr$ = "setenv .mytest" .. myfile$
Execute(cdstr$) ; same result as first try
Any way to do this ?

Thanks

Joseph
User avatar
lazi
Posts: 646
Joined: Thu Feb 24, 2011 11:08 pm

[14 Aug 2009] Re: setting an environmental variable to a Hollywood variable value.

Post by lazi »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Fri, 14 Aug 2009 23:29:01 +0100

Try this:

Code: Select all

Execute ("Setenv .mytest " .. myfile$)
<..> is for join strings
JosDuchIt
Posts: 17
Joined: Mon Jun 20, 2016 6:26 pm

[15 Aug 2009] Re: setting an environmental variable to a Hollywood variable value.

Post by JosDuchIt »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 15 Aug 2009 12:14:00 +0200

In my previous mail i mentioned that i used <..> allready in this way: cdstr$ = "setenv .mytest" .. myfile$ Execute(cdstr$) ; noting :same result as first try. In fact it just did not touch the result of a previous try (which set .mytest to the 'text' "myfile$", not its content. My error was not having a blank after .mytest and before the closing <">

Thanks for your help Joseph
Locked