fresh2dev / AnyBox

The easiest way to develop apps for Windows.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Include 'please wait' window processing and ability to highlight one part of -Message

IanBAdams opened this issue · comments

I have a couple of graphical user interface scripts which I wrote before I came across AnyBox. Since you've published version 0.5.0 it reminded me that I had planned to rewrite these using AnyBox. I suspect my script of 200+ lines of code will reduce considerably. While I've not looked at this in too much detail, as yet, there is one aspect of my script which I suspect AnyBox doesn't support.

When I run my script a 'please wait' window is displayed while the script does some processing. This processing can take 20 or 30 seconds. Once the processing is complete the 'please wait' window is closed and a new window is displayed with the result of the processing. The user then makes their selection of what they want to do next and processing continues once the window is dismissed.

I don't think there will be too much of a problem using AnyBox to produce the 2nd window. However, I can't see anything within AnyBox which will create and display the 'please wait' window.

  • Have I missed something?
  • If not, would it be possible to enhance AnyBox to incorporate this functionality?

One final thing. The 'please wait' window is just a few lines of text. However, one of the lines of text is highlighted in red to make it stand out. I suspect I would be using the -Messages parameter of AnyBox to create the text but I can't see any way to highlight one line of the -Message.

  • Have I missed something?
  • If not, would it be possible to enhance AnyBox to incorporate this functionality?

Once again, many thanks.
Ian

commented

Styling the entire message is possible, but not specific text within the message. You could use a -Message "doing work" and a -Comment "please wait". Note that comments cannot have independent styling either; only prompts can.

Regarding the progress bar... The docs are on the fritz right now while I work on some enhancements in prep for AnyBox v1. But here's a past version of the README that includes an example of using an indeterminate progress bar with the -While parameter.

https://github.com/fresh2dev/AnyBox/tree/8d6dc15f0ebda563e9168563143eee0df6d696af#new-in-v040

Thanks for getting back to me so quickly, especially as I suspect you are busy with v1.

I suspected as much about the styling of part of a message. I'll give your idea of using a -Message "doing work" and a -Comment "please wait" a try and see how it looks. Actually, using a progress bar with a suitable message is probably even better than a static 'please wait' window so I'll give that a try too.

I hadn't thought about firing off a powershell job to do the background processing. Looks like you can receive output from the job by the powershell / AnyBox script so sounds like it might work OK.

Thanks for the suggestions.
Cheers

commented

Np, thanks for the input and the bug report.