Jump to content
Software FX Community

Shigeya Tanabe

Members
  • Content Count

    3
  • Joined

  • Last visited

Everything posted by Shigeya Tanabe

  1. Thanks for your detail! Now the situation I encounter is clear. And thanks for your workaround too. I tried to use function start-gadget { xxx } instead of your idea, however it does not work. So, set/get-content is the best I think.
  2. What I am trying to do is in your reference link. [] I use start-demo function mentioned in that blog post to automate demo. Start-demo reads one-liners from text file and invoke them line by line. As written in the post, it invokes command line like following, Invoke-Expression $(".{" + $_lines[$_i] + "}| out-host") $_lines holds one-liners read from text file. When I added 'get-date|out-gauge -refresh 0:0:1' to my demo commands for example, out-gauge shows error I wrote earlier. Out-gauge was invoked as .{ get-date | out-gauge -refresh 0:0:1 } | out-host While following invokes out-gauge -refresh without error. Invoke-Expression $(".{`n" + $_lines[$_i] + "}| out-host") Actual lines would be { get-date | out-gauge -refresh 0:0:1 } | out-host
  3. When I tried this script, &{get-date | out-gauge -refresh 0:0:1} An error icon appears on the gauge which says closing "}" is missing. I guess out-gauge captures commands before pipe so that error would be reasonable. Any workaround to use refreshing commands within a single line script block?
×
×
  • Create New...