Search found 278 matches

by SirRFI
11 Dec 2017, 12:38
Forum: AutoHotkey v2 Development
Topic: AHK v1 → AHK v2
Replies: 13
Views: 195

Re: AHK v1 → AHK v2

Actually I updated Coco's library to v2.0-a081-cad307c as I needed it for private project. I mostly used the JXON one though. I also suggested to add JSON support to AHK2 itself: https://autohotkey.com/boards/viewtopic.php?f=37&t=39309 JSON: /** * Lib: JSON.ahk * JSON lib for AutoHotkey. * Versi...
by SirRFI
09 Dec 2017, 08:46
Forum: Ask For Help
Topic: Swap the location of the words from clipboard Topic is solved
Replies: 16
Views: 180

Re: Swap the location of the words from clipboard Topic is solved

input := "001. string1 vs string2" If RegExMatch(input, "O)^(?<PREFIX>\d+\. )(?<STR1>.+) vs (?<STR2>.+)$", Match) { output := Match["PREFIX"] Match["STR2"] " vs " Match["STR1"] MsgBox % output } Else MsgBox % "Didn't match." Outp...
by SirRFI
03 Dec 2017, 04:12
Forum: AutoHotkey v2 Development
Topic: scrap commands?
Replies: 13
Views: 626

Re: scrap commands?

As I mentioned in the other thread - having 2 syntaxes for same thing creates inconsistency, which may also lead to confusion (especially to newcomers). Voted remove. I also use () s for control flow statements and things like #If , unless nothing comes afterwards (in example: non-condition...
by SirRFI
19 Nov 2017, 06:54
Forum: Ask For Help
Topic: ELSE with no matching IF Topic is solved
Replies: 2
Views: 56

Re: ELSE with no matching IF Topic is solved

Like stated by the user above - You missed { after if and instead of [c}[/c] - there's a { before else if . Assuming rest of the code is proper - this should work: #NoEnv SendMode Input ~CapsLock::Suspend ~End::ExitApp LButton:: RButton:: Loop { If (GetKeyState("RButton", "p") &a...
by SirRFI
19 Nov 2017, 06:38
Forum: Ask For Help
Topic: Associative Array or as an Object
Replies: 14
Views: 273

Re: Associative Array or as an Object

Thank You! how do you translate the following? O)^"(?<UID>\d+)","(?<Column1>.+)","(?<Column2>.+)","(?<Column3>.+)","(?<Column4>.+)","(?<Column5>.+)"$ O) is object mode for RegExMatch ...
by SirRFI
15 Nov 2017, 05:40
Forum: Ask For Help
Topic: Associative Array or as an Object
Replies: 14
Views: 273

Re: Associative Array or as an Object

But what happen in the command "(Join QC..." See Join . Basically it puts all the content between top-most () together, allowing to format things nicely. Q stands for quotes I think, but perhaps it's not needed in v1. C stands for comments, allowing to also put comments that won't...
by SirRFI
14 Nov 2017, 18:58
Forum: Ask For Help
Topic: Complicated search Topic is solved
Replies: 12
Views: 233

Re: Complicated search Topic is solved

What happens on these program rows? row := StrSplit(A_LoopReadLine, ";") Each line of your data is read separately, therefore A_LoopReadLine contains entire line, like: 0123;7340073855576;630026-111-09;;;0123 The line is split onto array using ; symbol. The array is saved to row variable....
by SirRFI
14 Nov 2017, 18:40
Forum: Ask For Help
Topic: Associative Array or as an Object
Replies: 14
Views: 273

Re: Associative Array or as an Object

