Search found 183 matches
- 14 Dec 2018, 03:46
- Forum: Ask for Help (v1)
- Topic: Align code lines on = ?
- Replies: 4
- Views: 973
Re: Align code lines on = ?
here is my version: vars = ; for test only ( width = 100 height = 20 x = 0 y = 0 ) ; vars := clipboard Arr := StrSplit(vars, "`n", "`r") longest := longestLen(Arr) longestLen(Arr) { maxLen := 0 for each, line in Arr { ; RegExMatch(line, ".*(?==)", m_BeforeEquals) ; if ((currLen := StrLen(m_BeforeEqu...
- 09 Dec 2018, 04:47
- Forum: Ich brauche Hilfe
- Topic: neue Variablen in einem Loop erzeugen Topic is solved
- Replies: 3
- Views: 1515
Re: neue Variablen in einem Loop erzeugen Topic is solved
Var_1_%A_Index% := clipboard
Var_2_%A_Index% := clipboard
Var_2_%A_Index% := clipboard
- 21 Dec 2017, 01:16
- Forum: Ich brauche Hilfe
- Topic: Zahlen vergleichen
- Replies: 17
- Views: 4309
Re: Zahlen vergleichen
Du musst die Zufallszahl für den Vergleich eindeutig machen, indem Du sie mit dem Trennzeichen der Liste umgibst: Liste := " " Loop { Random, Zahl , 1, %bereich% ifnotinstring,liste, % " " zahl " " { Liste := Liste Zahl " " GuiControl,, Display, % Liste eintrag += 1 Zahlen%Eintrag% := Zahl } if eint...
- 06 Jul 2015, 11:42
- Forum: Ask for Help (v1)
- Topic: most efficient way to compare files and remove lines
- Replies: 3
- Views: 2022
Re: most efficient way to compare files and remove lines
My suggestion: file1 = %a_scriptdir%\datafile1.txt file2 = %a_scriptdir%\datafile2.txt file3 = %a_scriptdir%\outfile.txt ; ; generate testfiles data1 = ( 123456 123458 ) filedelete, % file1 fileappend, % data1, % file1 data2 = ( 123456,a,b,c,d 123457,e,f,g,h 123458,i,j,k,l 123459,m,n,o,p ) filedelet...
- 04 Jul 2015, 04:37
- Forum: Ask for Help (v1)
- Topic: Select Item of TreeView
- Replies: 4
- Views: 2911
- 03 Jul 2015, 09:10
- Forum: Ask for Help (v1)
- Topic: Select Item of TreeView
- Replies: 4
- Views: 2911
- 16 Jun 2015, 23:56
- Forum: Ask for Help (v1)
- Topic: Indirect reference Mod() error
- Replies: 5
- Views: 2184
Re: Indirect reference Mod() error
You must use ":=mod(..." in all three cases --> expression
Hubert
Hubert
- 13 Jun 2015, 04:44
- Forum: Ask for Help (v1)
- Topic: Best method for sorting multiple arrays
- Replies: 6
- Views: 2597
Re: Best method for sorting multiple arrays
Hi, Line 11: defaultColorsArray := {} Is this any different compared to defaultColorsArray := Object() ? No. Line 13: defaultColorsArray[defaultColorsArray_T[A_Index]] := {"X" : colorPickPosition_X[A_Index], "Y" : colorPickPosition_Y[A_Index]} I use an associative array where "color code" is the key...
- 12 Jun 2015, 03:32
- Forum: Ask for Help (v1)
- Topic: Best method for sorting multiple arrays
- Replies: 6
- Views: 2597
Re: Best method for sorting multiple arrays
This is my suggestion: ; Select color (MS paint in Windows XP) msPaintSetColorDecimal(r,g,b, colorSameValueHEX:=0x000000) { Static r_last, g_last, b_last Static defaultColorsArray ; Run only first time this function is called. If (!defaultColorsArray.MaxIndex()) { defaultColorsArray_T := [0x000000,0...
- 10 Jun 2015, 01:15
- Forum: Ask for Help (v1)
- Topic: Best method for sorting multiple arrays
- Replies: 6
- Views: 2597
Re: Best method for sorting multiple arrays
From your description I get the impression that you use pseudo arrays instead of associative arrays. In the latter you can store all values in one array, you can use the color code as key and have direct access, no shifting or sorting needed.
Hubert
Hubert
- 17 May 2015, 09:24
- Forum: Ask for Help (v1)
- Topic: Add Numbers to SubMenu?
- Replies: 7
- Views: 2062
Re: Add Numbers to SubMenu?
This is my suggestion: prevchar = ind = 0 Loop, parse, Clipboard, `n, `r, { StringLeft, FirstChar, A_LoopField, 1 if (firstchar <> prevchar and prevchar <> "") { Menu, Mymenu, Add, %prevchar%%a_space%Submenu, :Submenu%prevchar% ind = 0 } if !firstchar break prevchar := firstchar ind++ CurrentChar :=...
- 17 May 2015, 03:39
- Forum: Ask for Help (v1)
- Topic: Gui with many buttons, when a key is pressed with same initial alphabet, it should not launch rather set focus,Lik Menu
- Replies: 5
- Views: 1916
Re: Gui with many buttons, when a key is pressed with same initial alphabet, it should not launch rather set focus,Lik
This is my suggestion: n_s = 1 n_t = 5 o_s = 6 o_t = 7 f = 1 Gui, Add, Button, G1 default, Nothing Gui, Add, Button, G2, Nothing Gui, Add, Button, G3, Nothing Gui, Add, Button, G4, Nothing Gui, Add, Button, G5, Nothing Gui, Add, Button, G6, Other Gui, Add, Button, G7, Other Gui, Show return 1: MsgBo...
- 16 Apr 2015, 03:11
- Forum: Ask for Help (v1)
- Topic: Official Join method or function
- Replies: 24
- Views: 14381
Re: Official Join method or function
here is a new version with 6 methods, which each use "Join", the method GeekDude provided - and with my extension and "Join2", the original method from the docu: out .= "1a --> " ", ".join(["a", "b", "fish"]) "`n" out .= "1b --> " ", ".join2(["a", "b", "fish"]) "`n" out .= "2a --> " ", ".join("a", "...
- 16 Apr 2015, 01:15
- Forum: Ask for Help (v1)
- Topic: Official Join method or function
- Replies: 24
- Views: 14381
Re: Official Join method or function
Do you mean this: MsgBox, % ", ".join(["a", "b", "fish"]) MsgBox, % ", ".join("a", "c", "fish") array := ["a", "d", "fish"] MsgBox, % ", ".join(array) Join(s,p*){ static _:="".base.Join:=Func("Join") for k,v in p { if isobject(v) for k2, v2 in v o.=s v2 else o.=s v } return SubStr(o,StrLen(s)+1) } H...
- 15 Apr 2015, 11:41
- Forum: Ask for Help (v1)
- Topic: [solved]how to search for via routes when there are no direc
- Replies: 60
- Views: 19546
Re: [unsolved]how to search for via routes when there are no
I have changed your code and marked the changed/inserted lines with "; hd": Loop, %A_ScriptDir%\*.* { if A_loopfilename contains _.txt FileList = %FileList%%A_LoopFileName%`n } Sort, FileList, R ; The R option sorts in reverse order. See Sort for other options. Loop, parse, FileList, `n { if A_LoopF...
- 13 Apr 2015, 15:52
- Forum: Ask for Help (v1)
- Topic: Sorting question
- Replies: 7
- Views: 2438
Re: Sorting question
Here is my suggestion: input = ( !var[$abm_active,0,1] # tracks abm active state !var[$deck_a_bend,0,21] # non-zero = currently bending !var[$deck_b_bend,0,21] !var[$deck_a_bend_down,0,1] # 1 = bend down !var[$deck_b_bend_down,0,1] !var[$deck_a_bend_state,0,1] # tracks jog wheel state for bending !v...
- 11 Apr 2015, 22:45
- Forum: Wish List
- Topic: error message "no data media in drive" with #include Topic is solved
- Replies: 3
- Views: 2093
Re: error message "no data media in drive" with #include Topic is solved
Do you get any error dialogs (excluding the script's MsgBoxes) if you run the following? Yes, with TEST #1: message in German --------------------------- AutoHotkey.exe - Kein Datenträger --------------------------- Es befindet sich kein Datenträger im Laufwerk. Legen Sie einen Datenträger in Laufw...
- 11 Apr 2015, 11:36
- Forum: Ask for Help (v1)
- Topic: [solved]how to search for via routes when there are no direc
- Replies: 60
- Views: 19546
Re: [unsolved]how to search for via routes when there are no
@alphabravo: I found no problems with the connections I tested.
Hubert
Hubert
- 11 Apr 2015, 09:20
- Forum: Ask for Help (v1)
- Topic: [solved]how to search for via routes when there are no direc
- Replies: 60
- Views: 19546
Re: [unsolved]how to search for via routes when there are no
@smorgasbord: you mean, the reverse route is only put into the comboboxes, but not into the result? This was my assumption due to your statement: another ( seems to be the last thing ) requirement, if the original var does not have route like Guwahati to Agartala but instead has Agartala to Guwahat...
- 11 Apr 2015, 08:39
- Forum: Ask for Help (v1)
- Topic: [solved]how to search for via routes when there are no direc
- Replies: 60
- Views: 19546
Re: [unsolved]how to search for via routes when there are no
sorry but there is even a shorter route:
Agartala --> Kolkata --> Delhi
but only, if you supply the connection Kolkata --> Delhi
Hubert
Agartala --> Kolkata --> Delhi
but only, if you supply the connection Kolkata --> Delhi
Hubert