Search found 183 matches

by hd0202
21 Feb 2023, 01:07
Forum: Ask for Help (v2)
Topic: Invalid Index error when index is out of range
Replies: 21
Views: 2426

Re: Invalid Index error when index is out of range

add empty field to variable before strsplit

Code: Select all

arr := strsplit(y . ", ",",")
Hubert
by hd0202
20 Feb 2023, 05:12
Forum: Ask for Help (v2)
Topic: Detecting active file with WinActive/WinExist
Replies: 6
Views: 563

Re: Detecting active file with WinActive/WinExist

I am also new to V2 and think, that your variables 'arduinoLink' and 'arduinoLocation' must not be between the quotation marks

Hubert
by hd0202
27 Aug 2022, 05:12
Forum: Ask for Help (v1)
Topic: Find and extract lines from csv file based on a list Topic is solved
Replies: 4
Views: 1044

Re: Find and extract lines from csv file based on a list Topic is solved

replace your search-loop by

Code: Select all

;Value = Elias

Loop, parse, AAAA, `n, `r
{
  First := StrSplit(a_loopfield, ";")
  if (First.1 = Value)
  {
    result .= a_loopfield "`r`n"
  }
}
;MsgBox % result
Hubert
by hd0202
12 Jul 2022, 10:35
Forum: Scripts and Functions (v1)
Topic: [Class] FTP
Replies: 23
Views: 9373

Re: [Class] FTP

try:

Code: Select all