InputData = (LTrim Join Comment "01","Field1","Field2","Field3","Field4","Field5"`n "02","Field6","Field7","Field8","Field9","Field10"`n "03","Field11","F...
by SirRFI
12 Nov 2017, 05:29
Forum: Ask For Help
Topic: Loop not exactly working
Replies: 3
Views: 87

Re: Loop not exactly working

Files := ; List of file names for testing purpose (Join QC [ "00260.mxf-01.aif", "00260.mxf-02.aif", "00260.mxf-03.aif", "FC_EVO263e_10_Missing_Pieces_Instrumental_Elias_Trevino_967690.wav-07 - Copy (2).aif", "FC_EVO263e_10_Missing_Pieces_Instrumental_El...
by SirRFI
12 Nov 2017, 05:04
Forum: Ask For Help
Topic: Is it possible to change keyboard layout only when writing in specific gui field?
Replies: 3
Views: 89

Re: Is it possible to change keyboard layout only when writing in specific gui field?

Maybe a SetTimer that would change the layout upon detecting given this would work. But more easily You could make plenty of hotkeys that work under certain #If condition.
by SirRFI
12 Nov 2017, 05:01
Forum: Ask For Help
Topic: Variadic Class Methods with Named Parameters
Replies: 1
Views: 62

Re: Variadic Class Methods with Named Parameters

I never used that before, but apparently You are right - associative array doesn't work, but if You pass indexed array ["one, "two"] - it already does. If You remove the * from function call and method definition - it works as well. What is (supposed to be) the difference between usin...
by SirRFI
11 Nov 2017, 05:37
Forum: Ask For Help
Topic: Comparison of multi-dimensional array values failing
Replies: 2
Views: 62

Re: Comparison of multi-dimensional array values failing

Can You provide sample data? Would be easier to look into it.
by SirRFI
11 Nov 2017, 05:25
Forum: Ask For Help
Topic: help with a script
Replies: 1
Views: 50

Re: help with a script

It's not even AHK to begin with. Assuming You want the most important and the lest important digit: Guess You could treat the number as string, or convert it to one, then just take the first and last character. Assuming You want the lowest and the highest digit in the entire number: Can try splittin...
by SirRFI
11 Nov 2017, 04:34
Forum: Ask For Help
Topic: Win - Loss - Draw Counter for OBS Overlay
Replies: 3
Views: 123

Re: Win - Loss - Draw Counter for OBS Overlay

It is. You'll need to make a GUI with transparent background (I guess), that has 3 text controls (can even have different controls), each displaying their corresponding variable. GuiControl allows to modify controls on the go, without recreating the GUI window.
by SirRFI
09 Nov 2017, 07:39
Forum: AutoHotkey v2 Development
Topic: commands and commas
Replies: 35
Views: 789

Re: commands and commas

Imagine You are new to AHK, maybe even to programming/scripting/whatever. One of main issues You encounter with AHK 1 is how different the code may look depending on what command/function it is. Examples: Command OutputVar, LiteralText Command, OutputVar, LiteralText Command, OutputVar, %InputVar%, ...
by SirRFI
08 Nov 2017, 04:15
Forum: AutoHotkey v2 Development
Topic: commands and commas
Replies: 35
Views: 789

Re: commands and commas

guest3456 wrote:Always require parens ()

This ↑
Having few coding "methods" may be confusing and causes code inconsistency. Isn't removing the issue one of AHK 2 goals?
by SirRFI
08 Nov 2017, 04:05
Forum: Ask For Help
Topic: Using RegExMatch to extract filename - problems with umlauts and backslash
Replies: 1
Views: 35

Re: Using RegExMatch to extract filename - problems with umlauts and backslash

Instead of obtaining file name, You can remove the path. BackUpArray := (Join QC ; allows easier formatting [ ; the [] are numbered by default "C:\Example\Example 2\TestÜ.doc", ; 1 "C:\Example\TestÖ A.doc" ; 2 ] ) FormatTime, Date, , yyyyMMdd For ID,File in BackUpArray ; alternat...
by SirRFI
08 Nov 2017, 03:34
Forum: Ask For Help
Topic: Help for a newbie Topic is solved
Replies: 5
Views: 119

Re: Help for a newbie Topic is solved

Mouse keys? You meant that your mouse has pseudo-numpad on it? They probably use different code, maybe even joystick ones as it is for console controllers. For that You might check out ViewKey history and script info (Ctrl+K) in the script's AHK window (open from tray).

Go to advanced search