Text to speech upon activating the script Topic is solved

Get help with using AutoHotkey and its commands and hotkeys
AC1
Posts: 16
Joined: 30 May 2019, 12:59

Text to speech upon activating the script

06 Sep 2019, 15:35

Hello Wizards,

Need AHK to execute below line of code at a time once script is activated. Kind of like VBA onOpen in Excel. So, once I activate the script file and it is now active and listening for keyboard shortcut to run the main part of it, want it to execute this line without any keyboard shortcuts to trigger below line.
I have it speak at end of script, but don't know how to have it do the same upon activating of the script file...

Code: Select all

ComObjCreate("SAPI.SpVoice").Speak("Hello, script is ready for action!")
User avatar
TheDewd
Posts: 1391
Joined: 19 Dec 2013, 11:16
Location: USA

Re: Text to speech upon activating the script  Topic is solved

06 Sep 2019, 15:38

Just put it as the first line in your script.

Add the command to the Auto-execute section of your script...
https://www.autohotkey.com/docs/Scripts.htm#auto
Image Bulldozer - Sokoban inspired game from 1994 recreated in AutoHotkey.

Return to “Ask For Help”

Who is online

Users browsing this forum: afe, c7aesa7r, coris, EEEEE, garry, Google [Bot], songdg, tuineen and 154 guests