Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

How to change location of user library?


  • Please log in to reply
5 replies to this topic
redgum
  • Members
  • 59 posts
  • Last active: Mar 26 2015 01:30 AM
  • Joined: 07 Dec 2007
Hi,

As I understand it, the user library is located at %A_MyDocuments%\AutoHotkey\Lib\. How can I change that to a different location?

Thanks!

MasterFocus
  • Moderators
  • 4323 posts
  • Last active: Jan 28 2016 01:38 AM
  • Joined: 08 Apr 2009
If you call a function from a file that is not #Included, the script looks for it in 3 places.
See http://l.autohotkey....nctions.htm#lib
I don't think you can "change" the specific location you mentioned though.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Antonio Fran├ža -- git.io -- github.com -- ahk4.net -- sites.google.com -- ahkscript.org

Member of the AHK community since 08/Apr/2009. Moderator since mid-2012.


maul.esel
  • Members
  • 790 posts
  • Last active: Jan 05 2013 09:26 PM
  • Joined: 28 Feb 2011
You can create a hardlink using the mklink command line utility (Windows-built in). That way, you can make any directory appear in %A_MyDocuments%\AutoHotkey\Lib\.
Join the discussion on The future of AutoHotkey
Posted Image Visit me on github Posted Image
Win7 HP SP1 64bit | AHK_L U 64bit

redgum
  • Members
  • 59 posts
  • Last active: Mar 26 2015 01:30 AM
  • Joined: 07 Dec 2007
I was hoping to avoid that, but a symbolic link will have to do if that path is hardcoded in HotKey. I was hoping there was a registry key or AHK variable or something that I could set to redirect it...

I keep my scripts in a Dropbox folder, so that they're available on all my machines. I'd like to keep my library there too, to avoid multiple versions getting out of sync... A symbolic link solves that issue, but not the issue of having yet another app creating its own folder in My Documents. Oh well. Call me anal, but I like to be able to control what goes where on my PC.

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

... but not the issue of having yet another app creating its own folder in My Documents.


AutoHotkey doesn't create the folder; you do (or don't). If you don't want to use the Lib folder in My Documents, you can use one of the other two libraries as MasterFocus noted.

ptbosean
  • Members
  • 1 posts
  • Last active: Nov 08 2012 02:02 PM
  • Joined: 08 Nov 2012
I am trying to do the same thing. I keep my personal AHK script in an AHK folder in dropbox and then add this into the main autohotkey script on the computers I use AHK on:

#include C:\Users\sheuchert\Desktop\Dropbox\AHK\SeanScripts.ahk

It would be nice to have this feature builtin but this is a decent workaround for me.

Hope that helps,

Sean