Display log function to textbox

Use this forum to ask questions 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.
chexmix
Posts: 4
Joined: Thu Nov 08, 2018 6:12 am

Display log function to textbox

Post by chexmix » Thu Nov 08, 2018 6:37 am

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: 6684
Joined: Tue May 29, 2007 4:43 pm

Re: Display log function to textbox

Post by Alexander Riedel » Thu Nov 08, 2018 7:57 am

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: 4
Joined: Thu Nov 08, 2018 6:12 am

Re: Display log function to textbox

Post by chexmix » Thu Nov 08, 2018 10:04 am

That works for a string of text but how do I use the function like I had asked.

User avatar
Alexander Riedel
Posts: 6684
Joined: Tue May 29, 2007 4:43 pm

Re: Display log function to textbox

Post by Alexander Riedel » Thu Nov 08, 2018 10:24 am

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: 4
Joined: Thu Nov 08, 2018 6:12 am

Re: Display log function to textbox

Post by chexmix » Thu Nov 08, 2018 10:58 am

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. Reif
Posts: 159
Joined: Mon Jan 14, 2013 10:43 am

Re: Display log function to textbox

Post by J. Reif » Thu Nov 08, 2018 12:09 pm

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.