Hello,
I am writing a proof of concept app for my manager to attempt to get a license.
My variables are
$Path = C:\Users\UserID\Desktop
$FolderName = $Folder
The form has 1 text input box (design name = $folder) where the user would type in a folder name. From the text inputbox (design name = $Folder) it would make a folder in C:\users\loginid\desktop\(textbox folder name).
It does not seam to be passing the $path or the $foldername when I click the button with the command
New-Item $Path $Foldername - directory.
Is there something I am missing here?
Question about Variables with Trial Version
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- millertime
- Posts: 3
- Last visit: Fri Dec 14, 2018 3:29 pm
Re: Question about Variables with Trial Version
It is not really possible to understand what you are asking. If you post an example of your script maybe it will be clearer.
You can also learn how to design forms by reading these blog articles:
https://www.sapien.com/blog/topics/user ... istrators/
You can also learn how to design forms by reading these blog articles:
https://www.sapien.com/blog/topics/user ... istrators/
Re: Question about Variables with Trial Version
Assume a textbox called $testbox1. To obtain the contents you would use $textbox1.Textmillertime wrote: It does not seam to be passing the $path or the $foldername when I click the button with the command
New-Item $Path $Foldername - directory.
- millertime
- Posts: 3
- Last visit: Fri Dec 14, 2018 3:29 pm
Re: Question about Variables with Trial Version
$form1_Load={
#TODO: Initialize Form Controls here
$folder = C:\Users\user\Desktop
$foldername = $textbox1_TextChanged
}
$button1_Click={
New-Item -ItemType directory -Path $F
}
$textbox1_TextChanged={
}
#TODO: Initialize Form Controls here
$folder = C:\Users\user\Desktop
$foldername = $textbox1_TextChanged
}
$button1_Click={
New-Item -ItemType directory -Path $F
}
$textbox1_TextChanged={
}
Re: Question about Variables with Trial Version
Start by reading the contents of the link I posted. You need to learn how a form works. There are numerous examples and a good explanation of how to use forms and controls with PowerShell. If you have no experience with PowerShell or any programming background then this will take a bit of time to learn. GO slow and learn the parts. The rest will come slowly.
Note that variables in PowerShell have "scope" sart by looking this up: https://technet.microsoft.com/en-us/lib ... 47849.aspx
PowerShell studio also has many examples and the documentation will help you to learn how to use it.
Note that variables in PowerShell have "scope" sart by looking this up: https://technet.microsoft.com/en-us/lib ... 47849.aspx
PowerShell studio also has many examples and the documentation will help you to learn how to use it.