Clarion и PowerShell?
Добавлено: 17 Июль 2017, 17:52
А можно ли как-нибудь подружить Clarion и PowerShell?
Место общения программистов, форум разработчиков БД на Clarion
https://forum.clarionlife.net/
А можно ли как-нибудь подружить Clarion и PowerShell?
Не вот это случайно - viewtopic.php?f=8&t=3695?
например, ShellExecute.
Код: Выделить всё
$notificationTitle = [DateTime]::Now.ToShortTimeString() + " : время пить чай"
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] > $null
$template = [Windows.UI.Notifications.ToastNotificationManager]::GetTemplateContent([Windows.UI.Notifications.ToastTemplateType]::ToastImageAndText01)
$toastXml = [xml] $template.GetXml()
$toastXml.GetElementsByTagName("text").AppendChild($toastXml.CreateTextNode($notificationTitle)) > $null
$imElem = $toastXml.getElementsByTagName("image")
$imElem[0].src = "c:\test\clarion.gif"
$xml = New-Object Windows.Data.Xml.Dom.XmlDocument
$xml.LoadXml($toastXml.OuterXml)
$toast = [Windows.UI.Notifications.ToastNotification]::new($xml)
$notifier = [Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier("Clarion Notify")
$toast.ExpirationTime = [DateTime]::Now.AddMinutes(5)
$notifier.Show($toast);
$spNote=new-object -com 'SAPI.spvoice' ; $spNote.Speak('Новое сообщение!')
Код: Выделить всё
hret=CreateObject(PS_Object)
PS_Object.Run( "new-object -com 'SAPI.spvoice' ; $spNote.Speak('Новое сообщение!')" )
sfile="c:test.txt"
scont=PS_Object.Run("$string = get-content -Path " & sfile)
...