[OMC] A little help with execution speed...

OnMyCommand discussion omc at abracode.com
Fri Aug 8 10:30:15 PDT 2008


Sending task to background app is the problem. It launches a separate
application to process your command. Is there a specific reason for
SEND_TASK_TO_BACKGROUND_APP here? This execution option is intended for
longer tasks or for AppleScript talking back to host.
Also, using back quotes for executing subtask is less than optimal because
it launches a separate shell and the tool within that shell. The syntax like
$(subtask) is more modern and recommended:
echo -n $(date "+(%b|%e|%g)")

For more info and examples, see:
http://www.tldp.org/LDP/abs/html/commandsub.html

Tom
Abracode



On 8/8/08 7:19 AM, "OnMyCommand discussion" <omc at abracode.com> wrote:

> Hi,
> 
> I have this simple command that inserts a formatted date for me. I've
> assigned this to a shortcuts hot key, but the execution is extremely
> slow. Is the fault in the command or in shortcuts?
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://
> www.apple.com/DTDs/PropertyList-1.0.dtd">
> <plist version="1.0">
> <dict>
> <key>COMMAND_LIST</key>
> <array>
> <dict>
> <key>ACTIVATION_MODE</key>
> <string>act_always</string>
> <key>COMMAND</key>
> <array>
> <string>echo -n `date "+(%b|%e|%g)"` | tr -d "[:space:]" |
> pbcopy</string>
> </array>
> <key>ESCAPE_SPECIAL_CHARS</key>
> <string>esc_with_backslash</string>
> <key>EXECUTION_MODE</key>
> <string>exe_silent_popen</string>
> <key>NAME</key>
> <array>
> <string>Insert Date</string>
> </array>
> <key>PASTE_AFTER_EXECUTION</key>
> <true/>
> <key>REQUIRED_MAC_OS_MIN_VERSION</key>
> <string>10.1</string>
> <key>REQUIRED_OMC_VERSION</key>
> <string>1.3.1</string>
> <key>SEND_TASK_TO_BACKGROUND_APP</key>
> <true/>
> <key>SUBMENU_NAME</key>
> <string>System/Labels</string>
> <key>VERSION</key>
> <integer>1</integer>
> </dict>
> </array>
> <key>VERSION</key>
> <integer>2</integer>
> </dict>
> </plist>
> 
> 
> 
> Thanks!
> 
> _______________________________________________
> OMC mailing list
> OMC at abracode.com
> http://abracode.com/mailman/listinfo/omc_abracode.com





More information about the OMC mailing list