Search found 33 matches

by Philister
12 Nov 2023, 14:19
Forum: Ask for Help (v1)
Topic: Alt-tab in Win 10?
Replies: 3
Views: 2325

Re: Alt-tab in Win 10?

Not sure where to post this so I'm dumping it in this thread, which seems to be the most recent Alt-Tab related question. I've chanced upon this solution through a bit of trial and error. It may be superior to actually using !{Tab}, which I recall wasn't always working 100% reliably plus it causes s...
by Philister
19 Sep 2023, 09:31
Forum: Scripts and Functions (v1)
Topic: RunAsTask() - Auto-elevates script without UAC prompt
Replies: 121
Views: 76659

Re: RunAsTask() - Auto-elevates script without UAC prompt

Isn't it the default to have to run shutdown.exe (plus, I assume, other shutdown commands like a shutdown.ahk) from an elevated command prompt? This article suggests elevating by default. Thanks!
by Philister
18 Sep 2023, 13:54
Forum: Scripts and Functions (v1)
Topic: RunAsTask() - Auto-elevates script without UAC prompt
Replies: 121
Views: 76659

Re: RunAsTask() - Auto-elevates script without UAC prompt

What happens when you click launch Shutdown.ahk without admin privileges :? Literally nothing. The script runs but the shutdown command has no effect. I've tried other command line-based methods of shutting down the PC, e. g. nircmd, but none have any effect on my PC unless run with admin privilege...
by Philister
18 Sep 2023, 09:44
Forum: Scripts and Functions (v1)
Topic: RunAsTask() - Auto-elevates script without UAC prompt
Replies: 121
Views: 76659

Re: RunAsTask() - Auto-elevates script without UAC prompt

Thanks for your reply, SKAN! Currently, I can't get Autohotkey's Shutdown command to work unless the command is issued with admin privileges. I don't understand! why? Me neither but if I create a script Shutdown.ahk with the only command Shutdown, 1 and execute it from Total Commander (running non-p...
by Philister
18 Sep 2023, 01:45
Forum: Scripts and Functions (v1)
Topic: RunAsTask() - Auto-elevates script without UAC prompt
Replies: 121
Views: 76659

Re: RunAsTask() - Auto-elevates script without UAC prompt

Greetings! Here is how I would like to use this script. Is it possible and how would I have to modify it? Too daft to figure it out myself just now. Run the first instance elevated through Windows task scheduler every time the PC starts, but have it do nothing except wait to be called with a simple ...
by Philister
12 Sep 2023, 13:26
Forum: Ask for Help (v1)
Topic: Notify another script when I suspend a script using the tray icon Topic is solved
Replies: 7
Views: 815

Re: Notify another script when I suspend a script using the tray icon Topic is solved

