Search found 29 matches

by slishnevsky
11 May 2024, 19:10
Forum: Ask for Help (v2)
Topic: How to Send text as one string?
Replies: 6
Views: 369

How to Send text as one string?

Hello.

I was playing with the Send command.
It seems it can only send text character by character, like typing.
I was wondering if it is possible to send a text as a whole string?

Thanks.
by slishnevsky
09 May 2024, 04:27
Forum: Ask for Help (v2)
Topic: How to define an action if any typing key is pressed?
Replies: 2
Views: 115

How to define an action if any typing key is pressed?

How to define an action if any typing key is pressed?
By typing key I mean letters, numbers, special characters like quotes, #, $, % etc...?
I want to use #Hot syntax to catch only these characters.
Thanks
by slishnevsky
29 Apr 2024, 13:40
Forum: Ask for Help (v2)
Topic: Send vs SendText vs SendInput for text input?
Replies: 2
Views: 338

Send vs SendText vs SendInput for text input?

Hi. I couldn't understand from the documentation which is the best method to send text into text field in terms of speed? When I do this in Twitter reply, any of these methods work quite slow and part-by-part for just one sentence. It takes about 2-3 seconds to send text into the input field. Why is...
by slishnevsky
15 Apr 2024, 13:31
Forum: Ask for Help (v2)
Topic: ListBox Enter pressed event?
Replies: 8
Views: 265

ListBox Enter pressed event?

Hello. Is there an Enter pressed event for ListBox in AHK 2? Let's say I selected an item in ListBox, and I want to submit it by pressing Enter key? Is it possible, like using OnEvent() method for example? Something like MyListBox.OnEvent('Enter', EnterPressed) I know there is no "Enter" event for L...
by slishnevsky
12 Apr 2024, 18:09
Forum: Ask for Help (v2)
Topic: Ho to get a value of ListBox1 control here?
Replies: 6
Views: 138

How to get a value of ListBox1 control here (conitnue)?

This is a continuation of my previous thread [Moderator note: Now the same thread.] Still struggling with passing a value selected in the ListBox back to the Hotkey code, the result variable. So I have a ButtonClicked event handler, fine, not sure if it is needed at all. In the Hotkey code I show th...
by slishnevsky
12 Apr 2024, 16:24
Forum: Ask for Help (v2)
Topic: Ho to get a value of ListBox1 control here?
Replies: 6
Views: 138

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

flyingDman Cool. Thanks !! Can I do this inline, without external click event handler function? I need ListBoxGetChoice() function to return ListBox1 selected option when I click Submit button. Something like this: Ins:: result := ListBoxGetChoice() ; Ins Hotkey to call a function that displays a p...
by slishnevsky
12 Apr 2024, 16:08
Forum: Ask for Help (v2)
Topic: Ho to get a value of ListBox1 control here?
Replies: 6
Views: 138

Ho to get a value of ListBox1 control here?

