This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-Type -AssemblyName 'Microsoft.VisualBasic' | |
$str = [Microsoft.VisualBasic.Strings]::StrConv('令和5年10月19日 01:23:45', [Microsoft.VisualBasic.VbStrConv]::Narrow, 1041) | |
Write-Output $str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/# ☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ | |
日付を和暦で表示するフロー | |
Power Automate for desktop バージョン 2.37.00181.23279 で動作確認 | |
☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#/ | |
DateTime.GetCurrentDateTime.Local DateTimeFormat: DateTime.DateTimeFormat.DateAndTime CurrentDateTime=> CurrentDateTime | |
Scripting.RunPowershellScript.RunPowershellScript Script: $'''$ci = New-Object System.Globalization.CultureInfo(\"ja-JP\", $true) | |
$ci.DateTimeFormat.Calendar = New-Object System.Globalization.JapaneseCalendar | |
Write-Output ([DateTime]\"%CurrentDateTime%\").ToString(\"ggy年M月d日 HH:mm:ss\", $ci)''' ScriptOutput=> PowershellOutput ScriptError=> ScriptError | |
Display.ShowMessageDialog.ShowMessage Message: PowershellOutput.Trimmed Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: True ButtonPressed=> ButtonPressed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ci = New-Object System.Globalization.CultureInfo("ja-JP", $true) | |
$ci.DateTimeFormat.Calendar = New-Object System.Globalization.JapaneseCalendar | |
Write-Output ([DateTime]"2023/01/11 1:23:45").ToString("ggy年M月d日 HH:mm:ss", $ci) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[void][Reflection.Assembly]::LoadFile("C:\System\Lib\PdfSharp.dll") | |
$doc = [PdfSharp.Pdf.IO.PdfReader]::Open("C:\Test\PDF\checkbox.pdf", [PdfSharp.Pdf.IO.PdfDocumentOpenMode]::ReadOnly) | |
$fields = $doc.AcroForm.Fields | |
$names = $fields.Names | |
for($i=0; $i -lt $names.Count; $i++){ | |
$field = $fields[$names[$i]] | |
if($field -is [PdfSharp.Pdf.AcroForms.PdfCheckBoxField]){ | |
Write-Output("Name:{0}, Checked:{1}" -f $field.Name, $field.Checked) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* ユーザー入力のサンプルスクリプトです。 | |
* @param food リストに追加する食べ物を選択します。 | |
* @param price 食べ物の価格を入力します。既定値:99円 | |
* @param memo 備考を入力します。 | |
* @author kinuasa | |
*/ | |
function main(workbook: ExcelScript.Workbook, | |
food: "Potato" | "Garlic" | "Tomato" | "Green pepper", | |
price: number = 99, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim ps | |
Set ps = GetObject("winmgmts:Win32_ProcessStartup") | |
ps.ShowWindow = 0 | |
GetObject("winmgmts:Win32_Process").Create "PowerShell -Command ""Add-Type -AssemblyName 'Microsoft.VisualBasic';[Microsoft.VisualBasic.Interaction]::MsgBox('こんにちは、世界');""", , ps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET PDFFolderPath TO $'''C:\\Test\\PDF\\請求書''' | |
/# ☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ | |
顧客名取得 | |
☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#/ | |
Excel.LaunchExcel.LaunchAndOpenUnderExistingProcess Path: $'''C:\\Test\\Excel\\顧客リスト.xlsx''' Visible: True ReadOnly: False Instance=> ExcelInstance | |
Excel.SetActiveWorksheet.ActivateWorksheetByName Instance: ExcelInstance Name: $'''顧客リスト''' | |
Excel.ReadFromExcel.ReadCell Instance: ExcelInstance StartColumn: $'''A''' StartRow: 2 ReadAsText: False CellValue=> ExcelData | |
Excel.CloseExcel.Close Instance: ExcelInstance | |
/# ☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★ | |
請求書の顧客名入力後ブックを保存して閉じる |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# QRCoder( https://github.com/codebude/QRCoder )を使ってQRコードを作成するPowerShellスクリプト | |
[void][System.Reflection.Assembly]::LoadFile("C:\System\Lib\QRCoder.dll") | |
$qrGenerator = New-Object QRCoder.QRCodeGenerator | |
$qrCodeData = $qrGenerator.CreateQrCode("https://www.google.com/search?q=こんにちは", [QRCoder.QRCodeGenerator+ECCLevel]::Q) | |
$qrCode = New-Object QRCoder.QRCode($qrCodeData) | |
$qrCodeImage = $qrCode.GetGraphic(5, "#000000", "#ffffff", $true) | |
#画像ファイルとして保存 | |
#$qrCodeImage.Save("C:\Test\PNG\QR.png") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
'Acrobatを使ってPDFのドロップダウンリストに項目を追加するVBAマクロ | |
'参考:https://www.ka-net.org/blog/?p=6637 | |
Public Sub Sample_AddDropdownItems() | |
Const PDSaveFull = &H1 | |
Dim app As Object | |
Set app = CreateObject("AcroExch.App") | |
Dim avdoc As Object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK; | |
using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes; | |
using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Types; | |
namespace Modules.DialogSample | |
{ | |
[Action(Id = "Action1", Order = 1)] | |
[Throws("ActionError")] |