Do you mean like two columns in the list of choices?
aka, a table.
I have a similar need, and asked Dan about it, and he said he didn't have any handy solutions.
So, my workaround is to display them in "text columns", using a separator like the vertical bar (|).
Here's a screenshot from my script handler macro:
I use a script to build the input stream, and RegEx to parse the selected results.
I'd share the script with you but it is highly specific to, and embedded in, the acquisition of the source data from my script library. When I get a chance tomorrow, I'll take a look, if you are interested, in extracting the part of the script that builds the text table.
Here's my script segment, which won't run as is, but should be a good guide to developing your own script:
use AppleScript version "2.5" -- El Capitan (10.11) or later
use framework "Foundation" -- this may not be required
use scripting additions
set divStr to " ∣ " -- this is NOT the std vertical bar (which won't work with SSP)
--- Get List of Handlers with Items for Name, Params, Tags --- #Satimage.osax
set handList to JMLib's satFind(reFindHandParts, handlerListStr, true)
(*
RESULT in this format: List of Lists, one main item per handler
{{Handler1 full match, name, params, tags}, {Handler2 full match, name, params, tags}, ...}
*)
set AppleScript's text item delimiters to ""
set handTextTable to ""
--- Now Actually Build the Table ---
repeat with oHand in handList
set hName to item 2 in oHand
set hParams to item 3 in oHand
set hTags to item 4 in oHand
set handTextTable to handTextTable & padR(hName, namePad, " ") & ¬
divStr & padR(hParams, paramsPad, " ") & ¬
divStr & hTags & LF
end repeat
(*
RESULT in this format:
handlerName ∣ optionalParam1, optionalParam2, ... ∣ @OptionalTextTag1 @OptionalTextTag2 ...
*)
--- Header for Table ---
set tableHeaderStr to padR(handlerColTitle, namePad, " ") & ¬
divStr & padR("PARAMETERS", paramsPad, " ") & ¬
divStr & "TAGS" & LF & ¬
padR("—", 115, "—")
--- Final Table ---
set handTextTable to tableHeaderStr & LF & handTextTable
--- OUTPUT Text Table to File ---
-- (overwrites existing file)
my writeStrToFile(handTextTable, handTextTablePath)
--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
on padR(pSource, pTotalLen, pPadChars) -- @Strings @Pad
-----------------------------------------------------------
(*
Ver: 1.2 2018-04-04
PURPOSE: Return String Padded RIGHT
PARAMETERS:
• pSource : [text, number, or list item] Source data to be padded
• pTotalLen : [number] Total length after padding
• pPadChars : [text] One or more character to be used as pad
METHOD: ASObjC
-----------------------------------------------------------
*)
set paddedStr to pSource as text
set sourceLen to length of paddedStr
if (sourceLen ≤ pTotalLen) then
--- ADD PADDING ---
set paddedStr to current application's NSString's stringWithString:(pSource as text)
set paddedStr to paddedStr's stringByPaddingToLength:(pTotalLen) withString:pPadChars startingAtIndex:0
else --- SOURCE IS GREATER THAN PAD LENGTH ---
### set paddedStr to (text items 1 thru (pTotalLen - 1) of paddedStr) & "…"
end if
return paddedStr as text
end padR
--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
on writeStrToFile(pString, pPosixPath) -- @File @Write @ASObjC
(* VER: 1.1 2017-03-14
---------------------------------------------------------------------------------
PURPOSE: Output String to File
PARAMETERS:
• pString | text | String to be output to file
• pPosixPath | text | POSIX path of file
RETURNS: true if successfull
AUTHOR: JMichaelTX based on script by Chris Stone (@ccstone)
REQUIRES:
1. macOS 10.10.5+
2. use framework "Foundation"
—————————————————————————————————————————————————————————————————————————————————
*)
set nsSourceString to current application's NSString's stringWithString:pString
set nsPosixPath to (current application's NSString's stringWithString:pPosixPath)'s stringByExpandingTildeInPath
nsSourceString's writeToFile:nsPosixPath atomically:true encoding:(current application's NSUTF8StringEncoding) |error|:(missing value)
# Other encodings: NSMacOSRomanStringEncoding
return true
end writeStrToFile
--~~~~~~~~~~~~~~~ END OF handler writeStrToFile ~~~~~~~~~~~~~~~~~~~~~~~~~
In my case, I just used the simple SSP, like in Example 1.
So, I just load the KM sspData variable from file:
Nope, sorry. You can, of course, write your own macro that prompts for a value and adds it to your list. I know it's not the same, but that's all I got. (Although it sounds like a good option, but I don't have the time to add it as a feature.)
@Jamag Well, one possible way of doing it would be to use a "custom button", which is explained when you launch the "Spotlight Search Prompt Documentation" macro. You could have a button that says "Add". Unfortunately, it won't return the value entered in the search field, but you could at least use it to run another macro that prompts you for the value, and adds it to your list.
Thanks! I feel that way in general about Keyboard Maestro, but then, I suppose most of us feel that way. It's such an integral part of my everyday workflow that I can't even imagine life without it!
Thanks, Chris. Honestly, I use it so often that I sometimes forget that I wrote it! You know you created something good when you even impress yourself!
I assume you mean you got the error when running the Spotlight Search Prompt Documentation macro (You don't run the Spotlight Search Prompt macro by itself).
Try running this macro first: Spotlight KM Variables. It'll finish in an instant and won't display anything. Then run the Spotlight Search Prompt Documentation macro, and it should work OK. I hope.