Page 1 of 1

Help with some code

Posted: Thu Oct 15, 2015 5:01 am
by ianstraw
I have some code that is basically going out looking for serves offline, online etc.

This works, however i have some lines that need writing out to a text box to show whats happening.

This line of code works
PowerShell Code
Double-click the code block to select all.
$richtext.text = some text, some text
However this line does not work
PowerShell Code
Double-click the code block to select all.
$richtextbox1.text = $i "pingable with" $pingable.ipv4address
error is

Error: Unexpected token "is pingable with" in expression or statement.

Is there a way round this?

Thanks

Help with some code

Posted: Thu Oct 15, 2015 5:01 am
by SAPIEN Support Forums
This is an automated post. A real person will respond soon.

Thank you for posting, ianstraw.

Did you remember to include the following?
  • 1. Product, version and build (e.g. Product: PowerShell Studio 2014, Version & Build: 4.1.71. Version and build information can be found in the product's About box accessed by clicking the blue icon with the 'i' in the upper right hand corner of the ribbon.)
    2. Specify if you are running a 32 or 64 bit version
    3. Specify your operating system and if it is 32 or 64 bit.
    4. Attach a screenshot if your issue can be seen on the screen
    5. Attach a zip file if you have multiple files (crash reports, log entries, etc.) related to your issue.
If not, please take a moment to edit your original post or reply to this one.

*** Make sure you do not post any licensing information ***

Re: Help with some code

Posted: Thu Oct 15, 2015 8:09 am
by davidc
[POST MOVED BY MODERATOR]

Try the following instead:
PowerShell Code
Double-click the code block to select all.
$richtextbox1.text = "$i pingable with $($pingable.ipv4address)"
David

Re: Help with some code

Posted: Fri Oct 16, 2015 4:57 am
by ianstraw
Thats worked. thanks