Search found 2240 matches

by Helgef
Today, 03:47
Forum: Ask For Help
Topic: Get path of active window's directory
Replies: 1
Views: 9

Re: Get path of active window's directory

See winGet and winActive , eg, f1:: WinGet, activePath, ProcessPath, % "ahk_id" winActive("A") ; activePath is the output variable and can be named anything you like, ProcessPath is a fixed parameter, specifying the action of the winget command. msgbox % activePath return Also se...
by Helgef
Yesterday, 12:52
Forum: Ask For Help
Topic: ternary operator Topic is solved
Replies: 11
Views: 74

Re: ternary operator Topic is solved

Hello :wave: Another one, (choice = "left" || choice = "right") ? f__move(choice) : (choice = "up" || choice = "down") ? f__different_function(choice) : f__else(choice) Eg, for k, choice in ["left","right","up","down",&q...
by Helgef
Yesterday, 11:39
Forum: Bug Reports
Topic: BoundFunc Cannot Be Used Directly As Function Parameter?
Replies: 3
Views: 36

Re: BoundFunc Cannot Be Used Directly As Function Parameter?

Np, for your reference, settimer has the same limitation.

Cheers.
by Helgef
Yesterday, 11:39
Forum: Ask For Help
Topic: How to copy a variable Topic is solved
Replies: 2
Views: 40

Re: How to copy a variable Topic is solved

Hello try this, copyVar(byref src,byref dest,count:=""){ ; Url: ; - https://msdn.microsoft.com/en-us/library/dswaw1wk.aspx /* void *memcpy( void *dest, const void *src, size_t count ); */ if !count count:=varsetcapacity(src)+(A_IsUnicode?2:1) varsetcapacity(dest,count) dllcall("MSVCRT...
by Helgef
Yesterday, 10:19
Forum: Bug Reports
Topic: BoundFunc Cannot Be Used Directly As Function Parameter?
Replies: 3
Views: 36

Re: BoundFunc Cannot Be Used Directly As Function Parameter?

Hotkey - label wrote:If not a valid label name, this parameter can be the name of a function, or a single variable reference containing a function object. For example, Hotkey(funcobj, "On"). Other expressions which return objects are currently unsupported.
(my bold)
source
by Helgef
Yesterday, 07:14
Forum: Ask For Help
Topic: Using variables
Replies: 2
Views: 35

Re: Using variables

Hello and welcome.
There is nothing wrong with your script. It displays 12 in the message box. If that code is part of a larger script, you need to consider the auto execute section. Also, see the tutorial.
by Helgef
Yesterday, 01:04
Forum: Ask For Help
Topic: Simple Question: How do I make my hotkey lines neater
Replies: 2
Views: 30

Re: Simple Question: How do I make my hotkey lines neater

You can use a for loop. Eg, CustomHotkey = A for k, modifier in ["","+","!","^"] Hotkey, % modifier CustomHotkey, CustomHotkey return ; Return here to avoid running the CustomHotkey routine on script starup. CustomHotkey: SendInput, {C down} SendInput, {C up} ...
by Helgef
19 Oct 2017, 17:16
Forum: Scripts and Functions
Topic: convert coordinates between Client/Screen/Window modes
Replies: 5
Views: 122

Re: convert coordinates between Client/Screen/Window modes

for a quick copy-and-paste without/with few dependencies. That is reasonable. Btw would such a function be very useful to you? Not really at moment. However, you made most of the work already, so it slightly bothers me, that once I need it, there is work waiting ;) . But please, no hurry or presure...
by Helgef
19 Oct 2017, 16:42
Forum: Scripts and Functions
Topic: convert coordinates between Client/Screen/Window modes
Replies: 5
Views: 122

Re: convert coordinates between Client/Screen/Window modes

Hello jeeswg , thanks for sharing. :thumbup: Slightly longer (client to screen to window, and window to screen to client): JEE_ClientToWindow/JEE_WindowToClient Slightly shorter, JEE_ClientToWindow(...){ JEE_ClientToScreen(...) JEE_ScreenToWindow(...) } JEE_WindowToClient(...){ JEE_WindowToScreen(.....
by Helgef
19 Oct 2017, 16:22
Forum: Ask For Help
Topic: Annoying error message... Topic is solved
Replies: 2
Views: 49

Re: Annoying error message... Topic is solved

winExist might be more suitable than winActive, or use a combination of both if it is important that the window is active. To suppress the error message, see try.
Cheers.
by Helgef
18 Oct 2017, 13:19
Forum: Bug Reports
Topic: CoordMode needs a pause to update
Replies: 3
Views: 64

Re: CoordMode needs a pause to update

does that mean that Sleep, 5 , as a workaround, will definitely always work? The condition to update was if more than 5 ( > 5 ) ms had elapsed. So you need to sleep at least 6 ms, and add one times the resolution of the clock. Consider this test script, tr:=getTimerResolution() n := 6+tr loop { t1:...
by Helgef
18 Oct 2017, 12:24
Forum: Gaming
Topic: InGame v2.0
Replies: 67
Views: 23849

Re: InGame v2.0

You have some interesting stuff here. I only
browsed the first page for now. The switch is nifty . I think you need a table of contents though ;)
Thanks for sharing, cheers :thumbup:
by Helgef
18 Oct 2017, 06:31
Forum: Scripts and Functions
Topic: DragToScroll - updated
Replies: 2
Views: 116

Re: DragToScroll - updated

Hello guest3456 :wave:
Very nice one, thanks for sharing :thumbup:
It seems to work very well, I'd say it has good value even if you have a scroll wheel.

Cheers.
by Helgef
18 Oct 2017, 06:17
Forum: Ask For Help
Topic: Need to display strings instead of a hotkey label using tooltip Topic is solved
Replies: 6
Views: 102

Re: Need to display strings instead of a hotkey label using tooltip Topic is solved

Noesis , thanks for you well formulated reply. Terminology isn't always well defined or agreed upon, and often depends on context. That is why I expressed my comments as opinions. I continue expressing my opinions. I think you might be over analysing my statements. To me, an array always is associa...
by Helgef
18 Oct 2017, 06:00
Forum: Ask For Help
Topic: For Each Nested Class Topic is solved
Replies: 9
Views: 160

Re: For Each Nested Class Topic is solved

You are not required to choose an answer. You can mark your own (first) post, indicating that the topic is solved, if you are statisfied. It is a short thread, and will probably remain so. Any later visitors can scan it in search for answers.

Cheers.
by Helgef
17 Oct 2017, 16:32
Forum: Bug Reports
Topic: CoordMode needs a pause to update
Replies: 3
Views: 64

Re: CoordMode needs a pause to update

It has nothing to do with DetectHiddenWindows . AHK records a static timestamp and doesn't update unless the previous call to the function ( BIV_Caret ) was made more than 5 ms ago. Comment says, // These static variables are used to keep the X and Y coordinates in sync with each other, as a snapsho...
by Helgef
17 Oct 2017, 14:03
Forum: Offtopic
Topic: OOP design patterns in AHK
Replies: 7
Views: 54

Re: OOP design patterns in AHK

nnnik wrote:Name: super global automatically initialized Singleton

I enjoy seeing these ideas :thumbup:.
A comment to those who considers doing this, remember to put the __new method below any static class variables and methods using static variables which __new uses or calls. :!:
by Helgef
17 Oct 2017, 08:10
Forum: Scripts and Functions
Topic: DPI() - writing friendlier DPI-Aware AutoHotkey GUIs
Replies: 9
Views: 352

Re: DPI() - writing friendlier DPI-Aware AutoHotkey GUIs

You can do it either way DataLife , the function DPI() will scale the relevant numbers in the option string, and leave the appropriate options alone, then return and the options will be concatenated. Leaving it outside means one less thing to parse in the function, you will never notice, but...
by Helgef
17 Oct 2017, 08:04
Forum: Ask For Help
Topic: GetWindowLong versus GetWindowLongPtr
Replies: 10
Views: 160

Re: GetWindowLong versus GetWindowLongPtr

My guess is msdn assumes you compile a c(#/++/?) application rather than bundling a text file with the AHK software. :angel: Note: DllCall("GetWindowLong" (A_PtrSize=8 ? "Ptr" : ""), "Ptr", hWnd, "Int", -16, "PTR") Cheers :wave:

Go to advanced search