Gregor, Thanks so much - I was still confused as I never used script before, till someone pointed out the example - I guess I missed that when I read your response the first time.
Works great! Thanks! Doug -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Gregor Scott Sent: Sunday, May 30, 2010 6:44 PM To: 'U2 Users List' Subject: Re: [U2] wIntegrate equivalent of System BuilderTU.CLIENT.GETENV subroutine Doug, there is a client-side function called "GetEnv()" which you can use: >From the 6.1.3 Client scripting manual-------------- Syntax GetEnv var_name, [check_exists] Description The GetEnv function gets the value of an OS environmental variable. If the variable does not exist it returns "". The variable can be checked to see if it does exist by passing true as a second parameter to the function. Parameters The following table describes the parameters of the GetEnv command: Parameter Description var_name The name of the variable enclosed in quotes. check_exists If specified as true this parameter will return true (1) if the variable exists or false (0) if it doesn't. Return Value The value of the environmental variable unless check_exists is true in which case either true or false is returned. Example Display the TEMP variable on Windows MessageBox "The TEMP variable is ":GetEnv("TEMP") Version 6.0.3 Original version ------------------------------------------------- The host subroutine WIN.EVAL can be used to return the value of an environment variable: call WIN.EVAL('GetEnv("TEMP")',val.TEMP) Gregor -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Doug Farmer Sent: Saturday, 29 May 2010 12:52 AM To: U2 Users List Subject: [U2] wIntegrate equivalent of System Builder TU.CLIENT.GETENV subroutine For all of you multiple platform developers - A query: I have need to duplicate some code I wrote in System Builder in a wIntegrate environment. System Builder has a subroutine called TU.CLIENT.GETENV. I use this subroutine to look up an environment variable on a user's PC so I know where a program I need to execute is loaded. I am not able to find an equivalent command using wIntegrate subroutines. Not being a wIntegrate programmer, I resorted to reading all 600 pages of the wIntegrate Host Subroutines Reference manual. Quite a barn burner! I could not put it down. But seriously, I need a way to look at the user's environment settings and pull the value for a specific setting. For example, under System Builder, I would have this code CALL TU.CLIENT.GETENV("CCPath",ProgramPath) Command = '&1"':ProgramPath:'\CCEntry.exe"' CALL TU.EXECUTE.SHELL(Command,'') Under wIntegrate, I found the WIN.PCRUN subroutine (or WIN.PCRUNS2), so I know I can run the program, but I do not know how to get the environment setting or where the program is installed. Any help is greatly appreciated! Doug Farmer -------------------------------------------------------- This e-mail is for the use of the intended recipient(s) only. If you have received this e-mail in error, please notify the sender immediately and then delete it. If you are not the intended recipient, you must not use, disclose or distribute this e-mail without the author's prior permission. We have taken precautions to minimize the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachment to this message. We cannot accept liability for any loss or damage caused by software viruses. Any views and/or opinions expressed in this e-mail are of the author only and do not represent the views of Epicor Software Corporation or any other company within its group. This message has been scanned for malware by Websense. www.websense.com _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users