Search found 1402 matches

by Albireo
01 Mar 2021, 11:19
Forum: Ask For Help
Topic: Handle unwanted (CR) row the first / last in a variable
Replies: 3
Views: 82

Re: Handle unwanted (CR) row the first / last in a variable

Thanks! It was this method I was thinking of. res4 .= "k .: " k "`tv .: " v (A_Index < aTest.Count() ? "`n" : "") (but do not know where to find information about it in the AHK-manual - or what it is called) Normally it does not matter, but when I quickly want to check what an array contains, it's g...
by Albireo
01 Mar 2021, 08:57
Forum: Ask For Help
Topic: Handle unwanted (CR) row the first / last in a variable
Replies: 3
Views: 82

Handle unwanted (CR) row the first / last in a variable

If the contents of an array are to be copied to a variable, it is possible to do as follows. (three examples) #SingleInstance force ; Build an array aTest := [] aTest.txt := "Text" aTest.info := "Info text" aTest.more := "More text" ; - - - - - - ; Example 1 for k, v in aTest res1 .= "k .: " k "`tv ...
by Albireo
01 Mar 2021, 07:48
Forum: Ask For Help
Topic: StringLower - RegExMatch - RegExReplace Topic is solved
Replies: 14
Views: 234

Re: StringLower - RegExMatch - RegExReplace Topic is solved

OK! ( that was the only way I know, how to clear "non-text" (or "-") with RegExReplace)
is there a better/other way to solve my wish?
by Albireo
01 Mar 2021, 06:35
Forum: Ask For Help
Topic: StringLower - RegExMatch - RegExReplace Topic is solved
Replies: 14
Views: 234

Re: StringLower - RegExMatch - RegExReplace Topic is solved

just me wrote:
01 Mar 2021, 05:36
Albireo wrote:... the case is almost the same as above.
Not regarding teadrinker's solution.
(I think) almost!
teadrinker RegExReplace(str, "(*UCP)(\w+).+", "$L1")
my try .. RegExReplace(opt1, "[^(*UCP)(\w+)]", "$L")
by Albireo
01 Mar 2021, 05:24
Forum: Ask For Help
Topic: StringLower - RegExMatch - RegExReplace Topic is solved
Replies: 14
Views: 234

Re: StringLower - RegExMatch - RegExReplace Topic is solved

I try to understand the soulution from teadrinker the case is almost the same as above. My idea was to clear away (eg " - " and possibly spaces ) from the input variabel to the function tstFunc() And convert all the remaining characters to lowercase letters. But I do not get RegExReplace(opt1, "[^(*...
by Albireo
27 Feb 2021, 14:30
Forum: Ask For Help
Topic: define - Object in an array and in an object :) Topic is solved
Replies: 19
Views: 343

Re: define - Object in an array and in an object :) Topic is solved

Thanks again! As I noted, you have misinterpreted it. "Is only digits" is ^\d+$ . You otherwise capture strings that might include non-digit characters. Testing is easy: you can try a few examples to prove it. MsgBox % RegExMatch("p53", "\d+") Before you test it, what do you think is the result? Now...
by Albireo
27 Feb 2021, 13:46
Forum: Ask For Help
Topic: define - Object in an array and in an object :) Topic is solved
Replies: 19
Views: 343

Re: define - Object in an array and in an object :) Topic is solved

Thank you! (i'm little confused) :? As I understand it, oInv have three keys in the example .: 1 2 and name 1 and 2 is keys to another arrays and name is a key to a value . This instruction, below shall only perform the key 1 and 2 (I'm not interested in the key name in this case) if !( k1 ~= "\d+" ...
by Albireo
27 Feb 2021, 09:50
Forum: Ask For Help
Topic: define - Object in an array and in an object :) Topic is solved
Replies: 19
Views: 343

Re: define - Object in an array and in an object :) Topic is solved

Has further developed the object a bit more. My wish is to get three levels on the source object. (Hope I have understood the structure) Level1 This level contain other objects (eg. oInv.1 ) , but also information that affects the whole object. (eg. oInv.name ) (only one array (level2), but about 20...
by Albireo
26 Feb 2021, 16:51
Forum: Ask For Help
Topic: Handle - RunWait / CMD - ErrorLevel
Replies: 2
Views: 78

Re: Handle - RunWait / CMD - ErrorLevel

I try to handle invoices, with a variety of formats and structures. I started converting the whole PDF page and then managed the result, I was very happy with the result. But had problems with the formatting. Some areas get better structure than others. Wrote an AHK program that handled all pages / ...
by Albireo
26 Feb 2021, 11:32
Forum: Ask For Help
Topic: Handle - RunWait / CMD - ErrorLevel
Replies: 2
Views: 78

Handle - RunWait / CMD - ErrorLevel

I use pdftotext.exe to read the contents (specific fields) in PDF files. Usually it works without problems and the result is perfect, but...maybe 1 of 50, ErrorLevel 1 occurs from RunWait If the AHK-program is run again (with many internal run of pdftotext), no error will occur. Wrote a batch file (...
by Albireo
22 Feb 2021, 08:47
Forum: Ask For Help
Topic: StringLower - RegExMatch - RegExReplace Topic is solved
Replies: 14
Views: 234

Re: StringLower - RegExMatch - RegExReplace Topic is solved

Thanks! RegExMatch(vInfo, "(\w+)... \w+ is not the best way (for me) to convert from UPPER to LOWERcase - it doesn't work with ÅÄÖ ( Format() ismuch better than using StringLower() - which also handles ÅÄÖ, but not arrays ) How should these "options" be understood? (they work but why?) "$L1" and [^\...
by Albireo
22 Feb 2021, 05:30
Forum: Ask For Help
Topic: StringLower - RegExMatch - RegExReplace Topic is solved
Replies: 14
Views: 234

StringLower - RegExMatch - RegExReplace Topic is solved

Hi! Assume the following .: vInfo := "TFN .: (0)123-456789" [/c] OK! My wish is to split the content and transform the result to the following content tfn 0123-456789 1) First I make a split like this RegExMatch(vInfo, "O)(\S+)\s+(\S+)\s+(\S+)$", aTmp) OK! 2) to lowercases - Is this the best way / o...
by Albireo
18 Feb 2021, 18:16
Forum: Ask For Help
Topic: define - Object in an array and in an object :) Topic is solved
Replies: 19
Views: 343

