Search found 299 matches

by pneumatic
25 May 2017, 22:31
Forum: Bug Reports
Topic: Excessive page faults with Process,Exist
Replies: 19
Views: 6226

Re: Excessive page faults with Process,Exist

Nope! It seems you are somehow getting the path of the .exe belonging to the window in WinGet despite it that .exe being in an elevated state. May I ask how you are doing this? I have tried using GetModuleFileNameEx but it doesn't work , presumably because that requires PROCESS_QUERY_INFORMATION and...
by pneumatic
25 May 2017, 22:23
Forum: Bug Reports
Topic: Excessive page faults with Process,Exist
Replies: 19
Views: 6226

Re: Excessive page faults with Process,Exist

The key was that while GetModuleBaseName requires PROCESS_QUERY_INFORMATION and PROCESS_VM_READ, GetProcessImageFileName only requires PROCESS_QUERY_LIMITED_INFORMATION. Unfortunately it looks like the GetProcessImageFileName only retrieves the file name and not the full path, which I need to tell ...
by pneumatic
25 May 2017, 12:48
Forum: Bug Reports
Topic: Excessive page faults with Process,Exist
Replies: 19
Views: 6226

Re: Excessive page faults with Process,Exist

Playing around with it a bit more, I find the detection speed to CPU usage ratio is just not quite there sadly. For me I think it's going to be the Shell method, or just stick with the Process ,Exist loop for overall best speed and lowest CPU, and if the latter, then require the user runs as adminis...
by pneumatic
25 May 2017, 11:59
Forum: Bug Reports
Topic: Excessive page faults with Process,Exist
Replies: 19
Views: 6226

Re: Excessive page faults with Process,Exist

Wow your COM method in the post you linked is really good, so light on CPU usage and very quick too (with reduced interval). Thanks a lot! :superhappy: edit: must be careful with the interval though, at interval=0.1 I thought was low CPU usage but I didn't see WmiPrvSE.exe now has all the CPU usage....
by pneumatic
25 May 2017, 10:17
Forum: Bug Reports
Topic: Excessive page faults with Process,Exist
Replies: 19
Views: 6226

Re: Excessive page faults with Process,Exist

Oops somehow I had been logged out and posted as a guest. Anyway thanks again for all the great info. I will have to spend some time thinking about which way is best : COM method, shell hook or just process,Exist loop type method with sleeps. Perhaps the soft page faults are not that bad after all, ...
by pneumatic
25 May 2017, 08:35
Forum: Bug Reports
Topic: Excessive page faults with Process,Exist
Replies: 19
Views: 6226

Re: Excessive page faults with Process,Exist

Thank you for all the info.
by pneumatic
24 May 2017, 23:38
Forum: Bug Reports
Topic: Excessive page faults with Process,Exist
Replies: 19
Views: 6226

Excessive page faults with Process,Exist

When calling "Process,Exist" many times per second, such as when trying to detect if a process is running, there are many soft page faults generated (on my system, 34,000 per second). Here is an example. #SingleInstance FORCE #Persistent SetWorkingDir %A_ScriptDir% SetBatchLines, -1 SetTimer, Detect...
by pneumatic
14 May 2017, 17:00
Forum: Ask For Help
Topic: quickly fix my problem?
Replies: 12
Views: 2003

Re: quickly fix my problem?

Put #Persistent back at the top, then run it and right click the tray Icon and Open and F5 to refresh so you can see what lines of code got executed and that should tell you what's happening. Here I have added 2 lines to your original code in post #1, and to me it looks like it should work, but in r...
by pneumatic
14 Apr 2017, 22:41
Forum: Ask For Help
Topic: How to raise thread priority of GUI window
Replies: 1
Views: 508

Re: How to raise thread priority of GUI window

Another idea might be to turn the timer off OnMessage(window moving) and then turn it back on again OnMessage(window stopped moving) Seems to work. I'm turning timers off when WM_ENTERSIZEMOVE and back on when WM_EXITSIZEMOVE. No bugs so far. I think it will only work reliably for timers with very ...
by pneumatic
14 Apr 2017, 18:50
Forum: Ask For Help
Topic: Basic Array Stuff Topic is solved
Replies: 3
Views: 857

