Search found 97 matches

by nelvin08
16 Jan 2024, 07:32
Forum: Ask for Help (v1)
Topic: Close open windows and shutdown the computer
Replies: 27
Views: 3270

Re: Close open windows and shutdown the computer

Thanks a lot for the insights. I'll definitely explore the ProcessName subcommand later on. About the WinClose, which is more correct then between the 2? WinClose, % "ahk_id " . WindowList%A_Index% WinClose, % winTitle This is partly what I mean by making my code more efficient as well, correcting t...
by nelvin08
16 Jan 2024, 04:11
Forum: Ask for Help (v1)
Topic: Close open windows and shutdown the computer
Replies: 27
Views: 3270

Re: Close open windows and shutdown the computer

All good. Thanks for the help. Can I pick your brain some more? On your exclude line code, is there a different way instead of the windows title maybe exe or class? Cause for windows title, I have to be exact with the name of the window (e.g. if I have multiple notepads, I have to put the name of ea...
by nelvin08
15 Jan 2024, 17:45
Forum: Ask for Help (v1)
Topic: Close open windows and shutdown the computer
Replies: 27
Views: 3270

Re: Close open windows and shutdown the computer

For efficiency purposes, I will just ask this. Is there some other way this code could be further simplified/shortened? #Esc:: exclude := "Program Manager|Start|Windows Task Manager|MainWindow" WinGet, WindowList, List Loop, %WindowList% { WinGetTitle title, % winTitle := "ahk_id" WindowList%A_Index...
by nelvin08
15 Jan 2024, 15:37
Forum: Ask for Help (v1)
Topic: Close open windows and shutdown the computer
Replies: 27
Views: 3270

Re: Close open windows and shutdown the computer

Okay, adding the code below is the final true form of the code. Instead of what others are doing which is to directly shut down the PC by using Shutdown, 1 (which I think is risky considering if you have unsaved work), this just shows the windows prompt if you want to shutdown / restart / sleep / sw...
by nelvin08
15 Jan 2024, 13:50
Forum: Ask for Help (v1)
Topic: Close open windows and shutdown the computer
Replies: 27
Views: 3270

Re: Close open windows and shutdown the computer

ah that's a different guy. That's not me
by nelvin08
15 Jan 2024, 13:47
Forum: Ask for Help (v1)
Topic: Close open windows and shutdown the computer
Replies: 27
Views: 3270

Re: Close open windows and shutdown the computer

Thanks. My original code below doesn't have the shutdown command but it still shows the prompt tho. lol

Anyway, I'll try to figure it out

Code: Select all

#Esc::
DetectHiddenWindows, Off
WinGet, WindowList, List
Loop, %WindowList%
{
	WinClose, % "ahk_id " . WindowList%A_Index%
}
return
by nelvin08
15 Jan 2024, 12:08
Forum: Ask for Help (v1)
Topic: Close open windows and shutdown the computer
Replies: 27
Views: 3270

Re: Close open windows and shutdown the computer

I don't use any apps to populate my desktop. If you use my original code, you'll see what I mean. On the other hand, using your code, the below works. But even tho I don't have the exclude variable, everything works fine. Is there any specific reason I should keep those? Program Manager|Start|Window...
by nelvin08
15 Jan 2024, 09:07
Forum: Ask for Help (v1)
Topic: Close open windows and shutdown the computer
Replies: 27
Views: 3270

Re: Close open windows and shutdown the computer

Thanks. This looks good and all. They indeed only show the open applications. But the problem is not the visible windows.

The problem is my desktop icons. I don't know what WindowsTitle they belong to and how to exclude it.

If you have an idea, please let me know.


Thank you.
by nelvin08
15 Jan 2024, 08:24
Forum: Ask for Help (v1)
Topic: Close open windows and shutdown the computer
Replies: 27
Views: 3270

Re: Close open windows and shutdown the computer

The blank spaces mean those with null titles? My only problem is I don't know which title removes the desktop icons. And if your code is returning blank, how do I exclude them then?

Thank you
by nelvin08
15 Jan 2024, 06:33
Forum: Ask for Help (v1)
Topic: Close open windows and shutdown the computer
Replies: 27
Views: 3270

Re: Close open windows and shutdown the computer

This script could lead to loss of data, so use at your own risk . WinGet, wins, List Loop, %wins% { WinGet, style, Style, % wTitle := "ahk_id " wins%A_Index% If !(style ~= "0x(9|16)") WinClose, %wTitle% } ; Shutdown, POWERDOWN := 8 What does the line with the If !(style ~= "0x(9|16)") mean? I have ...
by nelvin08
15 Jan 2024, 06:27
Forum: Ask for Help (v1)
Topic: Script to close all open windows
Replies: 24
Views: 12355

Re: Script to close all open windows

Sorry to hijack this thread but the original code works except that it removes all the desktop icons as well. Is there a way NOT to do that?

Code: Select all

#Esc::
DetectHiddenWindows, Off
WinGet, WindowList, List
Loop, %WindowList%
{
	WinClose, % "ahk_id " . WindowList%A_Index%
}
return
by nelvin08
24 Sep 2023, 00:40
Forum: Scripts and Functions (v1)
Topic: ToolTipFont / ToolTipColor - options for the ToolTip command
Replies: 92
Views: 52329

Re: ToolTipFont / ToolTipColor - options for the ToolTip command

Thank you for this! it works like a charm Although it's funny that if you don't put the ToolTipFont on each of the hotkey, it will apply to the whole script that uses ToolTips. So in my case, I just put it at the top of my script (since I use the same font and size for around 5++ tooltips in my whol...
by nelvin08
23 Sep 2023, 23:39
Forum: Bug Reports
Topic: The ToolTip function sometimes displays the text at the top of the screen incorrectly Topic is solved
Replies: 12
Views: 3760

Re: The ToolTip function sometimes displays the text at the top of the screen incorrectly Topic is solved

lexikos wrote:
04 Jun 2022, 22:09
This was fixed by v1.1.34.00.
By fixed, you mean we can now have the tooltip above the taskbar? It still doesn't seem to be the case now though.

I need this functionality too although I know GUI can do this better but some people prefer tooltip. Thank you
by nelvin08
23 Sep 2023, 10:54
Forum: Ask for Help (v1)
Topic: Need help with variables with multiple ternary operator
Replies: 4
Views: 350

Re: Need help with variables with multiple ternary operator

Got it. Thanks though. Very helpful!
by nelvin08
23 Sep 2023, 10:01
Forum: Ask for Help (v1)
Topic: Need help with variables with multiple ternary operator
Replies: 4
Views: 350

Re: Need help with variables with multiple ternary operator

Do you mean, either way I go, I need to input how many device I have?

The w functions seems neat than the q
by nelvin08
23 Sep 2023, 09:30
Forum: Ask for Help (v1)
Topic: How to get the default sound device name?
Replies: 9
Views: 761

Re: How to get the default sound device name?

Thank you so much. I figured it out. In my below code, what do you think am I missing so that the GUI refreshes and does not overlap with each other when toggling? I tried putting gui cancel and gui destroy before line 3 but it isn't working. image.png !`:: toggle := (!toggle) ? true : false VA_SetM...
by nelvin08
23 Sep 2023, 07:13
Forum: Ask for Help (v1)
Topic: How to get the default sound device name?
Replies: 9
Views: 761

Re: How to get the default sound device name?

I saw people using the VA_SetDefaultEndpoint and that I need to call it into my script. I am new on how to call functions from a different script into my own just like what we did earlier. Do you know how I can do that and apply it for VA_SetDefaultEndpoint? I'm researching it now as well as we spea...
by nelvin08
23 Sep 2023, 06:46
Forum: Ask for Help (v1)
Topic: How to get the default sound device name?
Replies: 9
Views: 761

Re: How to get the default sound device name?

okay. so it isn't much trouble (I thought I needed to always run the VA.ahk before I can run scripts from it) But it worked! Thank you. Do you think my other post is achievable now as well since I am using VA.ahk now? - https://www.autohotkey.com/boards/viewtopic.php?f=76&t=121710 Below's my updated...
by nelvin08
23 Sep 2023, 06:07
Forum: Ask for Help (v1)
Topic: How to get the default sound device name?
Replies: 9
Views: 761

Re: How to get the default sound device name?

Thank you so much.

But is there a way to do this without the VA.ahk please?
by nelvin08
23 Sep 2023, 06:03
Forum: Ask for Help (v1)
Topic: Need help with variables with multiple ternary operator
Replies: 4
Views: 350

Need help with variables with multiple ternary operator

Hi, Is there a way to optimize the variable "device" below so that it doesn't go back to device 1 after the 3rd item on the sound list? Preferrably something that disregards how many sound devices are active, basically just go through the whole list of sound devices for every press of the hotkey. !F...

Go to advanced search