Gondwana
Hi

I coded a little script for AutoHotkey that sets a link to a file selected in explorer in the notes of a selected thought. How to is written in the script.

You can add a link to every file on your HD to notes easily with that.

Best Regards
Olivier

Copy the follwing code in a text-file and change the extension to .ahk, then open it with autohotkey:


; *** Add link to files in Notes of TheBrain. ***
; How to: Open this file in AutoHotkey.(http://www.autohotkey.com/)
; Select a thought in your brain where you want to put the link.
; You may set the cursor to the desired position in notes.
; Select a file in explorer. Press Ctrl+R. There you are :-)

GroupAdd, Explorer, ahk_class CabinetWClass
GroupAdd, Explorer, ahk_class ExploreWClass

#IfWinActive ahk_group Explorer
^r:: ;press CTRL+R to get focused file in explorer window
MouseMove, 400, 12
BlockInput On
ControlGetText, dir, Edit1, A
dir .= (SubStr(dir,0) != "\") ? "\" :
ControlGet, file, List, Focused Col1, SysListView321, A
filepath := dir . file
clipboard = %filepath%
SplitPath, filepath, name
SetKeyDelay, 400
IfWinExist ahk_class SunAwtFrame
{
WinActivate
SetKeyDelay, 400
Send ^k
SetKeyDelay, 30
Send {TAB 6}
Send %name%
Send {TAB 6}
SetKeyDelay, 400
Send ^a ^v {enter}
SetKeyDelay, 500
Send {Right}
BlockInput Off
return
}
else
{
BlockInput Off
MsgBox Please open a brain first.
}
return


Quote
topps
Nice script. Sadly for me, I predominantly use Mac OS so AHK not a great option for me. Some of the other integration tricks I have come across elsewhere are also Windows only. Sigh. 

But nice touch, nonetheless. Appreciated. 
Quote

Add a Website Forum to your website.

Newsletter Signup  Newsletter Signup        Visit TheBrain Blog   Visit TheBrain Blog       Follow us on Twitter   Follow Us       Like Us on Facebook   Like Us         Circle Us on Google+  Circle Us         Watch Us on Youtube  Watch Us       

TheBrain Mind Map & Mindmapping Software     Download TheBrain Mind Mapping Software