Search found 90 matches

by Domtar
Tue Jun 16, 2020 5:52 pm
Forum: PowerShell
Topic: replace part of string with regular expression
Replies: 6
Views: 1021

Re: replace part of string with regular expression

yes you're right. sorry, I guess I'm tired and should stop for the day.

thanks, man!
by Domtar
Tue Jun 16, 2020 4:44 pm
Forum: PowerShell
Topic: replace part of string with regular expression
Replies: 6
Views: 1021

Re: replace part of string with regular expression

i don't understand your replied code. i said i wish to replace what is between start and end, why don't you look for that string instead of line 2? line 2 is only there to show an example, it has nothing to do with the file's content. my file contains all the required functions to do stuff i want, m...
by Domtar
Tue Jun 16, 2020 6:28 am
Forum: PowerShell
Topic: replace part of string with regular expression
Replies: 6
Views: 1021

replace part of string with regular expression

hi all,

I have a string like this;

"line 1
line 2
# replace starts here

# replace ends here
line 6
line 7
"

how can i use a regular expression to replace all that is between start and end in this string?

thank you!
by Domtar
Fri Jun 12, 2020 11:29 am
Forum: PowerShell GUIs
Topic: Understanding CheckedListBox controls
Replies: 13
Views: 1606

Re: Understanding CheckedListBox controls

how can we skip the need to click an item twice to check it?

thank!
by Domtar
Thu Jun 11, 2020 5:09 am
Forum: PowerShell GUIs
Topic: is dynamic dialogs possible?
Replies: 4
Views: 697

Re: is dynamic dialogs possible?

i will study your piece of code.

thanks for the help!
by Domtar
Wed Jun 10, 2020 6:58 am
Forum: PowerShell GUIs
Topic: is dynamic dialogs possible?
Replies: 4
Views: 697

is dynamic dialogs possible?

Hi all, Since I have no wish to lose my time, before I put too much effort into this, I thought about asking this question. I'm building a GUI where one of the options is to select the SCCM Distribution Points where to replicate the packages we create. That DPs list changes from time to time wheneve...
by Domtar
Tue Jun 09, 2020 7:30 am
Forum: PowerShell GUIs
Topic: display only specific rows in datagridview
Replies: 8
Views: 672

Re: display only specific rows in datagridview

got it!

this does what i need :-)

for ($i = 0; $i -lt $dataInstUpdates.RowCount; $i++)
{
if ($dataInstUpdates.Rows[$i].Cells[0].value -notlike "KB$($textboxFilterUpdate.text)*")
{ $dataInstUpdates.Rows[$i].Visible = $false }
else
{ $dataInstUpdates.Rows[$i].Visible = $true }
}

thanks!
by Domtar
Tue Jun 09, 2020 6:54 am
Forum: PowerShell GUIs
Topic: display only specific rows in datagridview
Replies: 8
Views: 672

display only specific rows in datagridview

hi all, I have a GUI where a datagridview shows all installed updates on a computer. I'm trying to add a filter textbox that will hide all rows where the filter's content will not appear. so if someone put KB366 in that filter textbox, i wish to display only the KB that start with 366. how can I acc...
by Domtar
Thu May 21, 2020 8:22 am
Forum: PowerShell Studio
Topic: intellisense issue
Replies: 4
Views: 555

Re: intellisense issue

i did post in the correct forum. in the console window, i run this and it takes 2.6 sec. this was a lot faster before that last update to 5.7.177; PS C:\Scripts\tests> Measure-Command { >> if (-not [system.IO.Directory]::Exists('c:\Temp\test')) >> { New-Item -Path c:\Temp -Name crap -ItemType direct...
by Domtar
Thu May 21, 2020 5:35 am
Forum: PowerShell Studio
Topic: intellisense issue
Replies: 4
Views: 555

intellisense issue

Product: PowerShell Studio 2020 (64 Bit) Build: v5.7.177 OS: Windows 10 Enterprise (64 Bit) Build: v10.0.18363.0 since the last update, every day when i use PS Studio the first time, IntelliSense takes forever to load. Like 5-7 seconds each time, which is forever compared to before where that behavi...