Script doesn't run Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
yabab33299
Posts: 136
Joined: 06 May 2020, 17:16

Script doesn't run

19 Nov 2023, 16:52

Hi, this script only runs the hotkey but it stops there. How do I make it continue ?

Code: Select all

#SingleInstance Force

LControl & LShift::run cmd.exe 

Run, notepad.exe
User avatar
DuckingQuack
Posts: 222
Joined: 20 Jan 2023, 18:20

Re: Script doesn't run

19 Nov 2023, 17:55

Insert v2 advice for a v1 script...
:crazy:
Last edited by DuckingQuack on 19 Nov 2023, 20:14, edited 1 time in total.
Best of Luck,
The Duck
User avatar
flyingDman
Posts: 3012
Joined: 29 Sep 2013, 19:01

Re: Script doesn't run

19 Nov 2023, 18:11

That's v1 code.
docs wrote:After the script has been loaded, it begins executing at the top line, continuing until a Return, Exit, the script's first hotkey/hotstring label, or the physical end of the script is encountered
14.3 & 1.3.7
yabab33299
Posts: 136
Joined: 06 May 2020, 17:16

Re: Script doesn't run

19 Nov 2023, 19:15

Hi, Yes this script is from v1. The hotkey is only just "LControl & LShift::run cmd.exe". Then it'll open notepad.exe, but te latter part is not running.
User avatar
flyingDman
Posts: 3012
Joined: 29 Sep 2013, 19:01

Re: Script doesn't run

19 Nov 2023, 19:31

It will never be executed because the execution stops just after the hotkey (read what I quoted).
14.3 & 1.3.7
yabab33299
Posts: 136
Joined: 06 May 2020, 17:16

Re: Script doesn't run

19 Nov 2023, 19:37

I tried putting Return or Exit after the hotkey but it still don't work. Is there a way around this ?
User avatar
boiler
Posts: 17706
Joined: 21 Dec 2014, 02:44

Re: Script doesn't run

19 Nov 2023, 19:40

Thread moved from v2 section.

@yabab33299 — Note that the main section of the forum has been changed to be v2-oriented as that is now the latest official release, and there is a separate section of the forum dedicated to v1. Please post accordingly.
User avatar
boiler
Posts: 17706
Joined: 21 Dec 2014, 02:44

Re: Script doesn't run  Topic is solved

19 Nov 2023, 19:42

yabab33299 wrote:
19 Nov 2023, 19:37
I tried putting Return or Exit after the hotkey but it still don't work. Is there a way around this ?
It doesn’t matter what you put after the hotkey. The part you want to automatically execute when the script is run needs to go before all hotkeys. See Structure of a Script.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: AlFlo, mikeyww, vanove and 146 guests