Code: Select all
WinSet, Style, -0xC00000, A
What I want is to WinSet that on a certain application every time it opens, without breaking the rest of my script functionality.
How can I do that? Thank you.
Code: Select all
WinSet, Style, -0xC00000, A
Code: Select all
MyWinTitle = Untitled - Notepad
While(true)
{
WinWait, %MyWinTitle%
WinSet, Style, -0xC00000
}
Code: Select all
MyWinTitle = Untitled - Notepad
While(true)
{
If WinExist(MyWinTitle)
WinSet, Style, -0xC00000
; Other non-hotkey things that I want to monitor while the script is running
Sleep, 1000
}
Thank you Osprey bus unfortunately this will not cut it because of the complexity of my script. I tried setting a loop but it doesn't work.. any idea why?Osprey wrote:If your script currently contains only hotkeys, you can do this:If you have more than just hotkeys and can't have the script waiting for that window, you can do this and add the other commands that you need to process to the while loop:Code: Select all
MyWinTitle = Untitled - Notepad While(true) { WinWait, %MyWinTitle% WinSet, Style, -0xC00000 }
Code: Select all
MyWinTitle = Untitled - Notepad While(true) { If WinExist(MyWinTitle) WinSet, Style, -0xC00000 ; Other non-hotkey things that I want to monitor while the script is running Sleep, 1000 }
Code: Select all
SetTimer, app
...
app:
if WinExist(ahk_exe app.exe)
{
WinSet, Style, -0xC00000, ahk_exe app.exe
; Sleep, 100 (with and without this)
}
return
Users browsing this forum: RandomBoy and 278 guests