Page 1 of 1

Input string variable to textbox/label/?

Posted: Fri Aug 30, 2013 12:01 pm
by R1Johnny
Good afternoon,
I'm writing a script which informs a user of the number of days until their password expires.
Naturally, this info will be different for each user.
I'd like to send a string variable to some sort of textbox, label, or whatever box-type you recommend to display this string.

There will only be a couple of buttons as input from the user to determine if they want to change their password right then or not.

The GUI portion of this script will be called after the password expiration date has been computed.

I'm currently using a Textbox but the info isn't displayed unless the textbox is the focus and the user presses any key. I'd like the info to be displayed automatically.

Can you please advise what box-object type I should use and perhaps give a hint on the syntax to update the value of the text?

Thanks very much.

Re: Input string variable to textbox/label/?

Posted: Fri Aug 30, 2013 1:25 pm
by jvierra
Sounds like a good us for a timer. Set the time to tick every minute.

Re: Input string variable to textbox/label/?

Posted: Tue Sep 03, 2013 5:30 am
by R1Johnny
Thanks very much. (Is the J for John in jvierra?)
Do you have any links that may explain the usage of the timer?
In the meantime I'll check the PowerShell Studio native tools to see if I can figure it out.

thanks again.
regards,
John

Re: Input string variable to textbox/label/?

Posted: Tue Sep 03, 2013 5:57 am
by jvierra
The timer is a forms control. It I in the toolbox.
http://www.sapien.com/blog/2011/08/09/p ... r-control/

Re: Input string variable to textbox/label/?

Posted: Tue Sep 03, 2013 7:29 am
by R1Johnny
Thanks again for the reply.
In the sample timer script, the Form title (text) changes along with the timing display in the main label window.
Is there a way to get the label window to be updated without updating the Form text?

Thanks again.
regards,
John

Re: Input string variable to textbox/label/?

Posted: Tue Sep 03, 2013 7:45 am
by R1Johnny
Thanks again for the reply.
In the sample timer script, the Form title (text) changes along with the timing display in the main label window.
Is there a way to get the label window to be updated without updating the Form text?

Thanks again.
regards,
John

Re: Input string variable to textbox/label/?

Posted: Tue Sep 03, 2013 11:50 am
by R1Johnny
I figured it out.
thank you.