AUTO START AHK SCRIPTS Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
seriously5OH

AUTO START AHK SCRIPTS  Topic is solved

18 Jun 2018, 15:40

I shut down my computer daily at work to take home my laptop each day. When I come back the next morning and boot up, I have to run AHK scripts anew. Is there a way to make them just always run, or at least to auto-start themselves when computer boots up each time?
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: AUTO START AHK SCRIPTS

18 Jun 2018, 15:46

scheduled tasks, put them in startup folder, etc.
seriously5OH

Re: AUTO START AHK SCRIPTS

19 Jun 2018, 10:01

I cannot do anything that requires admin login.
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: AUTO START AHK SCRIPTS

19 Jun 2018, 13:37

then make a script that run your other scripts for you, or a batch file or ctrl+a+enter

i dont think moving stuff into the start up folder requires admin privileges, but it might be prevented by a group policy or smth, idk
neomulemi6
Posts: 216
Joined: 30 Jun 2016, 06:01

Re: AUTO START AHK SCRIPTS

19 Jun 2018, 14:39

Here's a script I use to automatically run AHK scripts when I need them, and automatically close them when I don't.

Code: Select all

#Persistent
DetectHiddenWindows, On
SetTitleMatchMode, 2

SetTimer, Monitor, 1000

Monitor:
{
	; Example, this will automatically run "Photoshop.ahk" when I open Photoshop.
	RunScript("ahk_exe Photoshop.exe","Photoshop.ahk")

}
Return

RunScript(Program,Script)
{

	IfWinExist, %Program%
	{
	IfWinNotExist, %Script%
	{
		Run, %Script%
		WinWait, %Script%
	}
	} Else {
		IfWinExist, %Script%
		{
			WinClose, %Script%
		}
	}
}

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Chunjee, imbelicalcord, jollyjoe, Rohwedder and 247 guests