Copy to "Fingerprint1" Subroutine Macro (v9.0)

Macro not returning only file name after converting to (v9.0)

This macro worked in v8.0 but now it is returning more than just the file name when run from within KM 9. I guess I could change the RegEx to still capture the file name prefix, but I wonder what the additional text is and how to prevent if from being captured.

The script is being run on a PDF, opened in Adobe Illustrator, that was downloaded from our website. If I create a file locally the script works as expected. Also, if I run the Javascript found in "Get DND_FP_PIN variable" KM Action from my script editor it works as expecting (without capturing the extra text).

After parsing the file name the result should be "6ED00CDD".

Copy to "Fingerprint1" Subroutine.kmmacros (5.0 KB)

This is the full text being captured by KM 9. The file name is the last line of the text.

2019-08-22 10:39:31.646 osascript[9270:500892] GetInputSourceEnabledPrefs user file path = /Users/rcraighead/Library/Preferences/com.apple.HIToolbox.plist
2019-08-22 10:39:31.646 osascript[9270:500892] GetInputSourceEnabledPrefs effective user id path = 503
2019-08-22 10:39:31.647 osascript[9270:500892] GetInputSourceEnabledPrefs user pref content = <CFBasicHash 0x7fb12558aba0 [0x7fffa67b78e0]>{type = immutable dict, count = 3,
entries =>
0 : <CFString 0x7fb12558a840 [0x7fffa67b78e0]>{contents = "AppleInputSourceHistory"} = <CFArray 0x7fb12558ab60 [0x7fffa67b78e0]>{type = immutable, count = 1, values = (
0 : <CFBasicHash 0x7fb12558ab20 [0x7fffa67b78e0]>{type = immutable dict, count = 3,
entries =>
0 : <CFString 0x7fffa6825f68 [0x7fffa67b78e0]>{contents = "InputSourceKind"} = <CFString 0x7fffa686b4a8 [0x7fffa67b78e0]>{contents = "Keyboard Layout"}
1 : <CFString 0x7fffa6820c68 [0x7fffa67b78e0]>{contents = "KeyboardLayout Name"} = U.S.
2 : <CFString 0x7fffa68575e8 [0x7fffa67b78e0]>{contents = "KeyboardLayout ID"} = <CFNumber 0x41af7c314946f641 [0x7fffa67b78e0]>{value = +0, type = kCFNumberSInt64Type}
}

)}
1 : <CFString 0x7fffa68476a8 [0x7fffa67b78e0]>{contents = "AppleSelectedInputSources"} = <CFArray 0x7fb12558aae0 [0x7fffa67b78e0]>{type = immutable, count = 1, values = (
0 : <CFBasicHash 0x7fb12558aaa0 [0x7fffa67b78e0]>{type = immutable dict, count = 3,
entries =>
0 : <CFString 0x7fffa6825f68 [0x7fffa67b78e0]>{contents = "InputSourceKind"} = <CFString 0x7fffa686b4a8 [0x7fffa67b78e0]>{contents = "Keyboard Layout"}
1 : <CFString 0x7fffa6820c68 [0x7fffa67b78e0]>{contents = "KeyboardLayout Name"} = U.S.
2 : <CFString 0x7fffa68575e8 [0x7fffa67b78e0]>{contents = "KeyboardLayout ID"} = <CFNumber 0x41af7c314946f641 [0x7fffa67b78e0]>{value = +0, type = kCFNumberSInt64Type}
}

)}
2 : <CFString 0x7fffa6899da8 [0x7fffa67b78e0]>{contents = "AppleCurrentKeyboardLayoutInputSourceID"} = <CFString 0x7fffa68b7808 [0x7fffa67b78e0]>{contents = "com.apple.keylayout.US"}
}
6ED00CDD_LOGAN_Vector.pdf

Edit:
this RegEx seems to work:
(.)_._.*.pdf$

if there's a better solution I'd appreciate any suggestions.

You did not make it clear which Action or Script is producing the incorrect results.
But, just taking a guess, this is most likely due to the "Include Errors" option being checked in the Action Gear menu:

image

You're right, JMichaelTX. This was on the "Execute AppleScript". I had not made changes since importing from KM 8 so I was not sure where to start looking. Thanks so much for your help.

1 Like