Jump to content

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

How to run AHK script at startup in Windows 8.1


  • Please log in to reply
7 replies to this topic
Baroninkjet
  • Members
  • 8 posts
  • Last active: Nov 10 2014 03:05 AM
  • Joined: 31 Oct 2014

I have been using a task manager startup for my AHK script in Windows 8 for a while now. But it won't work in Windows 8.1. I tried exporting the script, tried creating a new one from scratch, highest privledges, etc. What worked in 8.0 won't work in 8.1. 

 

Is anyone familiar with a how-to on how this can be done? I've tried all the ones I found online, but no go so far... 

 

Thanks!



GEV
  • Members
  • 1364 posts
  • Last active:
  • Joined: 23 Oct 2013

Create a shortcut to the script in the startup folder

 

and make sure that you're running this shortcut as administrator. (right click --> Properties-->Advanced-->Run as administrator).



Baroninkjet
  • Members
  • 8 posts
  • Last active: Nov 10 2014 03:05 AM
  • Joined: 31 Oct 2014

I have tried this. Some basic functions work (e.g., typing text) but others do not (mouse wheel activities). Have you got it to work fully in 8.1? There is no "run as admin" checkbox for things in the 8.1 start menu like there is at other places. I set all the permissions to highest, but it still does not work.



Exaskryz
  • Members
  • 3249 posts
  • Last active: Nov 20 2015 05:30 AM
  • Joined: 23 Aug 2012

What problem are you having with mouse wheel activities?

 

I had a script I used on Vista where I could scroll in whatever window my mouse cursor was over, even if that window wasn't active. Windows 8.1 broke that for me. Now I can only scroll in the inactive windows of the *same* program. If I have two PDF's open in Adobe Reader, I can scroll in the inactive one just the same, but I can't scroll in MS Word without activating it.

 

As for getting admin permissions, try this at the top of your script:

 

if not A_IsAdmin
{
   Run *RunAs "%A_ScriptFullPath%"
   ExitApp
}

 

I believe that whenever you start up your computer you'll be prompted by AHK requesting admin permissions. I got annoyed by that and found that a rarely used function could just be put into its own script that I can launch if I need it, so I removed the admin permissions for my script. (But maybe if I run my inactive-window-scrolling script as admin, it might work again.. but I think I tested it and found it didn't.)



Baroninkjet
  • Members
  • 8 posts
  • Last active: Nov 10 2014 03:05 AM
  • Joined: 31 Oct 2014
It's really simple -- make the mouse wheel send up/down keys rather than default behavior. It works fine if I load the AHK as administrator, but cannot make it work to auto-load the way Win 8 does. And it is something I use hundreds of times a day. I guess it is not the end of the world to have to manually load it from task bar, but...  :(
 
wheelup::send {up}
wheeldown::send {down}
return
 }


Baroninkjet
  • Members
  • 8 posts
  • Last active: Nov 10 2014 03:05 AM
  • Joined: 31 Oct 2014

Still searching -- if anyone has any thoughts. 

 

Thanks!



Charles From VA
  • Members
  • 10 posts
  • Last active: Aug 18 2015 05:59 AM
  • Joined: 24 Aug 2014

Still searching -- if anyone has any thoughts. 

 

Thanks!

I know this is very late, but I don't know if you ever found a solution. I created an item in Task Scheduler with no problem and then installed Windows 10, hated it, and uninstalled it, which meant I had to re-install the Task Scheduler item. 

 

It didn't work, so I went Googling and wound up here. Fortunately, I had the presence of mind at some point to export the Task and I just imported it and away I went. Works like a charm. The photos may be overkill, but I didn't know any other way to be sure and capture all the pertinent settings.

 

Hope this is helpful, even at this late date—if not for you, then for anyone else seeking help with this.

 

ATS_for_AHK_1.png

 

ATS_for_AHK_2.png

 

ATS_for_AHK_3.png

 

ATS_for_AHK_4.png

 

ATS_for_AHK_5.png

 

ATS_for_AHK_6.png
 
ATS_for_AHK_7.png
 
ATS_for_AHK_8.png
 
ATS_for_AHK_9.png


gtolden
  • Members
  • 2 posts
  • Last active: Oct 24 2015 10:15 AM
  • Joined: 24 Oct 2015

 

I know this is very late, but I don't know if you ever found a solution. I created an item in Task Scheduler with no problem and then installed Windows 10, hated it, and uninstalled it, which meant I had to re-install the Task Scheduler item. 

 

It didn't work, so I went Googling and wound up here. Fortunately, I had the presence of mind at some point to export the Task and I just imported it and away I went. Works like a charm. The photos may be overkill, but I didn't know any other way to be sure and capture all the pertinent settings.

 

Hope this is helpful, even at this late date—if not for you, then for anyone else seeking help with ...

\...

 

Thanks!!!

Also works in Win10