Hello. How to get a value of ListBox1 control here? Thanks. Home:: { MyGui := Gui('AlwaysOnTop') MyGui.AddText(, "Select category") ListBox1 := MyGui.AddListBox('r6 vCategoryChoice', ['Option1', 'Option2', 'Option3', 'Option4', 'Option5', 'Option6']) MyBtn1 := MyGui.AddButton('Default w80', 'Submit'...
by slishnevsky
08 Apr 2024, 00:11
Forum: Ask for Help (v2)
Topic: Complaining on "try" statement Topic is solved
Replies: 5
Views: 199

Re: Complaining on "try" statement Topic is solved

@boiler

Yes! Worked. Thank you.
by slishnevsky
07 Apr 2024, 22:48
Forum: Ask for Help (v2)
Topic: Complaining on "try" statement Topic is solved
Replies: 5
Views: 199

Re: Complaining on Try statement Topic is solved

Try is not a valid part of an expression which you are trying to define as part of a fat arrow function. The syntax for that is () => expr , where expr is an expression. Makes sense. Then, how should I stop playing audio there? If I move try SoundPlay('Nonexistent.mp3') outside the arrow function, ...
by slishnevsky
07 Apr 2024, 21:21
Forum: Ask for Help (v2)
Topic: Complaining on "try" statement Topic is solved
Replies: 5
Views: 199

Complaining on "try" statement Topic is solved

Hi. Why is AHK complaining on try statement? CreateTimer() { timeout := InputBox('Set timer interval (in minutes)', 'Timer').Value if (!IsInteger(timeout)) Exit SetTimer(() => ( SoundPlay('WakeUp.mp3') MsgBox('Сработал таймер!', 'Таймер', 'Icon! OK') try SoundPlay('Nonexistent.mp3') ; Complains on t...
by slishnevsky
05 Apr 2024, 08:12
Forum: Ask for Help (v2)
Topic: How to reuse Gui window?
Replies: 7
Views: 244

Re: How to reuse Gui window?

Rohwedder wrote:
05 Apr 2024, 07:40
@slishnevsky
Do you mean with
When I call this function from other places
other scripts that contain a copy of this function?
What? No. One script file, other places in code
by slishnevsky
04 Apr 2024, 17:13
Forum: Ask for Help (v2)
Topic: How to reuse Gui window?
Replies: 7
Views: 244

Re: How to reuse Gui window?

You didn't understand.
Each time I call ShowMessageBox() it will create a new instance.
Take a look, this is a countdown timer:
image.png
image.png (1.58 MiB) Viewed 220 times
by slishnevsky
04 Apr 2024, 13:35
Forum: Ask for Help (v2)
Topic: How to reuse Gui window?
Replies: 7
Views: 244

How to reuse Gui window?

Hello. I have this simple function that creates a Gui window (borderless blue window) that stays visible for 1 second: ShowMessageBox(message, stay := 0) { MyGui := Gui('-ToolWindow +Border -Caption +AlwaysOnTop') MyGui.BackColor := '007ACC' MyGui.SetFont('s30 cWhite', 'Roboto') MyGui.AddText('Cente...
by slishnevsky
29 Mar 2024, 19:59
Forum: Ask for Help (v2)
Topic: Why am I getting this error executing DateDiff function?
Replies: 2
Views: 54

Why am I getting this error executing DateDiff function?

Why am I getting this error executing DateDiff function?

image.png
image.png (39.72 KiB) Viewed 54 times
by slishnevsky
29 Mar 2024, 19:45
Forum: Ask for Help (v2)
Topic: How NOT to display AHK icon on the taskbar when script is running?
Replies: 4
Views: 173

How NOT to display AHK icon on the taskbar when script is running?

How NOT to display AHK icon on the taskbar when script is running? image.png On this screenshot the script is running, and AHK icon is displayed by default in the taskbar, thus intercepting a focus (when you are playing a fullscreen game, for example). Is there any way NOT to display it? Is there an...
by slishnevsky
26 Mar 2024, 12:06
Forum: Ask for Help (v2)
Topic: Why the interpreter complains about multiple statements inside an arrow function?
Replies: 3
Views: 184

Why the interpreter complains about multiple statements inside an arrow function?

Hello.

I was wondering why the interpreter complains about multiple statements inside an arrow function:

Code: Select all

  SetTimer(() => {
    color := PixelGetColor(270, 360)
    ShowMessageBox('Uploading "' filename '"...')
  }, 1000)
image.png
image.png (12.98 KiB) Viewed 184 times
by slishnevsky
19 Mar 2024, 20:01
Forum: Visual Studio Code
Topic: Why does it show this syntax as an error?
Replies: 2
Views: 210

Why does it show this syntax as an error?

Hi.

The code actually works, but for some reason in VSCode it shows as an error on this line:
image.png
image.png (26.06 KiB) Viewed 210 times
In the documentation, it has the same syntax:

https://www.autohotkey.com/docs/v2/lib/MouseGetPos.htm#Examples

Any idea what syntax checker is complaining about?

Thanks.
by slishnevsky
19 Mar 2024, 07:07
Forum: Off-topic Discussion
Topic: Report False-Positives To Anti-Virus Companies
Replies: 119
Views: 988349

Re: Report False-Positives To Anti-Virus Companies

Two questions: How can I as a user detect if it is a virus or false-positive? Is there some sort of scanner that can detect if it is a false-positive or a virus? Windows defender, when it scans downloaded file (which I know is safe, just a cracked version), it always finds some "viruses" in it and s...
by slishnevsky
19 Mar 2024, 06:54
Forum: Ask for Help (v2)
Topic: How to hide Windows 10 Sound window?
Replies: 5
Views: 160

Re: How to hide Windows 10 Sound window?

Rohwedder wrote:
19 Mar 2024, 01:34
The sound scrollbar window is suppressed here. Which window did you mean?
Do you want to suppress Justin Trudeau?

Yes! That one!
You know, it shows up globally on Windows.

image.png
image.png (54.83 KiB) Viewed 87 times
by slishnevsky
18 Mar 2024, 17:35
Forum: Ask for Help (v2)
Topic: How to hide Windows 10 Sound window?
Replies: 5
Views: 160

Re: How to hide Windows 10 Sound window?

Thank you.
Have you tried it?
Doesn't work for me.
The window is still showing up.

Go to advanced search