Search found 13684 matches

by jvierra
Sat Aug 17, 2019 11:10 am
Forum: PowerShell GUIs
Topic: Using filesystemwatcher
Replies: 2
Views: 152

Re: Using filesystemwatcher

To access two folders you will need to watchers.

To obtain the file created add the event. Here is an example:

Code: Select all

$filesystemwatcher1_Created=[System.IO.FileSystemEventHandler]{
#Event Argument: $_ = [System.IO.FileSystemEventArgs]
    [System.Windows.Forms.Messagebox]::Show($_.FullPath)
}
by jvierra
Thu Aug 15, 2019 1:24 pm
Forum: Windows PowerShell
Topic: Dialog Form not displaying IP Address information in Label
Replies: 12
Views: 349

Re: Dialog Form not displaying IP Address information in Label

dca2rr wrote:
Thu Aug 15, 2019 12:10 pm
You are awesome! That did it. Now, how can I display the IP’s in a column instead of a row? I really appreciate your expertise.
That is what my example does.
by jvierra
Thu Aug 15, 2019 11:58 am
Forum: Windows PowerShell
Topic: Dialog Form not displaying IP Address information in Label
Replies: 12
Views: 349

Re: Dialog Form not displaying IP Address information in Label

You can also do it like this:

Code: Select all

$label3.Text = Get-NetAdapter Wi-Fi |Get-NetIPAddress | select -Expand IpAddress | Out-String
by jvierra
Thu Aug 15, 2019 11:55 am
Forum: Windows PowerShell
Topic: Dialog Form not displaying IP Address information in Label
Replies: 12
Views: 349

Re: Dialog Form not displaying IP Address information in Label

A much simpler way to the following: $label3.Text = (Get-NetIPAddress -InterfaceAlias Wi-Fi).IpAddress |Out-String This will return multiple addresses if that is what you want. Adapaters will nearly always have from 2 to 6 or more IP addresses. The name is called "InterfaceAlias" and is not the defa...
by jvierra
Thu Aug 15, 2019 7:04 am
Forum: PowerShell GUIs
Topic: Automatically Populating Label/text boxs
Replies: 6
Views: 186

Re: Automatically Populating Label/text boxs

Sometimes I guess well. Good luck.
by jvierra
Wed Aug 14, 2019 2:43 pm
Forum: PowerShell GUIs
Topic: Automatically Populating Label/text boxs
Replies: 6
Views: 186

Re: Automatically Populating Label/text boxs

I think this is what you are trying to ask.
by jvierra
Wed Aug 14, 2019 2:32 pm
Forum: PowerShell GUIs
Topic: Automatically Populating Label/text boxs
Replies: 6
Views: 186

Re: Automatically Populating Label/text boxs

A couple of suggestions.

Use the "Validating" event to check the length and display an error.

You can also use the "TextChanged" event to assign the full name as the name is typed.
by jvierra
Wed Aug 14, 2019 2:29 pm
Forum: PowerShell GUIs
Topic: Automatically Populating Label/text boxs
Replies: 6
Views: 186

Re: Automatically Populating Label/text boxs

The best I can guess here is that you want to know how to count the characters in a string.


# get the number of characters in a string
$mystring ='some set of characters'
$mystring.Length
by jvierra
Wed Aug 14, 2019 2:27 pm
Forum: PowerShell GUIs
Topic: Automatically Populating Label/text boxs
Replies: 6
Views: 186

Re: Automatically Populating Label/text boxs

I am sorry but it is almost impossible to under4stand your question. Can you just ask a single question. Also posting a snippet of code and an image really doesn't help much in this case. It is better to create a simple PSF file that illustrates your question and post the PSF file as an attachment. ...
by jvierra
Wed Aug 14, 2019 1:12 pm
Forum: Installation Issues
Topic: PrimalScript upgrade causes unexpected restart.
Replies: 4
Views: 109

Re: PrimalScript upgrade causes unexpected restart.

We have not really anything in our files which would trigger a restart. However, the new builds all include the updated Visual Studio 2019 runtime. If that gets updated and triggers a restart, which I think could be your case, it is beyond our control and we would not get a chance to issue a warnin...