Search found 27143 matches

by mikeyww
Today, 07:11
Forum: Gaming Help (v1)
Topic: Script for Minecraft :)
Replies: 7
Views: 354

Re: Script for Minecraft :)

I have already mentioned that keys might not be sent as you expect them to be sent while a mouse button is down or held. You can test this in Notepad to see what happens. That would be a fast way to troubleshoot your script initially. How you disable the script will depend on exactly what you want t...
by mikeyww
Today, 06:29
Forum: Gaming Help (v1)
Topic: Script for Minecraft :)
Replies: 7
Views: 354

Re: Script for Minecraft :)

You can test these things to see what happens. Add a timer, add a Send command, etc.
by mikeyww
Today, 05:20
Forum: Gaming Help (v1)
Topic: Script for Minecraft :)
Replies: 7
Views: 354

Re: Script for Minecraft :)

While the LButton is held, I think that the X is unlikely to be triggered or to be visible (I'm not sure which). Adjust to get what you want. #Requires AutoHotkey v1.1.33.11 #MaxThreadsPerHotkey 2 SLOW := 0 ; Speed of moving mouse cursor (0=fastest, 100=slowest) p:: If !on := !on { ; Toggle off SetT...
by mikeyww
Yesterday, 20:37
Forum: Gaming Help (v1)
Topic: Script for Minecraft :)
Replies: 7
Views: 354

Re: Script for Minecraft :)

Welcome to this AutoHotkey forum! Ideas are below; adjust as needed. #Requires AutoHotkey v1.1.33.11 #MaxThreadsPerHotkey 2 SoundBeep 2500 SetKeyDelay 25, 25 SLOW := 0 p:: If on := !on { SetTimer X, 12000 Loop { SendEvent az MouseMove 15, 0, SLOW, R } } Else Reload Return X: SendEvent x Return If yo...
by mikeyww
Yesterday, 20:10
Forum: Ask for Help (v2)
Topic: Progress bar and (not) Sleep
Replies: 7
Views: 317

Re: Progress bar and (not) Sleep

Yes, the process might run before any icon appears, so you can add sleep if needed.
by mikeyww
Yesterday, 18:55
Forum: Ask for Help (v2)
Topic: Progress bar and (not) Sleep
Replies: 7
Views: 317

Re: Progress bar and (not) Sleep

You can use the MsgBox timeout option or use a GUI.

My script used ProcessWait.
by mikeyww
Yesterday, 06:53
Forum: Ask for Help (v2)
Topic: Can the text color of a radio button be changed? Topic is solved
Replies: 8
Views: 338

Re: Can the text color of a radio button be changed? Topic is solved

This works and seems to demonstrate an AutoHotkey bug whereby the font must first be set to a non-default color. #Requires AutoHotkey v2.0 buttons := ['abc', 'def', 'ghi'] g := Gui(, 'Buttons') rad := [] defaultColor := 'Black' fontSize := 10 g.SetFont 's' fontSize ' c' defaultColor For radio in but...
by mikeyww
13 May 2024, 22:26
Forum: Ask for Help (v2)
Topic: Can the text color of a radio button be changed? Topic is solved
Replies: 8
Views: 338

Re: Can the text color of a radio button be changed? Topic is solved

Code: Select all

#Requires AutoHotkey v2.0
g := Gui()
g.SetFont 'cRed'
g.AddRadio , 'abc'
g.SetFont 'cBlue'
g.AddRadio , 'def'
g.Show
by mikeyww
13 May 2024, 18:28
Forum: Ask for Help (v2)
Topic: Progress bar and (not) Sleep
Replies: 7
Views: 317

Re: Progress bar and (not) Sleep

#Requires AutoHotkey v2.0 proc := 'Notepad.exe' SoundBeep 1500 If 'Yes' != MsgBox('Copy files?', 'Confirm', 'YNC Default2 Icon?') Return ProcessWait proc copyFiles('E:\films\*.mp4', 'D:\films') Run A_Desktop '\Run media.lnk' copyFiles(source, dest) { Static g := Gui(, 'Progress') , prog := g.AddPro...
by mikeyww
13 May 2024, 17:00
Forum: Ask for Help (v2)
Topic: Progress bar and (not) Sleep
Replies: 7
Views: 317

