Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Execute the powershell code with another method
#5
Quote:Speaking of interop between QM3 and PowerShell, do you know if it is possible to go the other way, calling QM3 from PowerShell.

Yes, but not from the Windows PowerShell, because it uses .NET 4. Au.dll uses .NET 6, and they are incompatible. Install PowerShell 7. It does not have an ISE; for it can be used VSCode with PowerShell extension. Tested, works. Tested on Windows 11. Need Windows 8.1 or later.

Code:
Copy      Help
Add-Type –Path "C:\......\Au.dll"

[Au.dialog]::show('Au in PowerShell')
[Au.run]::it('notepad.exe')

Also add environment variable Au.Path = Au.dll folder path. After adding/removing/editing environment variables may need to restart apps or Windows to propagate the changes.


Messages In This Thread
RE: Execute the powershell code with another method - by Gintaras - 08-11-2022, 04:59 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)