| View previous topic :: View next topic |
| Author |
Message |
msandry
Joined: 13 Apr 2006 Posts: 5 Location: Chicago, IL
|
Posted: Thu Apr 13, 2006 8:54 am Post subject: AHK as a Startup program? |
|
|
Is there a way automatically to run AHK upon starting up the computer, i.e., upon booting up?  |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Apr 13, 2006 9:03 am Post subject: |
|
|
Questions of this kind always make me wonder: have you really thought it through before you posted the question??
Why would you want to start AHK automatically? It wouldn't do anything!
But anyway, when you have compiled a script, of course you can run it automatically (most of us do it all the time). Just add it to your Startup folder! |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5382 Location: /b/
|
Posted: Thu Apr 13, 2006 9:07 am Post subject: |
|
|
| Anonymous wrote: | | Why would you want to start AHK automatically? It wouldn't do anything! | Running AutoHotkey.exe would run AutoHotkey.ini as a script, so what msandry said is valid. _________________
 |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Thu Apr 13, 2006 1:43 pm Post subject: |
|
|
This is also covered in the FAQ. Here's that section:
How do I put my hotkeys and hotstrings into effect automatically every time I restart my PC?
There is a folder in the Start Menu called Startup. If you put a shortcut to your script in that folder, the script will launch automatically every time you start your PC. To create a shortcut:
1) Select the script file in Explorer and press Control-C (but if your script is is a .ini file, select AutoHotkey.exe instead).
2) Right-click the Start button and choose "Explore All Users".
3) Navigate to the Startup folder inside the Programs folder.
4) From the menu bar, choose Edit > Paste Shortcut. The shortcut to the script should now be in the Startup folder. |
|
| Back to top |
|
 |
msandry
Joined: 13 Apr 2006 Posts: 5 Location: Chicago, IL
|
Posted: Thu Apr 13, 2006 8:57 pm Post subject: AHK as a startup program? |
|
|
Thank you all for your quick responses!
This is very much appreciated.
My question is something I've been wondering about for about a year. Your answers answered my question, but they also taught me about what the Startup folder is for.  |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5382 Location: /b/
|
Posted: Thu Apr 13, 2006 9:05 pm Post subject: |
|
|
Wow I must be a real noob to not know about the startup folder, I was using Scheduled Tasks all this time (which is really fustrating). Now I know, things will be much easier thanks. _________________
 |
|
| Back to top |
|
 |
msandry
Joined: 13 Apr 2006 Posts: 5 Location: Chicago, IL
|
Posted: Thu Apr 13, 2006 10:21 pm Post subject: AHK as a startup program? |
|
|
Chris, Titan, Guest,
I followed Chris' instructions and copied "AutoHotKey.exe" to the Startup folder in the All Users" folder. I immediately restarted my computer to see it work. It didn't.
Suggestions/recommendations? |
|
| Back to top |
|
 |
msandry
Joined: 13 Apr 2006 Posts: 5 Location: Chicago, IL
|
Posted: Thu Apr 13, 2006 10:50 pm Post subject: AHK as a startup program? |
|
|
| I had an idea. I deleted "AutoHotKey.exe" from my Startup folder. In the AutoHotKey folder under Program Files, I created a shortcut to AutoHotKey.exe and copied it to the Startup folder. That didn't work either. What am I doing wrong? |
|
| Back to top |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5382 Location: /b/
|
Posted: Thu Apr 13, 2006 11:09 pm Post subject: |
|
|
Try putting a script in the startup folder (if you're using the AutoHotkey.ini, rename the extension to .ahk). _________________
 |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Fri Apr 14, 2006 10:38 am Post subject: |
|
|
| Titan wrote: | | Try putting a script in the startup folder (if you're using the AutoHotkey.ini, rename the extension to .ahk). | Not the script! A shortcut (link) to it! I accidently copied my Permanent.ahk file to the Startup folder instead of such shortcut, and it didn't found the included files nor the scripts it should run...
Of course, the .ahk files must be associated to AutoHotkey.exe (automatic if using the installation program). _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
|