Script not loading at windows startup.

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
pyro0
Posts: 16
Joined: 12 Jul 2016, 19:45

Script not loading at windows startup.

22 Oct 2017, 16:36

I always had the autohotkey script to load up when windows starts. The last few days, the scripts have not loaded. I have to reload the script from the taskbar. I do not know if it's from using recent Firefox 57 beta version, but it feels like it started around the same time. What would be another method of having it run at windows start up? On a related note, I've had times where the script randomly just stopped working. That has happened in the past year or so. Not frequent, but a handful of times. Appreciate any help.
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Script not loading at windows startup.

22 Oct 2017, 17:26

As we can't see your script, it's hard to decide what's the root cause for that behaviour. Probably a memory consumption issue. Something I saw with scripts running 24/7. ...
User avatar
theimmersion
Posts: 181
Joined: 09 Jul 2016, 08:34
Location: Serbia

Re: Script not loading at windows startup.

22 Oct 2017, 18:17

As for the starting scripts when windows boots, we would need to know how you start your scripts at windows boot and which windows is it in the first place. Is it via shortcut in windows startup folder or via registry? Also, are scripts compiled and are they doing anything that would require admin right or any compiled scripts that are set as run as admin?
User avatar
king-of-hearts
Posts: 30
Joined: 01 Oct 2017, 06:29

Re: Script not loading at windows startup.

22 Oct 2017, 19:49

I usually copy a shortcut of my ahk file to windows startup (this can be checked pressing windows+r and running this: shell:startup
In the Task Manager is possible to see if the files are disable or not;

If everything is alright probably the script has some error;

Hope this helps!
https://autohotkey.com/boards/viewtopic.php?f=6&t=38707 - MS Access Manager - SQL Query: Incredible tool for MS Access/SQL Queries on the fly!!
pyro0
Posts: 16
Joined: 12 Jul 2016, 19:45

Re: Script not loading at windows startup.

23 Oct 2017, 12:34

I am on Win 7 64bit Ultimate. I have the .ahk file in C:\Users\name\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup. I have always had it there without any issues, until recently. If there is another way to add it to start up please let me know. As far as I am aware, these scripts do not require admin rights. They are mostly shortcuts to use firefox more efficiently.

Can you go more into this memory consumption issue? I have 16GB of ram.

I am also using AutoHotkey 1.0.48.05 if that matters.
garry
Posts: 3770
Joined: 22 Dec 2013, 12:50

Re: Script not loading at windows startup.

23 Oct 2017, 15:10

your script shoul'd contain first line :
setworkingdir,%a_scriptdir%
1- then with rightclick create a shorcut
2- put this shortcut to :
run,%a_startupcommon%

try reboot your computer


an example , creates a script : msgbox_test.ahk
if you reboot shoul'd see this ( msgbox ) : This is a test

Code: Select all

;https://autohotkey.com/boards/viewtopic.php?f=5&t=38756

f1=%a_scriptdir%\msgbox_test.ahk
ifnotexist,%f1%
{
e4x=
(Join`r`n
setworkingdir,%a_scriptdir%
msgbox, 262208,TEST ,This is a test
return
)
fileappend,%e4x%,%f1%
SplitPath, f1, name, dir, ext, name_no_ext, drive
FileCreateShortcut,%f1%,%a_startupcommon%\%name_no_ext%.lnk
}
exitapp
User avatar
Tomer
Posts: 366
Joined: 21 Aug 2016, 05:11

Re: Script not loading at windows startup.

23 Oct 2017, 23:19

the startup location youre using is for "name" profile only,
maybe you are trying to run it also on other users logging ?

if so, move the script to all-users startup:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
pyro0
Posts: 16
Joined: 12 Jul 2016, 19:45

Re: Script not loading at windows startup.

24 Oct 2017, 16:46

The reason seems to be due to an update on a different program. I tried moving scripts into an alternate location, but for whatever reason, it prevents loading of my script. The simplest solution was to just uninstall that conflicting program. I appreciate the help from everyone.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: gsxr1300, HiSoKa and 267 guests