2019年9月12日木曜日

FileMaker Server パスワード無しのファイルを共有|FileMaker Server コマンドライン


FileMaker Server コマンドライン

fmsadmin set serverconfig securefilesonly=false

2019年8月27日火曜日

FileMaker WEBビューアに表示されたページを画像として保存 Web Viewer Capture

FileMaker WEBビューアに表示されたページを画像として保存。
 動作検証
Windows 10
FileMaker 16, 17, 18
プラグイン:ScriptMakerPSが必要
サンプルファイル
https://sites.google.com/site/scriptmakerps/example/web-viewer-capture




$top=GetLayoutObjectAttribute ("WEB01" ; "top")
;$left=GetLayoutObjectAttribute ("WEB01" ; "left")
;$height=GetLayoutObjectAttribute ("WEB01" ; "height")
;$width=GetLayoutObjectAttribute ("WEB01" ; "width")

FileMaker 16 から、上記の様な感じでWEBビューアの位置情報を取得すると、"top"、"left"は、PC画面全体を基準とした位置を返します。コレを利用しPowerShellでWEBビューアに表示された部分を画像として保存することが出来ます。

PowerShell例:

$W={width};
$H={height};
$T={top};
$L={left};
Add-Type -AssemblyName System.Windows.Forms ;
Add-Type -AssemblyName  System.Drawing  ;
$rect = [System.windows.forms.Screen]::PrimaryScreen.Bounds;
$bitmap = new-object System.Drawing.Bitmap( $W, $H, [System.Drawing.Imaging.PixelFormat]::Format32bppArgb);
$graphics = [System.Drawing.Graphics]::FromImage($bitmap);
$graphics.CopyFromScreen( $L, $T,   0, 0,   $bitmap.Size , [System.Drawing.CopyPixelOperation]::SourceCopy);
$memStream = New-Object System.IO.MemoryStream;
$bitmap.Save($memStream,[System.Drawing.Imaging.ImageFormat]::Png );
[byte[]]$bytes = $memStream.ToArray();
$result=([convert]::ToBase64String($bytes)).ToString();
Write-Output  $result;

上記を実行してキャプチャ画像をpngにして、Base64で取得し、FileMakerで画像へ変換。頑張ればプラグイン無しでも実行可能。

サンプルは、プラグイン:ScriptMakerPSを使用。
サンプルファイル
https://sites.google.com/site/scriptmakerps/example/web-viewer-capture

2019年8月25日日曜日

FileMaker 通知、ボタン付き通知、プログレスバー ToastNotification

FileMaker 通知、ボタン付き通知、プログレスバー ToastNotification


サンプルファイル
https://sites.google.com/site/scriptmakerps/example/toastnotification
動作検証
Windows 10
FileMaker 14,15,16,17,18

プラグイン:ScriptMakerPS が必要です。
https://sites.google.com/site/scriptmakerps/home

ToastNotification.fmp12 のスクリプト:ToastNotificationShow(aug)を以下の引数を付けて実行すれば、トースト通知を表示できます。

スクリプト:ToastNotificationShow(aug)
引数例:
"$Subject=" & Quote ( "Subject" )
 & ";$Contente=" & Quote ( "Content" )
 & ";$FileName=" & Quote ( Get (ファイル名) )

※$FileNameにファイル名を設定しておくと「通知」をクリックした時にそのファイルが開きます。

他のファイルからToastNotification.fmp12 のスクリプトを実行するには、ToastNotification.fmp12を外部ファイルに登録する必要があります。


通知にボタンを加え、ボタンをクリックするとFileMakerのスクリプトを実行。


プログレスバーを表示。



詳しくは、サンプルファイル:ToastNotification.fmp12
https://sites.google.com/site/scriptmakerps/example/toastnotification