Search found 78 matches

by 1100++
13 Jun 2019, 16:08
Forum: Ask For Help
Topic: Problem with Dynamic Script Function
Replies: 17
Views: 2160

Re: Problem with Dynamic Script Function

On my first attempt, I closed the file handle with CloseHandle(). I commented it out to see what effect that would have. It's still present in the code I posted.
by 1100++
13 Jun 2019, 15:29
Forum: Ask For Help
Topic: Problem with Dynamic Script Function
Replies: 17
Views: 2160

Problem with Dynamic Script Function

I'm trying to write a (fast) function that will run AutoHotkey scripts dynamically from memory. RunDynamicScript(script, scriptname := "", WorkingDir := "") { static scriptdir := A_MyDocuments "\AutoHotkey\Dynamic Scripts", defaults := "#NoEnv`n#SingleInstance Off`nSetBatchLines -1`nSendMode Input`n...
by 1100++
12 Jun 2019, 20:08
Forum: Ask For Help
Topic: Problem with WScript.Shell
Replies: 9
Views: 1252

Re: Problem with WScript.Shell

Why?
by 1100++
12 Jun 2019, 19:55
Forum: Ask For Help
Topic: Problem with WScript.Shell
Replies: 9
Views: 1252

Re: Problem with WScript.Shell

32-bit or 64?
by 1100++
12 Jun 2019, 19:48
Forum: Ask For Help
Topic: Problem with WScript.Shell
Replies: 9
Views: 1252

Re: Problem with WScript.Shell

What type of system are you running?
by 1100++
12 Jun 2019, 18:52
Forum: Ask For Help
Topic: Problem with WScript.Shell
Replies: 9
Views: 1252

Re: Problem with WScript.Shell

Did you run it? I get error 0x800A0005.
by 1100++
12 Jun 2019, 18:46
Forum: Ask For Help
Topic: GetClassNN() Not Working Topic is solved
Replies: 15
Views: 1549

Re: GetClassNN() Not Working Topic is solved

I did a speed test comparing your function to mine; mine appears to be almost twice as fast as yours. I'm pretty sure it's because you use GetClassName instead of GetClassWord.
by 1100++
12 Jun 2019, 18:21
Forum: Ask For Help
Topic: GetClassNN() Not Working Topic is solved
Replies: 15
Views: 1549

Re: GetClassNN() Not Working Topic is solved

How's this? GetClassNN(hWnd) { static (Class, VarSetCapacity(Class, 257 << (A_IsUnicode = true))), Callback := RegisterCallback("[email protected]", "Fast", 2) return (Main := DllCall("GetAncestor", "Ptr", hWnd, "Int", 2, "UPtr")) = hWnd ? "" : [email protected](hWnd) ? DllCall("GetClassName", "Ptr"...
by 1100++
12 Jun 2019, 16:59
Forum: Ask For Help
Topic: GetClassNN() Not Working Topic is solved
Replies: 15
Views: 1549

Re: GetClassNN() Not Working Topic is solved

I tried to do my own test, but your function doesn't seem to be working. Can you check my code? #NoEnv SetBatchLines -1 DllCall("QueryPerformanceFrequency", "Int64*", freq) Loop 24 Gui Add, Text Gui Add, Text, hWndhWnd DllCall("QueryPerformanceCounter", "Int64*", p) Loop 1000 ClassNN1 := GetClassNN1...
by 1100++
12 Jun 2019, 14:37
Forum: Ask For Help
Topic: GetClassNN() Not Working Topic is solved
Replies: 15
Views: 1549

Re: GetClassNN() Not Working Topic is solved

