Search found 299 matches

by pneumatic
13 Jul 2017, 19:33
Forum: Ask For Help
Topic: Seeking clarification on Run as Administrator
Replies: 0
Views: 318

Seeking clarification on Run as Administrator

•Run the script as administrator. Note that this also causes any programs launched by the script to run as administrator , and may require the user to accept an approval prompt when launching the script Is this definitely true that if the script is already running as Administrator, that any subsequ...
by pneumatic
13 Jul 2017, 19:25
Forum: Ask For Help
Topic: WinWaitActive and User Account Control pop up
Replies: 4
Views: 959

Re: WinWaitActive and User Account Control pop up

If you are waiting for it to close you should use WinWaitClose. Also make sure the title of the window is in fact "User Account Control" by using ahk's Window Spy tool which can be accessed from right clicking the ahk tray icon.
by pneumatic
12 Jul 2017, 03:20
Forum: Ask For Help
Topic: Insert vs Push Topic is solved
Replies: 2
Views: 621

Insert vs Push Topic is solved

Just wondering why the documentation recommends to use Push instead of Insert when adding elements to an Object.
I have 15,000+ lines of code to go through and replace all instances of Insert with Push and would like to know that it's worth doing :lolno:
Thanks
by pneumatic
11 Jul 2017, 20:48
Forum: Ask For Help
Topic: Need Help, Completely new to this. Topic is solved
Replies: 3
Views: 637

Re: Need Help, Completely new to this. Topic is solved

You could also right click and "Pause Script" to temporarily stop it from interfering.
Or you could make a hotkey to Pause/Unpause without having to click the tray icon.
Or you could edit the script so it applies only to programs that you want it to.
Autohotkey is very versatile!
by pneumatic
11 Jul 2017, 20:13
Forum: Ask For Help
Topic: What happens when a timer is turned Off? Topic is solved
Replies: 8
Views: 1463

Re: What happens when a timer is turned Off? Topic is solved

I have one more question if you don't mind. Are SetTimer commands buffered? For example if we do this: SetTimer, Timer, 250 SetTimer, Timer, Off SetTimer, Timer, 250 SetTimer, Timer, Off Assuming the above code executes in less than 250ms, would it be equivalent to just setting the Timer Off once (s...
by pneumatic
11 Jul 2017, 05:55
Forum: Ask For Help
Topic: What happens when a timer is turned Off? Topic is solved
Replies: 8
Views: 1463

Re: What happens when a timer is turned Off? Topic is solved

Ah yes, looks like it depends whether the "SetTimer, Timer, Off" command interrupted the Timer or not. If it did, then it seems execution continues after the Off command until the current thread is finished, then the Timer will continue until its return, never to execute again (edit: assuming no oth...
by pneumatic
11 Jul 2017, 05:23
Forum: Ask For Help
Topic: What happens when a timer is turned Off? Topic is solved
Replies: 8
Views: 1463

Re: What happens when a timer is turned Off? Topic is solved

Actually I need to know where execution goes specifically. i.e Does execution continue immediately to the next line, or does it complete the timer's subroutine and then return to the line after the "SetTimer, Timer, Off". (If this one is in the help file you can have me taken to a field and shot :) )
by pneumatic
11 Jul 2017, 05:19
Forum: Ask For Help
Topic: What happens when a timer is turned Off? Topic is solved
Replies: 8
Views: 1463

Re: What happens when a timer is turned Off? Topic is solved

God damn it! I explicitly ctrl+F'd the string "disable" through the entire document before posting and didn't find that. Oh well guess my brain is tired today :)

Thanks.
by pneumatic
11 Jul 2017, 05:12
Forum: Ask For Help
Topic: What happens when a timer is turned Off? Topic is solved
Replies: 8
Views: 1463

What happens when a timer is turned Off? Topic is solved

When a timer is turned off (SetTimer, Timer, Off) what happens exactly? Is the timer interrupted and cancelled in the middle of its subroutine, or is it allowed to finish executing until it reaches its return? The help documentation doesn't seem to say.

Thanks!
by pneumatic
22 Jun 2017, 06:25
Forum: Ask For Help
Topic: Goto/gosub not allowed, but is allowed via SetTimer
Replies: 5
Views: 1124

Re: Goto/gosub not allowed, but is allowed via SetTimer

The first thing I always do is look at the help file, followed by a forum search. Unfortunately I didn't find anything that explains why such an execution jump is allowed in the first instance but not the second. That's not to say there isn't some justifiable reason, only that I can't imagine a poss...
by pneumatic
22 Jun 2017, 06:19
Forum: Ask For Help
Topic: Script parameter referencing inconsistency
Replies: 6
Views: 976