Re: Progress bar and (not) Sleep

Welcome to this AutoHotkey forum! Perhaps: ProcessExist You could use Loop Files to copy each file. You could then adjust the progress bar to reflect the percentage of files copied. If you use Loop Files twice, you can count the files in the first loop, and copy the files in the second loop. #Requir...
by mikeyww
13 May 2024, 09:04
Forum: Ask for Help (v1)
Topic: [ahk v1] about '::' hotkey with 'send key' Topic is solved
Replies: 16
Views: 1088

Re: [ahk v1] about '::' hotkey with 'send key' Topic is solved

If both work, then there is no better option. You can take your pick.
by mikeyww
13 May 2024, 08:11
Forum: Ask for Help (v1)
Topic: FormatTime inside of Loop not working
Replies: 2
Views: 370

Re: FormatTime inside of Loop not working

Hello, AHK commands use literal strings unless noted otherwise. Thus, you are using localtime as a string instead of a variable. This is quickly understood by examining an :arrow: example . #Requires AutoHotkey v1.1.33.11 localTime := "20200101101010" FormatTime t1, localTime , h tt FormatTime t2, a...
by mikeyww
12 May 2024, 19:29
Forum: Ask for Help (v2)
Topic: How to hold one key to change behavior of another key
Replies: 2
Views: 142

Re: How to hold one key to change behavior of another key

Welcome to this AutoHotkey forum!

Code: Select all

#Requires AutoHotkey v2.0
XButton2::XButton2
XButton2 & RButton::Click('M'), SoundBeep(1500)
by mikeyww
12 May 2024, 17:14
Forum: Ask for Help (v1)
Topic: Need to use RegExMatch to get info. Please help.
Replies: 2
Views: 352

Re: Need to use RegExMatch to get info. Please help.

Hello, I am seeing 822 lines between those tags. What is the correct output that you seek? "Doesn't work" indicates nothing in particular. What does your script do? #Requires AutoHotkey v1.1.33.11 url := "https://q.stock.sohu.com/cn/002403/cwzb.shtml" haystack := URLDownloadToVar(url) needleRegEx :=...
by mikeyww
12 May 2024, 13:30
Forum: Ask for Help (v2)
Topic: How to Send text as one string?
Replies: 6
Views: 419

Re: How to Send text as one string?

That is what I thought for a while, but I had an instance where I thought that the ClipWait made a difference. I might have been mistaken and defer to lexikos's expertise. If I encounter the problem again, I will post.
by mikeyww
12 May 2024, 10:15
Forum: Ask for Help (v2)
Topic: How to Send text as one string?
Replies: 6
Views: 419

Re: How to Send text as one string?

I would use ClipWait . #Requires AutoHotkey v2.0 str := 'I was playing with the Send command.`nIt seems it can only send text character by character,' . ' like typing.`nI was wondering if it is possible to send a text as a whole string?`n`n' str .= str str str ^+p::paste(str) paste(str) { A_Clipboar...
by mikeyww
12 May 2024, 09:15
Forum: Ask for Help (v1)
Topic: [ahk v1] about '::' hotkey with 'send key' Topic is solved
Replies: 16
Views: 1088

Re: [ahk v1] about '::' hotkey with 'send key' Topic is solved

That decision is yours, of course. The v2 forum can help with questions and problems that you may encounter. Since v2 is newer, there are fewer posts about it, and somewhat fewer script libraries, though the numbers are growing quickly. Quickly counting the most recent posts made by thread on 11 May...
by mikeyww
12 May 2024, 08:16
Forum: Ask for Help (v1)
Topic: [ahk v1] about '::' hotkey with 'send key' Topic is solved
Replies: 16
Views: 1088

Re: [ahk v1] about '::' hotkey with 'send key' Topic is solved

I'm not the authoritative source, but I don't think you'll notice any decreases in performance, and you may notice a variety of improvements with v2. Changes are summarized here. https://www.autohotkey.com/docs/v2/v2-changes.htm I did note that some lines with comma-separated statements might be slo...

Go to advanced search