Functions for FormConfig

# Func_FormConfig.ps1 . .\Func_Form.ps1 . .\Func_FormParts.ps1 . .\Func_FormDialog.ps1 . .\Func_Files.ps1 $kugiriCo = "`t" function GetConfigContent{ param( $NmFileConfig, [int]$NumPath =-1, [int]$NumWord =-1, [switch]$AryPaths, [switch]$A…

Functions of FormParts

Add-Type -AssemblyName System.Windows.Forms Add-Type -AssemblyName System.Drawing $pathTop = [Environment]::GetFolderPath('Desktop') . .\Func_Form.ps1 function GetFormChar{ param( $AryChar, $FormOwner ) $nRow =((shou ($AryChar.count-1) 3)+…

Exection for FilesSerch

$pathTop = [Environment]::GetFolderPath('Desktop') $pathPs = Split-Path -Parent $MyInvocation.MyCommand.Path cd $pathPs . .\Func_NamesAndPaths.ps1 . .\Func_Form.ps1 . .\Func_FormParts.ps1 . .\Func_FormDialog.ps1 . .\Func_Files.ps1 . .\Func…

Functions of Form

Add-Type -AssemblyName System.Drawing Add-Type -AssemblyName System.Windows.Forms # Constant $resOK = [Windows.Forms.DialogResult]::OK $resCancel = [Windows.Forms.DialogResult]::Cancel $resYes = [Windows.Forms.DialogResult]::Yes $resNo = […

Functions of MyExplorer

#Func_MyExplorer.ps1 . .\Func_Form.ps1 . .\Func_FormParts.ps1 . .\Func_FormDialog.ps1 . .\Func_Files.ps1 . .\Func_Kaitei.ps1 . .\Func_FormConfig.ps1 $NmFileConfig = "Config_MyExplorer.txt" function GetFormMyFolder{ param( $FormOwner ) # Ta…

Functions Sendkeys

#Functions_SendKeys Add-Type -AssemblyName Microsoft.VisualBasic Add-Type -AssemblyName System.Windows.Forms function CntPs($PsIn){ if($PsIn -eq $null){ return 0 } try{ $huga = $PsIn[0] } catch{ return 1 } return @($PsIn).Length } function…

Functions of Files

#pathMe $pathMe = $pwd #Constant $pathTop = [Environment]::GetFolderPath('Desktop') #Functions #strings function MySubstring{ param( [string]$strIn, [int]$nSta=0,$nCnt=$null) if($nSta -gt $strIn.length){ $strOut = '' }else{ if($nCnt -eq $n…

VBA for Word operation

Option Explicit '[ツール] → [参照設定] → [Microsoft Word XX.X Object Library]をチェック → [OK] Sub OpenDoc() Dim app As New Word.Application app.Visible = True 'Documentを開く Dim doc As Word.Document Set doc = app.Documents.Open("C:\Users…

Functions of BKedit

Add-Type -AssemblyName Microsoft.VisualBasic $pathTop = [Environment]::GetFolderPath('Desktop') . .\Func_Files.ps1 . .\Func_Word.ps1 function RenameBK($pathBK){ WriteLog "Start Rename." $CI = Get-ChildItem $pathBK -File -Name | sort { [str…

Functions of Word

#Functions_Word $pathTop = [Environment]::GetFolderPath('Desktop') . .\Func_Files.ps1 function sampleWord{ $wordApp = New-Object -ComObject Word.Application $wordApp.Visible = $true $doc = $wordApp.Documents.Add() $doc.Content.Text = "foo,…

VBA for OpenSelectionFile

Option Explicit Sub 行非表示() 'Rows.RowHeight = 18.75 Dim va As Variant, ro As Range Dim words As Variant words = Array("aa", "ab") For Each va In words Set ro = Cells.Find(va, , , xlWhole, xlByColumns).EntireRow ro.Hidden = True Next End…

Exection for DocToPdf

$pathTop = [Environment]::GetFolderPath('Desktop') cd "$pathTop\ps" . .\Func_FormDialog.ps1 . .\Func_Word.ps1 $pathsInOut = GetFolderPathsByFormInOut -InitPathInput "" -InitPathOutput "" while($true){ if($pathsInOut -eq $null){ exit } $pat…

Functions of FormDialog

Add-Type -AssemblyName System.Windows.Forms $pathTop = [Environment]::GetFolderPath('Desktop') cd "$pathTop\ps" . .\Func_Files.ps1 . .\Func_Form.ps1 # memo <# WindowHandle ウィンドウごとに附番される番号。 画面上にあるウィンドウやオブジェク…

Functions of NamesAndPaths

$pathTop = [Environment]::GetFolderPath('Desktop') cd "$pathTop\ps" . .\Func_Files.ps1 $kugiri = "`t" # ps\Data に出力 function OutTxtNamesAndPaths{ param( [string]$pathRoot, [string]$keyWild ) # ファイル名作成 $nmRoot = Split-Path $pathRo…

Functions of Kaitei

$pathTop = [Environment]::GetFolderPath('Desktop') cd "$pathTop\ps" . .\Func_Files.ps1 function KaiteiName($nm){ $Idx=$nm.IndexOf(".") if($Idx -gt 1){ $nmEdit = MySubstring -strIn $nm -nCnt $Idx $Extent = MySubstring -strIn $nm -nSta $Idx …