power automate desktopで作成したフローの保存先とバックアップ及びフローのファイルの共有受け渡し
保存先
power automate desktopで作成したフローの保存先はonedrive またはdatavese
OneDrive/アプリ/Power Automate Desktop
“C:\Users\User\AppData\Local\Microsoft\Power Automate Desktop\Console\Workspace\c3740d0c-d2d6-435d-9d5a-60090ea76c09\4097BA3A\script.robin"
バックアップと共有
バックアップ
Power Automate Desktopのフロー編集画面で、フローのすべてを選択します。(ctrl + A)
メニューからcopyを選ぶか。(ctrl + C)
メモ帳などのテキストエディターにpasteして保存します(ctrl + V)
リストア
メモ帳などのテキストエディターで全てを選択してcopy。(ctrl + C)
Power Automate Desktopのフロー編集画面で、pasteして保存します(ctrl + V)
DISABLE Display.ShowMessageDialog.ShowMessage Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed
WebAutomation.LaunchInternetExplorer.LaunchAutomationBrowser Url: $fx'https://www.yahoo.co.jp/' WindowState: WebAutomation.BrowserWindowState.Normal ClearCache: False ClearCookies: False WaitForPageToLoadTimeout: $fx'=60' CustomUserAgentString: $fx'' TargetDesktop: $fx'{"DisplayName":"ローカル コンピューター","Route":{"ServerType":"Local","ServerAddress":""},"DesktopType":"local"}' BrowserInstance=> Browser
WebAutomation.PopulateTextField.PopulateTextFieldUsePhysicalKeyboard BrowserInstance: $fx'=Browser' Control: appmask['Web Page \'https://www.yahoo.co.jp/\'']['Input search \'検索したいキーワードを入力してください\' 2'] Text: $fx'"https://www.yahoo.co.jp/"' Mode: WebAutomation.PopulateTextMode.Replace UnfocusAfterPopulate: True WaitForPageToLoadTimeout: $fx'=60'
WebAutomation.PressButton.PressButton BrowserInstance: $fx'=Browser' Control: appmask['Web Page \'https://www.yahoo.co.jp/\'']['Button \'検索\''] WaitForPageToLoadTimeout: $fx'=60'
SET NewVar TO 9
WAIT $fx'=NewVar'
WebAutomation.CloseWebBrowser BrowserInstance: $fx'=Browser'
画面

robinからフローを作るバッチファイル
“C:\Users\User\AppData\Local\Microsoft\Power Automate Desktop\Console\Workspace\c3740d0c-d2d6-435d-9d5a-60090ea76c09\4097BA3A\script.robin"を使ってペーストできるようにします
@echo off
copy /y "C:\Users\User\AppData\Local\Microsoft\Power Automate Desktop\Console\Workspace\c3740d0c-d2d6-435d-9d5a-60090ea76c09\4097BA3A\*.*" y:
y:
pwsh -command "(Get-Content Y:\script.robin)| Select-Object -Skip 7 | Out-Host" > output.txt
echo # [ControlRepository][PowerAutomateDesktop]>> output.txt
echo {>> output.txt
echo "ControlRepositorySymbols": [>> output.txt
echo {>> output.txt
echo "IgnoreImagesOnSerialization": false,>> output.txt
echo "Repository": ^">> output.txt
pwsh -command "(Get-Content Y:\controlRepo.appmask) | %%{ $_ -replace '\"', '\\\"' } | ForEach-Object { $_ -replace '\\\\', '\\\' }| ForEach-Object { $_ -replace 'controlRepo-screenshots', 'controlRepo-screenshots\' }|Out-Host">> output.txt
echo ^",>> output.txt
echo "ImportMetadata": {>> output.txt
echo "DisplayName": "ローカル コンピューター",>> output.txt
echo "ConnectionString": "",>> output.txt
echo "Type": "Local",>> output.txt
echo "DesktopType": "local">> output.txt
echo },>> output.txt
echo "Name": "appmask">> output.txt
echo }>> output.txt
echo ],>> output.txt
echo "ImageRepositorySymbol": {>> output.txt
echo "Repository": ^">> output.txt
pwsh -command "(Get-Content Y:\imageRepo.imgrepo) | %%{ $_ -replace '\"', '\\\"' } | Out-Host">> output.txt
echo ^",>> output.txt
echo "ImportMetadata": {},>> output.txt
echo "Name": "imgrepo">> output.txt
echo },>> output.txt
echo "ConnectionReferences": []>> output.txt
echo }>> output.txt
timeout /t 55 & goto:eof
pDataをBase64でコード
pwsh -NoProfile -Command "$encodedString = Get-Content -Path 'Y:\pData'; $decodedBytes = [System.Convert]::FromBase64String($encodedString); $decodedString = [System.Text.Encoding]::UTF8.GetString($decodedBytes); Set-Content -Path 'Y:\outputfile.txt' -Value $decodedString"
pwsh -command "(Get-Content Y:\outputfile.txt) -replace '\\r\\n', \"`r`n\" | Set-Content Y:\pData.txt"
ディスカッション
コメント一覧
まだ、コメントがありません