creating task above selected task

78 views
Skip to first unread message

Adrian Liem

unread,
Aug 23, 2020, 10:33:15 AM8/23/20
to MyLifeOrganized
Hi there,

is there any shortcut to create a task above the selected task?

the default behavior is creating the task below the selected task; thus to create a task above the selected task will require 2 keystrokes.

I used to use this feature on the other tree-based software, and I think it's pretty brilliant because I will only need to use 1 shortcut.

Screenshot_2.pngScreenshot_3.pngScreenshot_4.png

thanks.

Andrei Bacean

unread,
Aug 25, 2020, 1:05:48 PM8/25/20
to MyLifeOrganized
hi
you can use autohotkey for that.

Download and install autohotkey from here:
https://www.autohotkey.com/

create a blank notepad file and insert the following code to it.
save it as mloScript.ahk
run it // you can add the script to Windows StartUp Folder, thus the script will run when the user logs in.

then, open MLO, select any task and press Shift Insert to insert a task above the selected one.
Enhoy!

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#SingleInstance force
#InstallKeybdHook
#HotkeyInterval 2000 
#MaxHotkeysPerInterval 300
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

#If WinActive("ahk_class TfrmTaskListWindow") || WinActive("ahk_class TfrmMyLifeMain")
 
 +Insert::
  send, {NumpadUp}
  send, {Ins}
 return

#IfWinActive

return



воскресенье, 23 августа 2020 г. в 17:33:15 UTC+3, adrian...@gmail.com:

Adrian Liem

unread,
Aug 25, 2020, 1:42:01 PM8/25/20
to MyLifeOrganized
Hi Andrei,

thanks for the reply & detailed autohotkey script.

this should work pretty good, maybe unless when the task above the current selected task is a subtask -- then that scenario will create another subtask in the same level of the subtask above the current selected task, instead of creating a task in the same level as the current selected task.

but yeah I think the script should be able to work in most of scenarios.

thanks :-)

Andrei Bacean

unread,
Aug 26, 2020, 2:18:43 AM8/26/20
to MyLifeOrganized
Hi
Here is a better solution
Replace the following text 

 +Insert::
  send, {NumpadUp}
  send, {Ins}
 return

with this one:
 ; Press Shift+Enter key combination to save the task and move it up one line
 +enter::
  send +!{Up}
 return

The use scenario is the following:
Create a new task (press Ins key, or the Toolbar button).
And instead of pressing Enter to save it, press Shift Enter.
That will save the new task, and will move it one line up.

Best wishes
Andrew

вторник, 25 августа 2020 г. в 20:42:01 UTC+3, adrian...@gmail.com:

Adrian Liem

unread,
Aug 26, 2020, 2:45:33 AM8/26/20
to MyLifeOrganized
Hi Andrei,

thanks again for the script.

technically it's a good solution.
but I don't think it's the right behavior for the user: writing the task first then moving it up upon the save process.
I mean, it should be positioned above the current selection and *before* writing the task (not after) -- I believe this should be the right thinking/brainstorming process for the user.

but I get the idea.
I think I can write the autohotkey script for creating a dummy task, save it, move it above, then edit it again and clear the dummy content.
it can be the solution while having a little delay to execute the command.
I just feel like it would be way easier if the feature is provided natively in the MLO :-)

thanks!

Andrei Bacean

unread,
Aug 26, 2020, 11:17:36 AM8/26/20
to MyLifeOrganized
yep, something like that:

 ; Press Ctrl Insert key combination to create a new task above the selected one
 ^Insert::
  send {Insert}{.}
  send +!{Up}
  send {F2}{backspace}
 return




среда, 26 августа 2020 г. в 09:45:33 UTC+3, adrian...@gmail.com:
Reply all
Reply to author
Forward
0 new messages