Display log function to textbox

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 5 years 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.
chexmix
Posts: 5
Last visit: Sun Dec 09, 2018 9:39 am

Display log function to textbox

Post by chexmix »

I have a log function that I call in various places in my script. How would I output this to a textbox?



log -l "Mail property detected"
log -l "City property detected"
log -l "Unable to set property: $($p.name)"
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Display log function to textbox

Post by Alexander Riedel »

You add the log entry to the text property of the textbox.
$Textbox1.Text += "Your new log entry"
You might want to throw in new lines and other formatting aids.

I would start with familiarizing myself with the various controls and how to use them.
https://info.sapien.com/index.php/guis/gui-controls

If you have any further questions regarding GUI design, please post in the PowerShell GUI section of the forum. It is open to everyone.
Alexander Riedel
SAPIEN Technologies, Inc.
chexmix
Posts: 5
Last visit: Sun Dec 09, 2018 9:39 am

Re: Display log function to textbox

Post by chexmix »

That works for a string of text but how do I use the function like I had asked.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Display log function to textbox

Post by Alexander Riedel »

I don't know what your log function does. You would probably need to rewrite that to do what I implied.
I suggest to post in the PowerShell GUI section and provide a little more detail.
Alexander Riedel
SAPIEN Technologies, Inc.
chexmix
Posts: 5
Last visit: Sun Dec 09, 2018 9:39 am

Re: Display log function to textbox

Post by chexmix »

I'm trying it out thats why I posted in the trail software section. The PowerSehll GUI section is for registered products only.
User avatar
J A Reif
Posts: 241
Last visit: Fri Mar 22, 2024 8:12 am
Answers: 1
Has voted: 1 time
Been upvoted: 1 time

Re: Display log function to textbox

Post by J A Reif »

Hi chexmix!

The PowerShell GUIs forum is open to anyone with a SAPIEN account - it is not restricted to people with registered products. You can find the forum here: https://www.sapien.com/forums/viewforum.php?f=21
June Alane Reif
SAPIEN Technologies, Inc.
This topic is 5 years 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.