I am trying to use a QR code to fire up the search function in my CRM.
I understand that QR scanners emulate keyboard keystrokes and I need to load the Client Name into the search function of My CRM.
I have successfully done so with a power shell command (see below to search for incoming phone numbers). However, I'm looking to avoid any code. If I need code the next question is how to fire up a .exe file from a QR code ...
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
$InString = $args[0]
$OutPattern = '## #### ### ###'
$AppPID = 1234
$AppNm = ""
$OutString = "{0:$OutPattern}" -f [int64]($InString.Trim('+'))
$AppPID = get-process "Light Blue*" | select -expand id
$AppNm = Get-Process appname | select -expand id
$wshell = New-Object -ComObject wscript.shell;
$wshell.AppActivate($AppPID)
Sleep 1
$wshell.SendKeys('+^f')
$wshell.SendKeys($OutString)
$wshell.SendKeys('~')
exit
I suspect it may be in the scanner settings in the way I need to encode for the control modifiers.
I have purchased this scanner https://www.dropbox.com/s/2m0umd48z80wwgc/TR-UM006-%28HW0002%2BHW0008%2B8100%29%20EN-2021.6.22-S01.pdf?dl=0
Connected to win10 PC via USB cable and it showed up as a keyboard USB composite device Barcode scanner.
all my QR attempts have resulted in plain text output +^fTest Data~
Please help ...