Code: Select all
#SingleInstance Force
#Persistent
#NoEnv
SetBatchLines -1
DetectHiddenWindows On
WinSetTitle ,% "ahk_id " A_ScriptHwnd ,,MyScript.ahk - AutoHotkey v1.1.24.03
Return
Code: Select all
#SingleInstance Force
#Persistent
#NoEnv
SetBatchLines -1
DetectHiddenWindows On
WinSetTitle ,% "ahk_id " A_ScriptHwnd ,,MyScript.ahk - AutoHotkey v1.1.24.03
Return
Code: Select all
#SingleInstance force
#Persistent
#NoEnv
SetBatchLines, -1
DetectHiddenWindows, On
WinGetTitle, vWinTitle, % "ahk_id " A_ScriptHwnd
WinSetTitle , % "ahk_id " A_ScriptHwnd,, % vWinTitle "x" ;modify title
Sleep 1000
WinSetTitle , % "ahk_id " A_ScriptHwnd,, % vWinTitle ;restore title
return
to the docs.You must not change the title of the script's hidden main window if you want to prevent new instances of the script from being launched.
Users browsing this forum: No registered users and 32 guests