Pages

Tuesday, May 12, 2009

Micro Macros: A Microscopic Macrocosm

To append the previous post about deriving the path of the active/executing script, I wanted to point out that (of the three amigos) only VBScript makes it difficult. KiXtart and PowerShell do not.

KiXtart:

$p = @scriptdir
? $p

PowerShell v2:

$p = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
write-host $p


(Thanks to
Serge van den Oever for the PowerShell insights)

More Goodness:

I just uploaded a new VBScript syntax definition file for TextPad 5.  I also updated the Zip package file and the links for both.  You can download them at http://www.steinvb.net/scripting.php  

No comments:

Post a Comment