This is faster. GetClassNN(hWnd) { static (Class, VarSetCapacity(Class, 257 << A_IsUnicode)), Callback := RegisterCallback("[email protected]", "Fast", 2) return (hMain := DllCall("GetAncestor", "Ptr", hWnd, "Int", 2, "UPtr")) = hWnd ? "" : [email protected](hWnd) ? DllCall("GetClassName", "Ptr", hW...
by 1100++
11 Jun 2019, 18:08
Forum: Ask For Help
Topic: GetClassNN() Not Working Topic is solved
Replies: 15
Views: 1549

Re: GetClassNN() Not Working Topic is solved

I just figured out what was wrong. It was at line 3. The expression in front of the If wasn't being treated as one, so the function never retrieved the hMain value required for the EnumChildWindows clall to work properly. I fixed it. Here's my updated function: GetClassNN(hWnd) { static (Class, VarS...
by 1100++
11 Jun 2019, 16:54
Forum: Ask For Help
Topic: GetClassNN() Not Working Topic is solved
Replies: 15
Views: 1549

Re: GetClassNN() Not Working Topic is solved

This also fails: GetClassNN(hWnd) { static (Class, VarSetCapacity(Class, 514)), EnumProc := RegisterCallback("[email protected]", "Fast", 2) If hWnd == (hMain := DllCall("GetAncestor", "Ptr", hWnd, "Int", 2, "UPtr")) return 0 If not Atom := DllCall("GetClassWord", "Ptr", hWnd, "Int", -32, "UShort") ...
by 1100++
10 Jun 2019, 22:00
Forum: Ask For Help
Topic: GetClassNN() Not Working Topic is solved
Replies: 15
Views: 1549

GetClassNN() Not Working Topic is solved

Why isn't this function working? (It keeps returning -2.) GetClassNN(hWnd) { static (Class, VarSetCapacity(Class, 514)), EnumProc := RegisterCallback("[email protected]", "Fast", 2) If hWnd == (hMain := DllCall("GetAncestor", "Ptr", hWnd, "Int", 2, "UPtr")) return 0 If not Atom := DllCall("GetClassW...
by 1100++
10 Jun 2019, 21:52
Forum: Forum Issues
Topic: Want to Delete My Account
Replies: 2
Views: 960

Re: Want to Delete My Account

Nevermind, I don't want to anymore.
by 1100++
09 Jun 2019, 21:42
Forum: Forum Issues
Topic: Want to Delete My Account
Replies: 2
Views: 960

Want to Delete My Account

How do I delete my account?
by 1100++
07 Jun 2019, 21:38
Forum: Ask For Help
Topic: Problem with WScript.Shell
Replies: 9
Views: 1252

Problem with WScript.Shell

Why is this script throwing an error? #NoEnv SetBatchLines -1 MsgNote("⁹") return MsgNote(Text, Title := "") { Loop { Run notepad,, hide UseErrorLevel, PID If (ErrorLevel = 0) Break MsgBox 0x33, Error, ( LTrim There was a problem running Notepad. Display the text in a message box? Click Yes to displ...
by 1100++
05 Jun 2019, 18:24
Forum: Ask For Help
Topic: SoundBeep Floating-Point Frequencies
Replies: 1
Views: 294

SoundBeep Floating-Point Frequencies

Does SoundBeep accept a floating-point input for its Frequency parameter? If so, does it play that precise frequency? For example, will SoundBeep play a beep of precisely 110.25 Hz?
by 1100++
22 Apr 2019, 01:11
Forum: Ask For Help
Topic: Windows 7 to Windows 10: Having to Reload Script
Replies: 15
Views: 2526

Re: Windows 7 to Windows 10: Having to Reload Script

Did you use EnableUIAccess on an executable other than AutoHotkey?
by 1100++
21 Apr 2019, 01:16
Forum: Ask For Help
Topic: Windows API: Resolve Execution Target
Replies: 5
Views: 1124

Windows API: Resolve Execution Target

Is there a Windows API function callable via DllCall() that resolves a target the way it would be if passed to the ShellExecute() API function (without running it)?
by 1100++
13 Feb 2019, 19:38
Forum: Ask For Help
Topic: Arctan Help
Replies: 1
Views: 398

Arctan Help

Why aren't these equal? SetFormat FloatFast, 0.15 MsgBox % "tan(atan(1)): " tan(atan(1)) "`n`ntan(arctan(1)): " tan(arctan(1)) return arctan(x) { lasttheta := theta := 0 Loop 2 x := x / (sqrt(x * x + 1) + 1) Loop { theta += 4 * (A_Index & 1 ? 1 : -1) * x ** (2 * A_Index - 1) / (2 * A_Index - 1) If (...

Go to advanced search