Re: Script parameter referencing inconsistency

If that were true then %A_Index% should return the integer 1, not the contents of the first parameter. For some reason it's getting double dereferenced, and %1% doesn't even get a single dereference!
I don't like putting code in that "just works" without knowing why :)
by pneumatic
22 Jun 2017, 06:00
Forum: Ask For Help
Topic: how can i read the raw data from usb sound device with ahk.
Replies: 13
Views: 3119

Re: how can i read the raw data from usb sound device with ahk.

I think you would need to use ahk's DllCall to call windows audio functions: https://msdn.microsoft.com/en-us/library/dd316602.aspx If you havent done DllCalls before in ahk it requires a fair bit of research on it as it can be tricky creating and referencing windows function parameters in just the ...
by pneumatic
21 Jun 2017, 16:55
Forum: Ask For Help
Topic: Goto/gosub not allowed, but is allowed via SetTimer
Replies: 5
Views: 1124

Goto/gosub not allowed, but is allowed via SetTimer

The following code is not allowed in Autohotkey: gosub SubRoutine Function(){ SubRoutine: msgbox Hello return } However this is: SetBatchLines, -1 SetTimer, SubRoutine, 1000 loop { counter += 1 ;keeps execution here. The timer hasn't fired yet since it has to wait for its duration to expire first, t...
by pneumatic
21 Jun 2017, 14:55
Forum: Ask For Help
Topic: Script parameter referencing inconsistency
Replies: 6
Views: 976

Re: Script parameter referencing inconsistency

try this param=%1% ; = not := msgbox %param% If 1 = MyParameter ; no %% and "" and () crazy but true msgbox The parameter was received Thanks and if you could offer an explanation as to why that works I would be very much grateful as I haven't been able to glean anything from the help file. I don't...
by pneumatic
21 Jun 2017, 13:39
Forum: Ask For Help
Topic: Script parameter referencing inconsistency
Replies: 6
Views: 976

Script parameter referencing inconsistency

Suppose we pass a single parameter called "MyParameter" to the script on launch. Referencing it in this way works: loop %0% { param := %A_Index% } msgbox %param% However this doesn't work: param := %1% msgbox %param% Nor this: If (%1% = "MyParameter") msgbox The parameter was received Why is it that...
by pneumatic
26 May 2017, 04:58
Forum: Bug Reports
Topic: Excessive page faults with Process,Exist
Replies: 19
Views: 6270

Re: Excessive page faults with Process,Exist

Ok here is my final solution for fast reliable process detection with low CPU usage, no pagefaults and no leaking handles! I have tested this script under all combinations of the following conditions: -UAC enabled and target process running in Administrator mode -Target processes of 32/64bit -Target...
by pneumatic
26 May 2017, 03:08
Forum: Bug Reports
Topic: Excessive page faults with Process,Exist
Replies: 19
Views: 6270

Re: Excessive page faults with Process,Exist

pneumatic wrote: then finally I will use some MD5 hashing to tell apart .exe's of the same file name.
lol I just realised it's not needed as the paths can be compared :oops:
by pneumatic
26 May 2017, 01:46
Forum: Bug Reports
Topic: Excessive page faults with Process,Exist
Replies: 19
Views: 6270

Re: Excessive page faults with Process,Exist

The GetProcessImageFileName function returns the path in device form, rather than drive letters . For example, the file name C:\Windows\System32\Ctype.nls would look as follows in device form: \Device\Harddisk0\Partition1\Windows\System32\Ctype.nls [...] To retrieve the name of the main executable ...
by pneumatic
25 May 2017, 23:14
Forum: Bug Reports
Topic: Excessive page faults with Process,Exist
Replies: 19
Views: 6270

Re: Excessive page faults with Process,Exist

My guess is that you have forgotten that you are using SplitPath to strip away the directory. Actually I was mistaken because the GetProcessImageFileName article says "Retrieves the name of the executable file for the specified process" whereas the GetModuleFileNameEx article says "Retrieves the fu...
by pneumatic
25 May 2017, 22:59
Forum: Bug Reports
Topic: Excessive page faults with Process,Exist
Replies: 19
Views: 6270

Re: Excessive page faults with Process,Exist

Thank you, that explains a lot. Your help has been absolutely invaluable here! So in fact I should read in the whole process list to a single memory object such as a string or an array of elements, and then search through it for a match to any of my game .exe's, which are also already in memory. Tha...

Go to advanced search