Re: define - Object in an array and in an object :) Topic is solved

Ok! ( now I understand how to use Clone() ) - Thank you! I thought wrong! since I changed from decimal point to decimal comma, the calculations do not work ... Maybe, this will still be the only way to solve my wish. #Singleinstance force row = 1 oInvProd := [], invTotal := {}, invTotal.order := 2 o...
by Albireo
18 Feb 2021, 16:32
Forum: Ask For Help
Topic: define - Object in an array and in an object :) Topic is solved
Replies: 19
Views: 343

Re: define - Object in an array and in an object :) Topic is solved

Thank you - (but it doen't work - as desired)! #Singleinstance force row = 1 oInvProd := [], invTotal := {}, invTotal.order := 1 oInvProd[invTotal.order, row, "quant"] := "10" ; Try this format oInvProd[invTotal.order, row, "price"] := "5.50" oInvProd[invTotal.order, row, "sum"] := oInvProd[invTotal...
by Albireo
18 Feb 2021, 14:47
Forum: Ask For Help
Topic: define - Object in an array and in an object :) Topic is solved
Replies: 19
Views: 343

Re: define - Object in an array and in an object :) Topic is solved

Have you use it ( Clone := Object.Clone() )? I have tried .: oPrnCsv := oInvProd.Clone() oPrnCsv := Object.Clone(oInvProd) oPrnCsv := Clone(oInvProd) But no succes! #Singleinstance force oInvProd := [], invTotal := {}, invTotal.order := 1 RowNo = 0 ; Create values Loop 2 { rowNo += 1 ; Get right dec...
by Albireo
18 Feb 2021, 12:43
Forum: Ask For Help
Topic: define - Object in an array and in an object :) Topic is solved
Replies: 19
Views: 343

Re: define - Object in an array and in an object :) Topic is solved

Thank you! (Now it works) I use this program to check! #Singleinstance force oInvProd := [], invTotal := {}, invTotal.order := 1 RowNo = 0 Loop 2 { rowNo += 1 oInvProd[invTotal.order, rowNo, "value1"] := 100 + (A_Index * 2) ; Try this format oInvProd[invTotal.order, rowNo, "value2"] := 10 + (A_Index...
by Albireo
18 Feb 2021, 09:31
Forum: Ask For Help
Topic: define - Object in an array and in an object :) Topic is solved
Replies: 19
Views: 343

Re: define - Object in an array and in an object :) Topic is solved

I have made a new example Step One , Two and Three (no problem) But step Four doesn't work (I dont know how to define/initiate this) #Singleinstance force ; - Initiate - - - - - - - - oInvProd := [] oProd := [{}] invTotal := [] invTotal.order := "0" rowNo = 0 invTotal.order += 1 ; - Step one - - - -...
by Albireo
18 Feb 2021, 08:33
Forum: Ask For Help
Topic: define - Object in an array and in an object :) Topic is solved
Replies: 19
Views: 343

Re: define - Object in an array and in an object :) Topic is solved

Maybe... But I have still problem (to understand) Yes! this example (below) works - first MsgBox show (ABC) but not next MsgBox (DEF) When rowNo is increased. oInvProd := [[{}]] invTotal := [] invTotal.order := "0" rowNo = 0 invTotal.order += 1 rowNo += 1 vTst1 := "ABC" oInvProd[invTotal.order, rowN...
by Albireo
18 Feb 2021, 03:08
Forum: Ask For Help
Topic: define - Object in an array and in an object :) Topic is solved
Replies: 19
Views: 343

Re: define - Object in an array and in an object :) Topic is solved

Thank You!
In this case, you do not have to think about whether it is an object or an array
- although I still dont know the difference between .:

Code: Select all

aVar := []
oVar := {}
by Albireo
17 Feb 2021, 05:22
Forum: Ask For Help
Topic: define - Object in an array and in an object :) Topic is solved
Replies: 19
Views: 343

define - Object in an array and in an object :) Topic is solved

My desire is to create an object / array with another object / array as store another array :? (complicated to describe...) I have hard to know when it's an array or an object by definition. (and what the difference is in AHK) I try to describe it in a different way :) I have read a file and placed ...

Go to advanced search