FTP.PutFile(hSession, "D:\" . dd . ".txt", "/sdb1/00/00.txt")  ; it is an expression !
Hubert
by hd0202
14 Jun 2022, 10:44
Forum: Ask for Help (v1)
Topic: Manage the Input to - Loop parse , ... , CSV
Replies: 10
Views: 1102

Re: Manage the Input to - Loop parse , ... , CSV

But if these files will be easy to handle with AHK, they must be converted to , comma as file delimiter. in my script the delimiter can be selected: _array := SplitCSV(_inline, ";") it can even be changed for special cases, I used it for test in one run, see the last char in this line <ß>: "first f...
by hd0202
14 Jun 2022, 07:30
Forum: Ask for Help (v1)
Topic: Manage the Input to - Loop parse , ... , CSV
Replies: 10
Views: 1102

Re: Manage the Input to - Loop parse , ... , CSV

But, I thought that loop parse ???, CSV could handle "spaces" around the field dividers - but there I was wrong. have a look at wikipedia - https://en.wikipedia.org/wiki/Comma-separated_values In some CSV implementations[which?], leading and trailing spaces and tabs are trimmed (ignored). Such trim...
by hd0202
14 Jun 2022, 00:09
Forum: Ich brauche Hilfe
Topic: Sonderzeichen in Variablen
Replies: 5
Views: 586

Re: Sonderzeichen in Variablen

von Deinen Beispielen ist nur das Erste erlaubt, siehe https://www.autohotkey.com/docs/Concepts.htm#names
Hubert
by hd0202
17 May 2022, 04:03
Forum: Ask for Help (v1)
Topic: Query about FileSelectFile
Replies: 3
Views: 431

Re: Query about FileSelectFile

That can occur depending on the given filters. You must have at least one filter other than "All Data (*.*)", which is default. You can test it manually and it will always be okay: - select "All Data (*.*)" -> the file selection is changed to all files - select the other filter, e.g. (*.txt) -> the ...
by hd0202
15 May 2022, 11:50
Forum: Ask for Help (v1)
Topic: Modifying a script to remove _ and replace with a space Topic is solved
Replies: 9
Views: 905

Re: Modifying a script to remove _ and replace with a space Topic is solved

In my previous post I concentrated on a_space and didn't pay attention to the main task of the script, sorry. Here is my new version. The processing of the INI parameters with target "a_space" is separated and now done first. /* Function : TitleCase() Purpose : Title case (capital case, headline sty...
by hd0202
15 May 2022, 09:53
Forum: Ask for Help (v1)
Topic: Modifying a script to remove _ and replace with a space Topic is solved
Replies: 9
Views: 905

Re: Modifying a script to remove _ and replace with a space Topic is solved

After a long row of tests I have added two lines in the code from github (marked "line two" and "line three", and some lines for test at the beginning of the code and 4 lines for test marked "Hypen3" and "Hypen4" as INI lines). With this addition you can use 'a_space' or '" "' as shown in "Hypen3" a...
by hd0202
15 May 2022, 03:48
Forum: Ask for Help (v1)
Topic: Query about FileSelectFile
Replies: 3
Views: 431

Re: Query about FileSelectFile

Sorry, I cannot answer your question. My WIN8.1 system also reacts with shorted file names, I think it is a windows problem. But I found a workaround, that simulates a user action: File := "Fly to the cherry tree" selection := "select the file you want" settimer, timer, 10 FileSelectFile, AusgabeVar...
by hd0202
19 Nov 2021, 01:37
Forum: Ask for Help (v1)
Topic: OMG I have a basic loop that is DRIVING ME NUTS
Replies: 5
Views: 760

Re: OMG I have a basic loop that is DRIVING ME NUTS

one simple note:
put your MsgBox % payNum%count2% before you increase *count2 := % count2 + 1 to show the results of your hard work

I hope this gives you new courage to proceed, you are on a good way !
Of course you can do everything differently, but that depends on your experience

Hubert
by hd0202
14 Jul 2021, 03:00
Forum: Ich brauche Hilfe
Topic: problemle bei Entfernen von CR+LF beim Auslesen aus SQLite Topic is solved
Replies: 2
Views: 1274

Re: problemle bei Entfernen von CR+LF beim Auslesen aus SQLite Topic is solved

Hallo,
eine Hex-Anzeige deiner Beispieldaten zeigt, dass kein CR ("`r") darin enthalten ist. Du kannst also deinen ersten StrReplace() weglassen.

Hubert
by hd0202
25 Feb 2021, 01:13
Forum: Ask for Help (v1)
Topic: My associative array doesn't work Topic is solved
Replies: 2
Views: 257

Re: My associative array doesn't work Topic is solved

Code: Select all

msg := array.ten
or

Code: Select all

msg := array["ten"]
Hubert
by hd0202
08 Dec 2020, 00:51
Forum: Ask for Help (v1)
Topic: Continue/loop and inefficient script Topic is solved
Replies: 6
Views: 1615

Re: Continue/loop and inefficient script Topic is solved

according to your description, you use an unconditional Break at the end of the Loop , but you need a conditional Break , a Break that is only taken when a specific condition occurs Loop { Send, ^c Sleep, 200 if not clipboard break Send, {Enter} ; and your following code } In this example it occurs ...
by hd0202
07 Dec 2020, 01:22
Forum: Ask for Help (v1)
Topic: Continue/loop and inefficient script Topic is solved
Replies: 6
Views: 1615

Re: Continue/loop and inefficient script Topic is solved

you need to check a condition with If and a Breakto escape from the loop
Hubert
by hd0202
02 Dec 2020, 08:59
Forum: Ask for Help (v1)
Topic: A few question for a TreeView
Replies: 20
Views: 2305

Re: A few question for a TreeView

store the full path or the directory in a second, hidden column
Hubert
by hd0202
26 Nov 2020, 03:31
Forum: Ask for Help (v1)
Topic: FileReadLine issue
Replies: 7
Views: 599

Re: FileReadLine issue

use RunWait instead of Run
Hubert
by hd0202
04 Nov 2020, 11:31
Forum: Ask for Help (v1)
Topic: Unix timestamp
Replies: 3
Views: 475

Re: Unix timestamp

Code: Select all

unix2Human(unixTimestamp) {
	rDate = 19700101000000
	rDate += unixTimestamp//1000, s
	msec := mod(unixTimestamp, 1000)
	formattime, returnDate, rDate, yyyy-MM-dd 
	return returnDate " etc, msec: " msec
}
Hubert
by hd0202
04 Nov 2020, 04:16
Forum: Ask for Help (v1)
Topic: Unix timestamp
Replies: 3
Views: 475

Re: Unix timestamp

Code: Select all

unix2Human(unixTimestamp) {
	returnDate = 19700101000000
	returnDate += unixTimestamp//1000, s
	return returnDate
}
Hubert

Go to advanced search