Re: Basic Array Stuff Topic is solved

"For dummies" version... ^!F3:: Array := Object() ControlGetText, NotepadText, Edit1, Untitled - Notepad ;Use Window Spy to get the names of "Edit1" and "Untitled - Notepad" ; see image ArrayCount := 0 Loop, parse, NotepadText, `n, `r { ArrayCount := ArrayCount + 1 Array[ArrayCount] := A_LoopField }...
by pneumatic
14 Apr 2017, 16:19
Forum: Ask For Help
Topic: How to raise thread priority of GUI window
Replies: 1
Views: 508

How to raise thread priority of GUI window

Hello My script implements process detection which runs a Timer in a loop every 10ms to detect if a process is running. This timer is constantly running in the background and causes window movement in my GUI to become stuttery and low frame rate. I presume this is because the window rendering thread...
by pneumatic
18 Jan 2017, 11:23
Forum: Scripts and Functions
Topic: Gui that looks like a MsgBox
Replies: 10
Views: 7675

Re: Gui that looks like a MsgBox

Just a warning about using GuiMsgBoxes, when opening the GuiMsgBox it will steal the A_DefaultGui. So for example if your GuiMsgBox is in the middle of a bunch of generic GuiControl commands , they won't work after the GuiMsgBox is dismissed (unless they explicitly specify which Gui they operate on ...
by pneumatic
16 Jan 2017, 02:52
Forum: Ask For Help
Topic: Can't create global variables inside function per documentation Topic is solved
Replies: 3
Views: 955

Re: Can't create global variables inside function per documentation Topic is solved

Thank you. In that case I will use the "assume-global mode" declaration before messagebox in function 2. I still find it unintuitive though how superglobals are automatically assigned when there is no local variable of that name, but regular globals are not. This is what confused me, because the for...
by pneumatic
16 Jan 2017, 00:42
Forum: Ask For Help
Topic: Can't create global variables inside function per documentation Topic is solved
Replies: 3
Views: 955

Can't create global variables inside function per documentation Topic is solved

From the documentation: Global variables To refer to an existing global variable inside a function ( or create a new one), declare the variable as global prior to using it. Assume-global mode: If a function needs to access or create a large number of global variables, it can be defined to assume tha...
by pneumatic
13 Jan 2017, 05:00
Forum: Bug Reports
Topic: Radio variables still in memory after Gui is Cancelled and Destroyed
Replies: 3
Views: 3593

Re: Radio variables still in memory after Gui is Cancelled and Destroyed

Actually, now I remember why I thought it was a bug :) Gui, Destroy Removes the window (if it exists) and all its controls, freeing the corresponding memory and system resources . If the script later recreates the window, all of the window's properties such as color and font will start off at their ...
by pneumatic
13 Jan 2017, 04:50
Forum: Bug Reports
Topic: Radio variables still in memory after Gui is Cancelled and Destroyed
Replies: 3
Views: 3593

Radio variables still in memory after Gui is Cancelled and Destroyed

Code: Select all

Gui, Cancel
Gui, Destroy
After calling the above, the associated variables of any radio buttons in that GUI are still in memory....[/snip]

edit: nevermind, this is a good feature to have.
by pneumatic
05 Dec 2016, 02:00
Forum: Ask For Help
Topic: Fastest way to append to array (large arrays)
Replies: 6
Views: 3604

Fastest way to append to array (large arrays)

Hello Just wondering if there any difference in performance between the following methods of appending values to an array: loop { Array[A_Index] := value } loop { Array.Push(value) } In theory it seems like the Push method would be faster since it shouldn't need to iterate through anything to do wit...
by pneumatic
05 Dec 2016, 01:55
Forum: Ask For Help
Topic: BUG with MouseGetPos (in Directory Opus)
Replies: 6
Views: 1343

Re: BUG with MouseGetPos (in Directory Opus)

Have you tried
CoordMode, Mouse, Screen
in the auto execute section

Go to advanced search