Cropped Output

Use this forum to ask questions after your subscription maintenance expires or before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
This topic is 1 year and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
EinMichi
Posts: 1
Last visit: Mon Nov 14, 2022 1:59 pm

Cropped Output

Post by EinMichi »

Product, version and build: PowerShell Studio 2022 (64 Bit) (Build v5.8.212)
Operating system: Windows 10 Pro (64 Bit)
PowerShell version(s): V5

Hey there,

I´ve a weird output crop in PowerShell Studio. I have a Script, with read out some informations from printers with snmp and put them to a output variable. In the end the variable will printed in PowerShell.

Code: Select all

$ausgabe

$ausgabe = $ausgabe +"==="+$PrinterModell.Data+ "===`n"
$ausgabe = $ausgabe + "Tonermodell: "+$TonerType.Data + "`n"
$ausgabe = $ausgabe + "Tonerstand: " + $Tonerlevel.Data + " Prozent `n"
Write-Host $ausgabe
(Sorry for the "German" code, just copied from my project)

If I run the script in PowerShell Studio I only get two lines an output:
lBqgzNZ.png
lBqgzNZ.png (6.52 KiB) Viewed 1512 times
If I run the script in native Windows PowerShell, I get the full output with all three lines:
o5CFeN8.png
o5CFeN8.png (7.89 KiB) Viewed 1512 times
If I set a breakpoint in the code and inspect the "$ausgabe" variable there are all the 3 lines in it. The funny thing is, if I comment out a line I can get the other two lines back correctly.

For example, a

Code: Select all

$ausgabe

$ausgabe = $ausgabe +"==="+$PrinterModell.Data+ "===`n"
#$ausgabe = $ausgabe + "Tonermodell: "+$TonerType.Data + "`n"
$ausgabe = $ausgabe + "Tonerstand: " + $Tonerlevel.Data + " Prozent `n"
Write-Host $ausgabe
Gives back:
eL5ovdZ.png
eL5ovdZ.png (5.85 KiB) Viewed 1512 times
Anyone an idea how to fix that?

Thanks and greetings from German!
User avatar
Alexander Riedel
Posts: 8472
Last visit: Mon Mar 18, 2024 2:59 pm
Answers: 19
Been upvoted: 37 times

Re: Cropped Output

Post by Alexander Riedel »

I don't have your printer object, so I cannot test that.
But I substituted the data with strings and it works fine.
I'll hand it to QA on Monday for further evaluation.
2022-11-13_9-36-11.jpg
2022-11-13_9-36-11.jpg (178.19 KiB) Viewed 1495 times
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 1 year and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.