Welcome to Powergui.org - an open source community for Windows Powershell

PowerGUI.org PowerGUI.org and blogs

Forums » PowerGUI User Discussions

Thread: PowerGUI input prompt

This question is answered. Helpful answers available: 1. Answered answers available: 1.


Permlink Replies: 15 - Pages: 2 [ 1 2 | Next ] - Last Post: Dec 18, 2009 2:59 AM by: Acanthus
Acanthus

Posts: 30
Registered: 12/18/08
PowerGUI input prompt
Posted: Feb 9, 2009 5:49 AM
 
  Click to reply to this thread Reply

Greetings all!

Trying not to sound like a complete numpty here, but I am having an argument with the PowerGUI input prompt (if that's an appropriate name?)

I have such code:

$var = Read-Host @"
Lots of text that I
Would like to spill over
A few lines
"@

Initially, I just had one long line of text which proves quite cumbersome for the user (they have to maximise the box at every question - and there are lots) so I decided to here-string the text to force it over a few lines.  It does this very well if just running the script at the prompt, but when using GUI I only get one full line of text and the scalps of the next line.  No matter how big I make the box I only see that text.  I have to include long security questions in my scripts and thus the user needs to be able to see what they are answering.  It seems a shame to have to maximise the box every time, as they need to be able to see the UI behind it.

Is there a way to a) force the box to stay a certain size (bigger than it is by defualt) for every input promp and; b) fit all my question text in before the box my user types in?


Apologies if I haven't explained my self properly, I think it's finally given me a headache :)  Thanks to all in advance.




seaJhawk


Posts: 414
Registered: 12/15/08
Re: PowerGUI input prompt
Posted: Feb 9, 2009 6:03 AM   in response to: Acanthus
Helpful
  Click to reply to this thread Reply

I'm sure this isn't the answer you want, buy you may need to write your own input form. You can use PrimalForms from Sapien or Admin Script Editor to design the form.

I've attached an example of a form that I've built to replace the New User... form from the AD PowerPack.

-Chris




Shay Levy


Posts: 1,919
Registered: 1/31/08
Re: PowerGUI input prompt
Posted: Feb 9, 2009 6:20 AM   in response to: Acanthus
 
  Click to reply to this thread Reply

I agree, the input box should appear after the read-host text no matter how long it is (a text box with scroll support).

Message was edited by: Shay Levy

Shay Levy [MVP]
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Toolbar
Shay Levy


Posts: 1,919
Registered: 1/31/08
Re: PowerGUI input prompt
Posted: Feb 9, 2009 6:22 AM   in response to: seaJhawk
 
  Click to reply to this thread Reply

I like the way you designed the form :)

Shay Levy [MVP]
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Toolbar
seaJhawk


Posts: 414
Registered: 12/15/08
Re: PowerGUI input prompt
Posted: Feb 9, 2009 6:27 AM   in response to: Shay Levy
 
  Click to reply to this thread Reply

Good point. That should be an easy change to make to the default form which would benefit everyone.

-Chris


Acanthus

Posts: 30
Registered: 12/18/08
Re: PowerGUI input prompt
Posted: Feb 10, 2009 6:24 AM   in response to: Shay Levy
 
  Click to reply to this thread Reply

Yup, that's what I need!  So guessing there's no way to do it already I'll keep my fingers crossed for an update :p

Like the form too, will have to investigate those :)

Thanks all. Message was edited by: Acanthus


Shay Levy


Posts: 1,919
Registered: 1/31/08
Re: PowerGUI input prompt
Posted: Feb 10, 2009 7:15 AM   in response to: Acanthus
 
  Click to reply to this thread Reply

You know what's so great about the PowerGUI team? You don't need to 'hope'... you can ask for it :-)

Shay Levy [MVP]
http://blogs.microsoft.co.il/blogs/ScriptFanatic
PowerShell Toolbar
Acanthus

Posts: 30
Registered: 12/18/08
Re: PowerGUI input prompt
Posted: Mar 31, 2009 7:47 AM   in response to: Shay Levy
 
  Click to reply to this thread Reply

Then I "hope" they can consider themselves "asked." :)


seaJhawk


Posts: 414
Registered: 12/15/08
Re: PowerGUI input prompt
Posted: Mar 31, 2009 8:32 AM   in response to: Acanthus
 
  Click to reply to this thread Reply

Rest assured, they do. I talked with them again about this topic a couple of weeks ago.

-Chris


Acanthus

Posts: 30
Registered: 12/18/08
Re: PowerGUI input prompt
Posted: Apr 1, 2009 1:10 AM   in response to: seaJhawk
 
  Click to reply to this thread Reply

That's great!  I thank the team in advance for all their hard work to date and in the future!

-Acanthus


Darin Pendergraft [Quest]


Posts: 663
Registered: 6/30/06
Re: PowerGUI input prompt - TEASER
Posted: Apr 2, 2009 11:22 AM   in response to: Acanthus
 
  Click to reply to this thread Reply

OK - the smart guys on the team (not me) have come up with some pretty cool ideas on input forms.  You guys will see some stuff from us "shortly" (translation: in the next few weeks)




smurawski

Posts: 2
Registered: 6/27/09
Re: PowerGUI input prompt - TEASER
Posted: Jul 8, 2009 7:23 AM   in response to: Darin Pendergra...
 
  Click to reply to this thread Reply

Darin,
How's this feature going?
Steve



Darin Pendergraft [Quest]


Posts: 663
Registered: 6/30/06
Re: PowerGUI input prompt - TEASER
Posted: Dec 2, 2009 2:12 PM   in response to: smurawski
 
  Click to reply to this thread Reply

Hmmm - well we don't have a forms designer in PowerGUI yet.

However, the here-string problem has been fixed in 1.9.6.  If you are having this problem, please get 1.9.6 and verify the fix.


Acanthus

Posts: 30
Registered: 12/18/08
Re: PowerGUI input prompt - TEASER
Posted: Dec 3, 2009 12:50 AM   in response to: Darin Pendergra...
 
  Click to reply to this thread Reply

So close! 

The first attached image is what I see in the GUI; to a learned user, you simply expand the box to see where you need to type the answer, but I can hear the wittering from Helpdesk already :p

I have played around with it a bit this morning, and I can get two lines of text and the scalp of an input box as in image two.  If I have any more than three lines of text I still only see the first three lines before having to expand.

Interestingly enough, if the input box is to be visible the window does expand itself horizontally, but if there are more lines of text it doesn't expand vertically.

Does anyone else get the same results?  I have tested in 32 adn 64 bit versions with no differences.




Darin Pendergraft [Quest]


Posts: 663
Registered: 6/30/06
Re: PowerGUI input prompt - TEASER
Posted: Dec 17, 2009 9:42 AM   in response to: Acanthus
 
  Click to reply to this thread Reply

OK - dev is aware that it is still not fully working.  We have a bug reported: CR61515


Legend
MVP: 2501 + pts
Guru: 2001 - 2500 pts
Expert: 751 - 2000 pts
Enthusiast: 31 - 750 pts
Novice: 0 - 30 pts
Moderators
Helpful answer (5 pts)
Answered (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums