Search found 27135 matches

by mikeyww
Today, 18:28
Forum: Ask for Help (v2)
Topic: Progress bar and (not) Sleep
Replies: 3
Views: 137

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
Today, 17:00
Forum: Ask for Help (v2)
Topic: Progress bar and (not) Sleep
Replies: 3
Views: 137

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
Today, 09:04
Forum: Ask for Help (v1)
Topic: [ahk v1] about '::' hotkey with 'send key' Topic is solved
Replies: 16
Views: 843

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
Today, 08:11
Forum: Ask for Help (v1)
Topic: FormatTime inside of Loop not working
Replies: 1
Views: 193

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
Yesterday, 19:29
Forum: Ask for Help (v2)
Topic: How to hold one key to change behavior of another key
Replies: 2
Views: 128

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
Yesterday, 17:14
Forum: Ask for Help (v1)
Topic: Need to use RegExMatch to get info. Please help.
Replies: 2
Views: 256

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
Yesterday, 13:30
Forum: Ask for Help (v2)
Topic: How to Send text as one string?
Replies: 6
Views: 375

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
Yesterday, 10:15
Forum: Ask for Help (v2)
Topic: How to Send text as one string?
Replies: 6
Views: 375

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
Yesterday, 09:15
Forum: Ask for Help (v1)
Topic: [ahk v1] about '::' hotkey with 'send key' Topic is solved
Replies: 16
Views: 843

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
Yesterday, 08:16
Forum: Ask for Help (v1)
Topic: [ahk v1] about '::' hotkey with 'send key' Topic is solved
Replies: 16
Views: 843

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...
by mikeyww
Yesterday, 07:16
Forum: Ask for Help (v1)
Topic: [ahk v1] about '::' hotkey with 'send key' Topic is solved
Replies: 16
Views: 843

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

OK. In v2, aside from labeled subroutines used with Goto or loops, code outside your functions will execute only when the script is first run. You do not need a variable called "Suspended" since AHK has a built-in variable for this status.
by mikeyww
Yesterday, 05:30
Forum: Ask for Help (v1)
Topic: [ahk v1] about '::' hotkey with 'send key' Topic is solved
Replies: 16
Views: 843

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

What the script does: Configure the RButton as the q-key, while also enabling it to transmit a "c" upon being pressed. If you want to send Q down and up upon the RButton press instead of having RButton act as Q , then you do not need the key-up hotkey. On the other hand, to keep what you have and ad...
by mikeyww
11 May 2024, 22:25
Forum: Ask for Help (v1)
Topic: I have a script, but i need this script have a "on/off button"
Replies: 1
Views: 214

Re: I have a script, but i need this script have a "on/off button"

Welcome to this AutoHotkey forum! #Requires AutoHotkey v1.1.33.11 F3:: on := !on SoundBeep 1000 + 500 * on Return #If on ~LButton:: KeyWait LButton, T.2 If ErrorLevel While GetKeyState("LButton", "P") { Click Sleep 25 } Return #If If you are new to AHK, I recommend using its current version, which i...
by mikeyww
11 May 2024, 21:52
Forum: Ask for Help (v2)
Topic: works in IDE, won't work “in the field”
Replies: 4
Views: 205

Re: works in IDE, won't work “in the field”

Hello,

From what you described, you are running a script other than the script that you have posted. I recommend posting the script that demonstrates the problem that you are experiencing.
by mikeyww
11 May 2024, 21:22
Forum: Ask for Help (v1)
Topic: [ahk v1] about '::' hotkey with 'send key' Topic is solved
Replies: 16
Views: 843

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

Just another idea here.

Code: Select all

#Requires AutoHotkey v2.0
*RButton::   Send('{Blind}{q DownR}'), Send('c')
*RButton Up::Send('{Blind}{q up}')
by mikeyww
11 May 2024, 13:20
Forum: Ask for Help (v2)
Topic: WinExist can't detect a running script. Topic is solved
Replies: 1
Views: 213

Re: WinExist can't detect a running script. Topic is solved

The following worked here. If your script is in a different directory, it will fail. Finding out is easy: open the script's window. This does not require admin privileges, so test without it. Learning the value returned by WinExist does not require any If statement. #Requires AutoHotkey v2.0 F1:: { ...
by mikeyww
11 May 2024, 11:48
Forum: Ask for Help (v2)
Topic: Re: WinWaitActive( ... ) for all windows with any title but no without title
Replies: 2
Views: 85

Re: Re: WinWaitActive( ... ) for all windows with any title but no without title

Code: Select all

#Requires AutoHotkey v2.0
SetTitleMatchMode 'RegEx'
WinWaitActive '.'
MsgBox WinGetTitle(), 'Window title', 'Iconi'

Go to advanced search