You’re making up syntax and still expecting the code to work for some reason. Actually, ChatGPT wrote it, didn’t it?
Search found 16772 matches
- 6 minutes ago
- Forum: Ask for Help (v1)
- Topic: How to toggle the app on the Taskbar
- Replies: 1
- Views: 11
- Today, 15:58
- Forum: Ask for Help (v2)
- Topic: Filecopy Topic is solved
- Replies: 3
- Views: 41
Re: Filecopy Topic is solved
No one has ever moved your posts that are asking for help to "Scripts and Functions". Look at your posts and note which sub-forum they are in, which you can do by clicking on the link for your post count. Not one of them appears there because we have moved them to "Ask for Help" and noted it each ti...
- Today, 15:46
- Forum: Ask for Help (v2)
- Topic: Filecopy Topic is solved
- Replies: 3
- Views: 41
Re: Filecopy Topic is solved
Londolozi -- Please acknowledge this time that you have read and understood this: Please stop posting questions in "Scripts and Functions(v2)" as that sub-forum is for sharing finished scripts with others, not for asking for help with your scripts. We will just start disapproving your posts rather ...
- Today, 14:39
- Forum: Ask for Help (v2)
- Topic: did moving my "documents" directory break the /Libs folder? Topic is solved
- Replies: 6
- Views: 53
Re: did moving my "documents" directory break the /Libs folder? Topic is solved
No, as noted in my first post, that is a change from v1.1 to v2.0.
- Today, 14:32
- Forum: Ask for Help (v2)
- Topic: did moving my "documents" directory break the /Libs folder? Topic is solved
- Replies: 6
- Views: 53
Re: did moving my "documents" directory break the /Libs folder? Topic is solved
According to the docs (https://www.autohotkey.com/docs/v2/lib/_Include.htm) I should be able to access my functions by naming the directory they live within. No, it does not say it allows access to all functions in that directory simply by specifying the folder. It says it changes the working direc...
- Today, 13:50
- Forum: Ask for Help (v2)
- Topic: did moving my "documents" directory break the /Libs folder? Topic is solved
- Replies: 6
- Views: 53
Re: did moving my "documents" directory break the /Libs folder? Topic is solved
From the v2 documentation: Scripts are no longer automatically included from the function library (Lib) folders when a function call is present without a definition, due to increased complexity and potential for accidents (now that the MyFunc in MyFunc() can be any variable). #Include <LibName> work...
- Today, 10:12
- Forum: Ask for Help (v2)
- Topic: ListBox Enter pressed event?
- Replies: 8
- Views: 134
Re: ListBox Enter pressed event?
If you want what you assign inside the function (like the Etichetta variable) to be seen outside the function, then you need to declare it as global in the function and any other function in which you want to access it that assigns it a new value since it will assume it's local in those cases. In th...
- Today, 09:23
- Forum: Ask for Help (v2)
- Topic: ListBox Enter pressed event?
- Replies: 8
- Views: 134
Re: ListBox Enter pressed event?
It can't do the same things as the other function if you don't tell it to do those same things. Even easier, just call the other function:
Code: Select all
F9::OK_Click
- Yesterday, 20:52
- Forum: Ask for Help (v1)
- Topic: Phantom line being written?
- Replies: 3
- Views: 45
Re: Phantom line being written?
Where in the code is it doing this…? The very first time through the loop, you are assigning the first line read, followed by a linefeed character, followed by the current contents of rev, which is empty the first time through. So you start with the first line followed by a linefeed character, and ...
- Yesterday, 16:07
- Forum: Ask for Help (v2)
- Topic: function calling itself to countdown
- Replies: 2
- Views: 38
Re: function calling itself to countdown
A few issues: You define a function, but you never call it. Then you have a while loop within a recursive function, so each instance is waiting for the value to become 0. The recursive quality is already a loop, so you don't need a while loop. It would also be good not to name the global and local v...
- Yesterday, 05:45
- Forum: Bug Reports
- Topic: ":: try {throw}" still throws an error
- Replies: 4
- Views: 145
Re: ":: try {throw}" still throws an error
It does seem worth reporting that this is not getting flagged as an error, although I think this thread adequately serves that purpose whether or not this would be considered a true bug.
- Yesterday, 05:34
- Forum: Ask for Help (v1)
- Topic: Gamepad button press emulation
- Replies: 1
- Views: 19
Re: Gamepad button press emulation
AHK cannot emulate game controller button presses or other actions. There are ways to emulate a controller that are quite involved. See this post.
- 15 Apr 2024, 20:10
- Forum: Ask for Help (v1)
- Topic: Minus date not working correctly
- Replies: 2
- Views: 40
Re: Minus date not working correctly
The += operator adds to the previous value, so it keeps adding -31 to its previous value. Precede that line with DateMinus31 := A_Now so that it starts with today’s date each time.
- 15 Apr 2024, 18:48
- Forum: Ask for Help (v2)
- Topic: Passing GUI entry to function Topic is solved
- Replies: 2
- Views: 57
Re: Passing GUI entry to function Topic is solved
Remove the MyGui := Gui() from inside the function. For one thing, it doesn’t make sense to create the object twice. The other issue is you don’t want to declare it locally. Just leave the global declaration so the other function can see it. By the way, if you plan on using the hotkey more than once...
- 15 Apr 2024, 14:14
- Forum: Ask for Help (v2)
- Topic: ListBox Enter pressed event?
- Replies: 8
- Views: 134
Re: ListBox Enter pressed event?
You can do it with an invisible button that is set to Default : #Requires AutoHotkey v2.0 MyGui := Gui() MyGui.Add('ListBox', 'vColors', ['Red','Green','Blue']) MyGui.Add('Button', 'y-30 Default').OnEvent('Click', EnterPressed) MyGui.Show EnterPressed(*) { MsgBox MyGui['Colors'].Text ' was chosen!' }
- 15 Apr 2024, 14:01
- Forum: Bug Reports
- Topic: Click should return "" just like MouseClick
- Replies: 12
- Views: 177
Re: Click should return "" just like MouseClick
@boiler You made me laugh!!! Really! I liked the "even if youi write it in all caps". :D I am just expressing my opinion. Yes, we should all feel free do so in a respectful manner. But, let me ask this: Is there any statement in the v2 doc such as: A documented function may return a value that is n...
- 14 Apr 2024, 22:15
- Forum: Ask for Help (v2)
- Topic: Problems using #Include
- Replies: 6
- Views: 109
Re: Problems using #Include
It seems that you have a fundamental misunderstanding of what #Include does. You seem to be thinking it sets sort of a prefix for variable assignments or sets a root path when defining directory paths or something. #Include is for including the code lines from another file into this one. Nothing els...
- 14 Apr 2024, 15:14
- Forum: Bug Reports
- Topic: Click should return "" just like MouseClick
- Replies: 12
- Views: 177
Re: Click should return "" just like MouseClick
Doing something FOR NO REASON is very, very poor coding. ... IT IS A BUG However you may wish to characterize the programming, if it doesn't violate the documented behavior and doesn't cause code that conforms to the documentation to misbehave or crash, it's not a bug. You don't get to make up your...
- 14 Apr 2024, 13:00
- Forum: Gaming Help (v1)
- Topic: ImageSearch reliability
- Replies: 6
- Views: 79
Re: ImageSearch reliability
I asked you to post a complete script that is exactly what you would run to demonstrate your issue. Even the two snippets you posted taken together don’t do that because it doesn’t show how or where you are activating the window and defining the coordinate mode relative to the rest of the script. I’...
- 14 Apr 2024, 12:43
- Forum: Bug Reports
- Topic: Click should return "" just like MouseClick
- Replies: 12
- Views: 177
Re: Click should return "" just like MouseClick
You are conflating the documentation of how code written in AHK behaves with the internal behavior of the AHK language itself, which was not written in AHK. And even if it was, you are making an assumption that there is no return value. Again, try to understand the difference between these two conce...