Search found 16760 matches

by boiler
Today, 20:10
Forum: Ask for Help (v1)
Topic: Minus date not working correctly
Replies: 1
Views: 14

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.
by boiler
Today, 18:48
Forum: Ask for Help (v2)
Topic: Passing GUI entry to function
Replies: 1
Views: 21

Re: Passing GUI entry to function

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...
by boiler
Today, 14:14
Forum: Ask for Help (v2)
Topic: ListBox Enter pressed event?
Replies: 1
Views: 24

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!' }
by boiler
Today, 14:01
Forum: Bug Reports
Topic: Click should return "" just like MouseClick
Replies: 12
Views: 160

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...
by boiler
Yesterday, 22:15
Forum: Ask for Help (v2)
Topic: Problems using #Include
Replies: 3
Views: 75

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...
by boiler
Yesterday, 15:14
Forum: Bug Reports
Topic: Click should return "" just like MouseClick
Replies: 12
Views: 160

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...
by boiler
Yesterday, 13:00
Forum: Gaming Help (v1)
Topic: ImageSearch reliability
Replies: 6
Views: 67

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’...
by boiler
Yesterday, 12:43
Forum: Bug Reports
Topic: Click should return "" just like MouseClick
Replies: 12
Views: 160

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...
by boiler
Yesterday, 10:24
Forum: Bug Reports
Topic: Click should return "" just like MouseClick
Replies: 12
Views: 160

Re: Click should return "" just like MouseClick

This is not a bug. There is no behavior here that is counter to the documentation. So Click should return empty string just like MouseClick, not a magic number 5369740240. Why should it? The return value is undefined. It is not defined anywhere to be an empty string or anything else. It can be anyth...
by boiler
Yesterday, 09:12
Forum: Ask for Help (v2)
Topic: refresh text in a button without reload GUI
Replies: 4
Views: 66

Re: refresh text in a button without reload GUI

Code: Select all

myGUI := Gui()
myGUI.SetFont('s8')
myGUI.AddButton('x25 y+5 w150 h32 vBtn1', 'SimpleText ON')
myGUI.AddButton('xp y+10 wp hp', 'Turn OFF').OnEvent('Click', TurnOff)
myGUI.Show

TurnOff(*) {
	myGUI['Btn1'].Text := 'SimpleText Off'
}
by boiler
Yesterday, 05:04
Forum: Gaming Help (v1)
Topic: ImageSearch reliability
Replies: 6
Views: 67

Re: ImageSearch reliability

Yes, that should activate the window if you specify the process name correctly. You should post an entire script that you are trying to use to find the image (just a minimal script containing all the necessary code for finding the image).
by boiler
Yesterday, 04:46
Forum: Ask for Help (v1)
Topic: WebBrowser reloads to center rather than top of page
Replies: 1
Views: 39

Re: WebBrowser reloads to center rather than top of page

You can’t put multiple commands on the same line like that. If you think that you are embedding Sleep commands in the Send even before you append the other stuff, you are not. You are just sending a bunch of keystrokes that are likely not being received by the window/control that is active when you ...
by boiler
Yesterday, 04:35
Forum: Ask for Help (v2)
Topic: Com word, how to delete the selection text Topic is solved
Replies: 2
Views: 51

Re: Com word, how to delete the selection text Topic is solved

You don’t need to select the text in paragraph 3 in order to delete it since its range is already defined. And to delete it, assign an empty string to the range. oWord := ComObjActive('Word.Application') oWord.ActiveDocument.Paragraphs.Item(3).Range.Text := '' Similarly, if you wanted to delete some...
by boiler
Yesterday, 04:21
Forum: Ask for Help (v1)
Topic: SoundPlay in Timer
Replies: 4
Views: 53

Re: SoundPlay in Timer

You can use SetTimer inside the function with a static variable, similar to example #5 in the SetTimer documentation, although that example is using it in a class.
by boiler
Yesterday, 04:17
Forum: Ask for Help (v2)
Topic: refresh text in a button without reload GUI
Replies: 4
Views: 66

Re: refresh text in a button without reload GUI

You haven’t shown the other relevant part of the script — the button_Clickoption1 function. That’s where you would change the button’s text.

Code: Select all

button_Clickoption1(GuiCtrl, *) {
	global Myvar_STATUS
	GuiCtrl.Text := 'Sample ' Myvar_STATUS
	Myvar_STATUS := Myvar_STATUS = 'ON' ? 'OFF' : 'ON'
}
by boiler
Yesterday, 03:59
Forum: Gaming Help (v1)
Topic: ImageSearch reliability
Replies: 6
Views: 67

Re: ImageSearch reliability

It’s looking like the issue is that the window in which the image would be found is not the active window when you run the script. That’s what Window in CcordMode means — relative to the active window.
by boiler
13 Apr 2024, 23:44
Forum: Ask for Help (v2)
Topic: Windows 11 keeps asking for default app
Replies: 3
Views: 86

Re: Windows 11 keeps asking for default app

@Londolozi — Please note that your last two topics now have been moved from “Scripts and Functions” as noted at the bottom of your posts. That section is for sharing working scripts with others, not for asking help with scripts. Please post in the proper section going forward. Thank you.
by boiler
13 Apr 2024, 14:42
Forum: Ask for Help (v2)
Topic: if not dirExists
Replies: 3
Views: 106

Re: if not dirExists

Let me explain my need. He understood your need. You are not understanding the answer: “this would not be done within the loop.” Here it is in code (where UserInput and ProdFolder are previously assigned): if not DirExist(ProdFolder '\' UserInput) DirCreate ProdFolder '\' UserInput That’s it. No lo...
by boiler
13 Apr 2024, 07:28
Forum: Ask for Help (v2)
Topic: Ho to get a value of ListBox1 control here?
Replies: 6
Views: 98

Re: Ho to get a value of ListBox1 control here?

The separate threads have been merged. @slishnevsky, please do not create new threads to continue the conversation on the same topic.
by boiler
13 Apr 2024, 04:11
Forum: Ask for Help (v1)
Topic: SoundPlay in Timer
Replies: 4
Views: 53

Re: SoundPlay in Timer

You can use a faster timer, and when it detects the window present, after playing the sound, perform a Sleep for 18 seconds before returning, so the next iteration won’t occur until after it is complete.

Go to advanced search