In case anyone is looking for a way to do this that also works with suspend states changed via hotkeys, not just through the tray menu, I have set up a timer to give me notification: global SuspendState := 0 SetTimer, T_SuspendNotify, 250 T_SuspendNotify: if (A_IsSuspended and !SuspendState) { Suspe...
by Philister
07 May 2023, 04:03
Forum: Ask for Help (v1)
Topic: Please help: DllCall of ScrollWindowEx with SW_SMOOTHSCROLL flag from a hotkey
Replies: 0
Views: 161

Please help: DllCall of ScrollWindowEx with SW_SMOOTHSCROLL flag from a hotkey

Have been looking at all the scripts I could find on the forum that call ScrollWindowEx but I couldn't figure it out, i. e. any attempts I made didn't have any (scrolling) effect on the active window. All I'd want for now would be to have a hotkey that, when pressed, calls the ScrollWindowEx Dll to ...
by Philister
06 Jan 2023, 10:42
Forum: Ask for Help (v1)
Topic: ClipWait is causing unwanted delay
Replies: 14
Views: 759

Re: ClipWait is causing unwanted delay

I solved the issue by saving the script's starting time (A_TickCount) to a global variable in the auto-execute section. In the function, I make execution of the Critical command depend on an if statement that checks whether at least 3 seconds have elapsed since the script started to make sure the ca...
by Philister
02 Jan 2023, 08:33
Forum: Ask for Help (v1)
Topic: ClipWait is causing unwanted delay
Replies: 14
Views: 759

Re: ClipWait is causing unwanted delay

Yeah, sorry, this thread started out rather messy.
by Philister
02 Jan 2023, 06:02
Forum: Ask for Help (v1)
Topic: ClipWait is causing unwanted delay
Replies: 14
Views: 759

Re: ClipWait is causing unwanted delay

I see. Thanks a lot for the detailed explanation! I guess the dodgy part was that the Crtical statement was "hidden" inside that function.
by Philister
02 Jan 2023, 03:48
Forum: Ask for Help (v1)
Topic: ClipWait is causing unwanted delay
Replies: 14
Views: 759

Re: ClipWait is causing unwanted delay

Turns out this issue was also affecting KeyWait, not just ClipWait. Wading back through backups, I was able to identify the change that led to the issue. It was having this function call in the auto-execute section of my script: PP_Cmd("cl.SetIcon(?$B_TB$, ?$WhatLang$, ?$c:\Users\PK\MyIcons\alphabet...
by Philister
01 Jan 2023, 17:39
Forum: Ask for Help (v1)
Topic: ClipWait is causing unwanted delay
Replies: 14
Views: 759

Re: ClipWait is causing unwanted delay

Setting up this hotkey as a blank new script file, it works correctly. How could we narrow down what's going wrong in the other script?
by Philister
01 Jan 2023, 17:36
Forum: Ask for Help (v1)
Topic: ClipWait is causing unwanted delay
Replies: 14
Views: 759

Re: ClipWait is causing unwanted delay

Weird, I get:
scr-Times-01012023-232721.jpg
scr-Times-01012023-232721.jpg (14.37 KiB) Viewed 664 times
It's a large script, 243 KB but it is the only one running permanently. AHK version is 1.1.33.09.
by Philister
01 Jan 2023, 17:13
Forum: Ask for Help (v1)
Topic: ClipWait is causing unwanted delay
Replies: 14
Views: 759

Re: ClipWait is causing unwanted delay

Thanks! Adapting your code slightly to clear the clipboard so that ClipWait has something to wait for: $a:: downTime := A_TickCount Clipboard := "" ClipWait 0.24 Return $a Up:: upTime := A_TickCount, elapsed := upTime - downTime MsgBox, 64, Times, Down = %downTime%`nUp = %upTime%`nElapsed = %elapsed...
by Philister
01 Jan 2023, 16:36
Forum: Ask for Help (v1)
Topic: ClipWait is causing unwanted delay
Replies: 14
Views: 759

ClipWait causing delays for other threads

[Mod edit: Topics merged.] Hey. I think this has started happening only recently but I'm not aware of anything I did (like updating AHK or changing the script's directives) that might have caused this change in behavior. The problem is this: On the downpress, one of my hotkeys calls a function that...
by Philister
01 Jan 2023, 16:03
Forum: Ask for Help (v1)
Topic: ClipWait is causing unwanted delay
Replies: 14
Views: 759

ClipWait is causing unwanted delay

Please see second post below, first attempt was incomplete.
by Philister
12 Apr 2022, 03:25
Forum: Notepad++
Topic: How to highlight variables with % in Notepad++?
Replies: 1
Views: 2472

Re: How to highlight variables with % in Notepad++?

Found the solution here . Just make sure you remove % from the keyword and operator lists in case you have it in there. Alternatively, if you want different styling options for both uses of %: 1. Define % as a keyword that requires a prefix - this covers your %var% cases. 2. Add % to the operator li...
by Philister
12 Jan 2022, 15:59
Forum: Wish List
Topic: Option to streamline Switch statement
Replies: 30
Views: 4472

Re: Option to streamline Switch statement

Xtra: Sorry, I must have misread that statement. So there is no limit on the number of cases? Great, thanks! boiler: I do appreciate your feedback and am thankful for the fix that you offered, which I'm now using in one of my scripts. :bravo: If your objection was merely one of form (which it now se...
by Philister
12 Jan 2022, 14:41
Forum: Wish List
Topic: Option to streamline Switch statement
Replies: 30
Views: 4472

Re: Option to streamline Switch statement

I do not care exactly why the return s are there, I want usability. The facts are that this is Auto hotkey , so invariably Switch will frequently be used towards the end of hotkey routines with Cases ended by return and - because Switch is usually lenghty and gets in the way of surrounding code - wi...

Go to advanced search