how to change script location?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Anamacha
Posts: 8
Joined: 18 Jun 2018, 14:46

how to change script location?

18 Jun 2018, 15:05

How can I change the location where AHK finds its script? Currently it looks in C:\Users\John\Documents

I am a writer, and I use AHK as a text expander. In other words, I type "rem" and AHK expands this to "remember". This and many other expansions speed my writing day up considerably.

I recently started using two computers, and am finding that when I make a change to one script file, I have to manually make the same change to the other computer. So I'd like to move the AHK definitions file to one of my shared drives, say Dropbox. That way the file will get synced between computers, and the most I'll have to do is reload it.

Is it possible to do this? Thanks!
User avatar
DyaTactic
Posts: 221
Joined: 04 Apr 2017, 05:52

Re: how to change script location?

18 Jun 2018, 15:23

I belive there is no way to define dynamic hotstrings. But you can place your script in Dropbox. Or only the hotstring part and use "#Include, Filename" in the scripts on both computers.

If you want to change the working directory, use "SetWorkingDir, DirName".

Let me know if you need more help.
lexikos
Posts: 9599
Joined: 30 Sep 2013, 04:07
Contact:

Re: how to change script location?

18 Jun 2018, 19:11

How do you change the location where Notepad looks for text files?

You can run a script from anywhere. Just run or "open" the .ahk file instead of the AutoHotkey executable.
DyaTactic wrote:I belive there is no way to define dynamic hotstrings.
There is a Hotstring function in v1.1.28+, but what does that have to do with the topic? ;)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Aqualest, mikeyww and 280 guests