View previous topic :: View next topic |
Author |
Message |
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Sat Feb 02, 2019 9:36 pm Post subject: Visual DialogShell |
|
|
Update:
https://github.com/brandoncomputer/vds
Anyone interested in helping me develop VDS style syntax in Powershell?
I'm doing it either way, but I think I could do it better with help.
It's already moving right along. Let me know if there's any interest.
Oddly, Powershell and VDS are very similar in many ways - after you get past some sticking points.
Reply back if you're interested.
(I often drop these things pretty quick, but be sure to look back here for the "end product" later if this doesn't become an actual project - with like more people than just me)
-cnodnarb
Description: |
|
Filesize: |
43.78 KB |
Viewed: |
1026 Time(s) |
|
Last edited by cnodnarb on Tue Feb 05, 2019 5:31 am; edited 1 time in total |
|
Back to top |
|
|
marcelo Contributor
Joined: 10 May 2008 Posts: 140
|
Posted: Mon Feb 04, 2019 1:49 am Post subject: |
|
|
Wow. It sounds interesting!!
|
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
|
Back to top |
|
|
DaveR Valued Contributor
Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Sat Feb 09, 2019 11:18 pm Post subject: |
|
|
Nice work B,
I've only tried to use powershell once but ended up doing what I needed in VDS. I will have a look at the Powershell ISE and your Visual DialogShell as your excellent notes and inline comments on Github make it all seem easy.
I just realised what your username means.
_________________ cheers
Dave |
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Sun Feb 10, 2019 6:30 pm Post subject: |
|
|
Revision 28 has some big changes (bye bye bangs) but now supports Windows 7
It's a little early to show off advanced scripting, but something like this will be in the template soon.
Code: |
ForEach ($_ in 1..10)
{
$button = dialog add $form1 button $(sum $(fmul $_ 20) 10) 10 100 20 $_
dialog name $button "button$_"
if ($(greater $_ 1))
{
$button.add_Click{
info "Hello from $(dlgtext $this)"
}
}
}
$controls = $form1.controls
$controls['button1'].add_Click{
info "Hello from 1"
}
|
It's not Visual DialogScript, and it's not Powershell - it's something new and awesome.
|
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Sat Feb 16, 2019 10:12 pm Post subject: |
|
|
Code: |
import-module $PSScriptRoot\vds.psm1 -force #Load Visual DialogShell module
#Powershell
$x = "Brandon".substring(2,2)
[System.Windows.MessageBox]::Show($x+" ps","",'OK',64) | Out-Null;
#VDS Function - classic syntax equivelent.
$x = $(substr Brandon 2 4)
#VDS Assertion - A function that won't work within another call, but works to assign an object.
$x = substr Brandon 2 4
#VDS Command - classic syntax equivelent.
info $x" Command"
#VDS Directive - a command that will work within another call.
$(info $x" Directive")
info "Let's do this a bizaare way"$(info $x" Directive in a String")
#The directive was processed before the command.
$(info $x" Directive in a sequence")+$(info "Let's do this a very bizzare way")
#The directives executed in order.
#Let's skip the assignment.
info "$(substr Brandon 2 4) assignment skipped"
|
Last edited by cnodnarb on Sun Feb 17, 2019 5:01 pm; edited 1 time in total |
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Sun Feb 17, 2019 10:46 pm Post subject: |
|
|
DialogShell Designer ~ coming along nicely
Description: |
|
Filesize: |
100.76 KB |
Viewed: |
983 Time(s) |
|
|
|
Back to top |
|
|
PGWARE Web Host
Joined: 29 Dec 2001 Posts: 1562
|
Posted: Sat Feb 23, 2019 1:59 am Post subject: |
|
|
Really nice work. I like how quickly you developed the application!
|
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Sat Feb 23, 2019 7:22 pm Post subject: |
|
|
Currently DialogShell is fit for beta consumption.
https://github.com/brandoncomputer/vds
The state of powershell is sorta weird right now.
Windows Powershell 5.1 is part of the Operating System currently. Powershell Core has moved on to be cross platform, and currently does not support Windows Forms, however, I feel this is primarily because .NET Core did not support Windows Forms. .Net Core 3.0 beta started supporting Windows Forms about a week ago, and I believe Powershell will follow suit sooner or later.
By the time Windows Powershell is out of support, I believe Powershell Core will support windows forms, probably requiring some code adaptations. At that point, I will make those adaptations unless someone else beats me to it.
DialogShell was built on Windows Powershell, and other than windows forms, also works in Powershell Core.
|
|
Back to top |
|
|
PGWARE Web Host
Joined: 29 Dec 2001 Posts: 1562
|
Posted: Sun Feb 24, 2019 3:45 pm Post subject: |
|
|
I was unaware powershell supported GUI applications. My understanding was it was mostly scripting without a user interface. It's interesting that you can build windows forms applications with it.
I wonder if they will ever support WPF/UWP within powershell. I suppose to be cross platform they would need to port direct-x to other platforms too if you wanted to support WPF/UWP.
Nice project!! Its a huge undertaking and is amazing how quick you have come along with the project.
|
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Mon Feb 25, 2019 2:17 am Post subject: |
|
|
Yeah, I first became aware of the possibility a couple of years ago to create forms applications in powershell, but most of the examples I came across were super convoluted.
Boiling things down to a simple structure that is easy to remember in Powershell is a chore, even one level up from the DialogShell module.
Verb-Noun is a principal of Powershell, which is pretty cool, except that every command seems structured around the material component level ~ meaning the commands of powershell are made functional by combining them into functions. Now this is all relative of course, virtuoso's of Powershell would state that the level of abstraction proivided by a language like DialogScript is undesirable.
But following the Law of Demeter ~ which is what made Visual DialogScript so powerful, is also the primary principal of DialogShell (yet also when it comes down to it, we can edit the module). When we work with only with what we need to know to be creative, it allows for more possibilities and eliminates tons of code debugging.
In all honesty, I hit this project too hard. I think I might take a break, even though there's a lot more to be done. Powershell can access Active Directory, Azure, Sharepoint ~ can create and connect ODBC connections and use web API's ~
There's an absolute mountain of work to be done. I've conquered a molehill.
I'm going to have to go from rabbit to turtle
|
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
|
Back to top |
|
|
|