Windows Script Host Functions

PowerHome includes a number of PowerHome specific functions that extend the Windows Script Host environment and allows it to interact with PowerHome. Nearly ALL of the PowerHome "ph_" functions (only the functions that start with ph_ are extended to WSH) are available in a Windows Script Host version. For example, the ph_addtoglobal function available within the PowerHome internal formula environment is also available within Windows Script Host as ph.addtoglobal. Instead of duplicating every function listed in this Help file under the Formulas->Functions section ( Formula Functions) under the Windows Script Host functions, this section will only document the differences in between the two. To use a "ph_" function within Windows Script Host, you just have to change the "ph_" to "ph.".

Listed below are the differences:

ph_ Formula function Windows Script Host equivalent
ph_and ph.bitand
ph_not ph.lognot
ph_or ph.bitor
ph_xor ph.bitxor
   
ph_debuginfo Not available
ph_fromunixtime Not available
ph_isnull Not available
ph_n2b Not available
ph_stacktrace Not available
ph_tounixtime Not available
ph_tracemsg Not available
ph_traceoff Not available
ph_traceon Not available

The PowerHome formula functions ph_setglobal_a and ph_setglobal_s also have their equivalent in WSH as ph.setglobal_a and ph.setglobal_s. WSH also has some additional functions: ph.setglobal_d, ph.setglobal_dt, ph.setglobal_n and ph.setglobal_t.

The PowerHome formula functions ph.setvars_a and ph_setvars_s have WSH equivalents ph.setvars_a and ph.setvars_s. WSH also includes the functions ph.setvars_d, ph.setvars_dt, ph.setvars_n, and ph.setvars_t.

If you should encounter a "ph_" formula function that does not appear to be duplicated as a WSH "ph." function or doesnt work as intended, you can always embed the function in a formula string and execute it using the generic "ph.formula( )" function.