Windows 11 keeps asking for default app

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
Londolozi
Posts: 9
Joined: 11 Apr 2024, 16:54

Windows 11 keeps asking for default app

13 Apr 2024, 20:38

Code: Select all

#Requires AutoHotkey v2.0
#SingleInstance Force
;Runs BetSelector to update fields amd form
;SetWorkingDir "D:\Price_Advanced\Price"
Run "C:\Users\Owner\Desktop\BET_SELECTOR.lnk"
I appreciate this is not likely to be a AHK issue.
When I run script from Task Scheduler I get the Windows Prompt asking which App to use to run the script.

I have Reset ALL default Apps in Windows Settings. Assigned AutoHotKey 64bit as the default app.
Manually running a script is fine however when it runs from Task Schedular I get the Windows Prompt asking which App to use to run the script.
Anyone come across this problem before?


[Mod action: Moved topic from “Scripts and Functions (v2)” because that section is for sharing working scripts with others, not for asking for help with your scripts.]
User avatar
boiler
Posts: 17142
Joined: 21 Dec 2014, 02:44

Re: Windows 11 keeps asking for default app

13 Apr 2024, 23:44

@Londolozi — Please note that your last two topics now have been moved from “Scripts and Functions” as noted at the bottom of your posts. That section is for sharing working scripts with others, not for asking help with scripts. Please post in the proper section going forward. Thank you.
User avatar
mikeyww
Posts: 27140
Joined: 09 Sep 2014, 18:38

Re: Windows 11 keeps asking for default app

14 Apr 2024, 07:14

Hello,

You can use AutoHotkey's complete command-line syntax in the scheduler.

Run a script from the Windows Task Scheduler
Scripts support command line parameters. The format is:

AutoHotkey.exe [Switches] [Script Filename] [Script Parameters]

Source: Scripts - Definition & Usage | AutoHotkey v2
  1. Replace the EXE specification with the full path to your AHK program. Mine is the following.

    c:\Program Files\AutoHotkey\v2\AutoHotkey64.exe

    This goes in the "Program/script" field.
  2. All remaining parameters, including the full path to your script, go in the "Add arguments" field.
image240414-0820-001_cr.png
Windows Task Scheduler
image240414-0820-001_cr.png (66.75 KiB) Viewed 135 times
Londolozi
Posts: 9
Joined: 11 Apr 2024, 16:54

Re: Windows 11 keeps asking for default app

14 Apr 2024, 13:16

Thanks you. Works perfectly now.

Return to “Ask for Help (v2)”

Who is online

Users browsing this forum: Breadstone and 30 guests