Search found 404 matches

by SirRFI
20 May 2018, 03:05
Forum: Gaming
Topic: Can you make me a repeating script that repeats /!rtv and /!revoke in that order with F5 and stop with F3 Topic is solved
Replies: 3
Views: 733

Re: Can you make me a repeating script that repeats /!rtv and /!revoke in that order with F5 and stop with F3 Topic is solved

Generally, having a loop in hotkey isn't the best idea. Following also allows you to extend the script by any number of things you want to send without duplicating code. SendMode, Input to_repeat := ["/!rtv", "/!revoke"] return F5::SetTimer, repeat, ON F3::SetTimer, repeat, OFF repeat: loop % to_rep...
by SirRFI
19 May 2018, 15:10
Forum: Ask For Help
Topic: Randomising lines that are entered Topic is solved
Replies: 5
Views: 936

Re: Randomising lines that are entered Topic is solved

Looks like the question from discord. As recap, author was satisfied with following: ^q::pause, toggle ^F1:: loop { Random, OutputVar , 3, 5 Loop, %OutputVar% { Random ranSleep, 100, 200 sleep %ranSleep% sendinput {raw}Welcome! Random ranSleep, 100, 200 sleep %ranSleep% send {enter} } phrases := ["t...
by SirRFI
15 May 2018, 16:44
Forum: Ask For Help
Topic: Can someone assist with this Loop statement?
Replies: 9
Views: 1221

Re: Can someone assist with this Loop statement?

Seems like a part of bigger code. Are you sure the code flow gets to this part? Maybe window with such title is simply not detected? I'd recommend using ahk_exe if possible. There's a chance this will help: Send, !r!r loop { if WinExist("Payment Processor Error") { WinActivate, Payment Processor Err...
by SirRFI
15 May 2018, 16:35
Forum: Ask For Help
Topic: I need help with a small script
Replies: 3
Views: 522

Re: I need help with a small script

Code: Select all

XButton1::LCtrl
by SirRFI
12 May 2018, 11:00
Forum: Ask For Help
Topic: Remap a key on US keyboard Topic is solved
Replies: 4
Views: 663

Re: Remap a key on US keyboard Topic is solved

No need to be afraid about "screwing something up" - things done by the script works as long as the script it on only.
by SirRFI
12 May 2018, 08:12
Forum: Ask For Help
Topic: Hotstring repeated after hitting the ending char twice
Replies: 3
Views: 634

Re: Hotstring repeated after hitting the ending char twice

Consider using #SingleInstance force
by SirRFI
12 May 2018, 08:10
Forum: Ask For Help
Topic: I want this program to pause at a specific line
Replies: 3
Views: 790

Re: I want this program to pause at a specific line

Your code could be significantly reduced in size, especially in the GUI parts which could be generated in loop.

To answer the question - MsgBox stops code execution until the window is closed.
by SirRFI
12 May 2018, 08:04
Forum: Ask For Help
Topic: Specific random string Topic is solved
Replies: 10
Views: 1254

Re: Specific random string Topic is solved

from looking at these i can see a few rules: 1 . only "BCDEF" and "01235679" 2 . number will not have a duplicate. 3 . letter can have a duplicate, but only max 1 4 . make check in string must exist at least 3-4 letters 5 . string always end with a number is it possible in autohotkey make complex r...
by SirRFI
10 May 2018, 16:13
Forum: Ask For Help
Topic: Can't figure out how to leave loop
Replies: 9
Views: 1450

Re: Can't figure out how to leave loop

Your blink label is within a function, which is likely improper. Is master_mute defined somewhere?
by SirRFI
09 May 2018, 12:10
Forum: AutoHotkey v2 Development
Topic: New icons for v2
Replies: 14
Views: 3235

Re: New icons for v2

I don't know - I find nothing wrong with the icons we have, and especially the file extension. ahk is the common abbreviation for AutoHotkey - I would like to keep that, and I don't like things like ah2 or four letter combinations for file extensions like ahk2 - although that still would be much be...
by SirRFI
08 May 2018, 16:10
Forum: Ask For Help
Topic: Hotstring function with ahk code as replacement
Replies: 14
Views: 1565

Re: Hotstring function with ahk code as replacement

Perhaps this would work out:

Code: Select all

Str  := "::test"
MyFunc := "MyMsgBox"
MyArg := "How about this?"
Hotstring(Str, Func(MyFunc).Bind(MyArg))

MyMsgBox(msg)
{
	MsgBox % msg
}
But then, you'd have to make sure MyFunc is a function, which may be an issue in v1, since plenty are commands.
by SirRFI
07 May 2018, 17:06
Forum: Ask For Help
Topic: Help with simple code. Topic is solved
Replies: 3
Views: 727

Re: Help with simple code. Topic is solved

Deprecated: This command is not recommended for use in new scripts. Use the WinActive function instead. It's there for a reason. Try this?: If (!WinActive("AOL Desktop Gold")) ; the ! means it's NOT active { MouseMove, 389, 1027 sleep 1000 Click MouseMove, 90, 78 sleep 1000 click MouseMove, 590,190...
by SirRFI
07 May 2018, 17:01
Forum: Ask For Help
Topic: Hotstring function with ahk code as replacement
Replies: 14
Views: 1565

Re: Hotstring function with ahk code as replacement

Use BoundFunc

Code: Select all

Str  := "::test" ; changed only for quick test
Code := "This is it!"
Hotstring(Str, Func("MyMsgBox").Bind(Code))

MyMsgBox(msg)
{
	MsgBox % msg
}
by SirRFI
07 May 2018, 16:51
Forum: Ask For Help
Topic: Can't figure out how to leave loop
Replies: 9
Views: 1450

Re: Can't figure out how to leave loop

You can exit loops using break. However, you'd likely want to use while instead, or alternatively SetTimer.
by SirRFI
07 May 2018, 10:24
Forum: AutoHotkey v2 Development
Topic: New icons for v2
Replies: 14
Views: 3235

Re: New icons for v2

While on it, I suggest to change default file extension, so it's another layer telling between v1 and v2, which should also help editors in syntax highlighting & suggestions/filling.
by SirRFI
06 May 2018, 08:59
Forum: Ask For Help
Topic: If it is over the cursor.
Replies: 11
Views: 1442

Re: If it is over the cursor.

One of the solutions is to check cursor's current absolute position and check if it's within fixed rectangle area (at the bottom or wherever you have the taskbar at).
by SirRFI
04 May 2018, 17:58
Forum: Ask For Help
Topic: Trouble with Auto-replacing `t
Replies: 3
Views: 635

Re: Trouble with Auto-replacing `t

That's because ` is an escape character in AHK by default. Untested, but escaping it, like ``t might do the trick. Or simply changing EscapeChar.
by SirRFI
04 May 2018, 09:40
Forum: Ask For Help
Topic: simple toggle 3 times
Replies: 2
Views: 549

Re: simple toggle 3 times

As said above, you are overwriting your "toggle process" variable ( f1state ) in second line, by always setting it to 0 first. If I may suggest something extra: F1:: f1state++ ; increase the value everytime you press F1 if (f1state = 1) { MsgBox, 1 } else if (f1state = 2) { MsgBox, 2 } else if (f1st...
by SirRFI
04 May 2018, 09:26
Forum: Ask For Help
Topic: Need Regular Expression (RegEx, RegExMatch)
Replies: 8
Views: 1120

Re: Need Regular Expression (RegEx, RegExMatch)

It's rather simple, did you try? Add up more tests to see if works as intended. tests := ["0101", "1 - 1", "abc", "A H k", "AHK v1.1.28.02"] patterns := ["^[\d -]+$", "^[0-9A-Za-z -]+$"] output := "" for key1, test in tests { for key2, pattern in patterns output .= "tests[" key1 "] is '" test "' `np...

Go to advanced search