views:

22

answers:

1

I use 3 computers regularly and a fourth one ocassionaly. I have used dorpbox to synchronize my .ahk script to all computers. However, the path names are different on the different computers. For instance at home there is C:\Users\Farrel\Documents\SyRRuP where as at work it is something such as C:\Users\fbuchins\Documents\SyRRuP and on an Windows XP computer it is somethinge else. Consequently a particular sequence of code that runs a particular file only works on one computer and bombs out on the others. What is the most elegant way to overcome the problem?

+1  A: 

I'm not sure about dropbox, but I have used Windows environment variables to set things like this before. Something like PROGPATH="C:\thispath\" then read the PROGPATH variable from the app or script -

Jeff
this should be a superuser.com question not a stackoverflow question
fuzzy lollipop
Why do you think it is a superuser.com question? It is a way to address different path names within an autohotkey script or any script for that matter.
Farrel
Dear Jeff: your answer did not really give me the answer but it did something more valuable than just that. Instead it gave me the buzzwords "environment variables" and reminded me of a concept I had once known about. I then searched authotkey for "environment variables" and found http://www.autohotkey.com/docs/Variables.htm#envFrom there I learned about %A_MyDocuments% and the likes and now I have solved problems that I had many scripts. Thanks
Farrel