Search found 31 matches

by jmcall10
27 Feb 2020, 14:52
Forum: Ask For Help
Topic: Sorting 2D Array Topic is solved
Replies: 7
Views: 565

Re: Sorting 2D Array Topic is solved

Worked a charm, thanks!
by jmcall10
27 Feb 2020, 13:09
Forum: Ask For Help
Topic: Sorting 2D Array Topic is solved
Replies: 7
Views: 565

Sorting 2D Array Topic is solved

Hi All, Apologies for having to post this however I am unable to find a solution. I have an array mainArray:= [[33, "Some Description 1"], [40, "Another random description"], [12, "Some info"], [99, "Hello World"]] I would like to sort these in decending order using the Integer in the first subitem....
by jmcall10
24 Jan 2020, 15:10
Forum: Ask For Help
Topic: Extracting data from Multiple line clipboard
Replies: 4
Views: 443

Extracting data from Multiple line clipboard

Hi all,

I have data in the clipboard that is multi lined.

I am looking to extract only certain information from this.

For example get the data on line1 and 12 characters in and save that as a variable and then perhaps something from line 2 etc etc.

Is it possible to do this?

Regards,

jmcall10
by jmcall10
30 May 2019, 09:23
Forum: Ask For Help
Topic: Import xlsx into ListView and also Search/Filter data Topic is solved
Replies: 4
Views: 835

Re: Import xlsx into ListView and also Search/Filter data Topic is solved

Hey this appears to work excellent!

I will modify the rest to my needs.

As a side note I had to add

Code: Select all

#Include ExcelToArray.ahk
Thanks :D
by jmcall10
30 May 2019, 03:47
Forum: Ask For Help
Topic: Import xlsx into ListView and also Search/Filter data Topic is solved
Replies: 4
Views: 835

Import xlsx into ListView and also Search/Filter data Topic is solved

Hi all, I am wanting to create a very simple (Hopefully) program. I have some (but limited) knowledge of AHK. 1) When program is ran it would import an xlsx file into a ListView 2) Have the ability to filter data in ListView based on text input to a TextField. Hope this makes sense. If someone could...
by jmcall10
14 Mar 2019, 07:56
Forum: Ask For Help
Topic: Loop each line of string and replace nth character Topic is solved
Replies: 9
Views: 1085

Re: Loop each line of string and replace nth character Topic is solved

`a - any new line m - multiline mode ) - end of regex flag declarations ^ - match at the start of the line ( - start capturing group 1 \d{6} - six digits ) - end capturing group 1 - followed by a Space replace what the regexp matched with: $1 - the contents of capturing group 1 `t - followed by a T...
by jmcall10
14 Mar 2019, 07:42
Forum: Ask For Help
Topic: Loop each line of string and replace nth character Topic is solved
Replies: 9
Views: 1085

Re: Loop each line of string and replace nth character Topic is solved

text = ( 123456 Some text 654321 Some more text 112233 Even more text ) msgbox % text newtext := RegExReplace(text, "`am)^(\d{6}) ", "$1`t") msgbox % newtext This worked and seems to be shortest to implement. Are you able to explain the line: newtext := RegExReplace(text, "`am)^(\d{6}) ", "$1`t") R...
by jmcall10
14 Mar 2019, 07:27
Forum: Ask For Help
Topic: Loop each line of string and replace nth character Topic is solved
Replies: 9
Views: 1085

Re: Loop each line of string and replace nth character Topic is solved

Hi, Thanks for the reply.

It is only the first space in each line I need replaced.

Are you able to assist with that?

Regards,

jmcall10
by jmcall10
14 Mar 2019, 06:57
Forum: Ask For Help
Topic: Loop each line of string and replace nth character Topic is solved
Replies: 9
Views: 1085

Loop each line of string and replace nth character Topic is solved

Hi all, Basically I have a string of text, example below : 123456 Some text 654321 Some more text 112233 Even more text Each line always starts with 6 digits and then followed by a SPACE. I would like to replace this SPACE (and only this space) in each line with a TAB instead. I know I shall need to...
by jmcall10
18 Sep 2018, 14:00
Forum: Ask For Help
Topic: Extracting numbers from string Topic is solved
Replies: 6
Views: 1151

Re: Extracting numbers from string Topic is solved

I have managed to achieve what I was after using a different approach (most likely not a very good approach) MyString := "149 APPLES 1205 ORANGES AND 151 APPLES 1263 ORANGES" word_array := StrSplit(MyString , A_Space, ".") ; Omits periods. MsgBox % "The 1st number is" word_array[1] MsgBox % "The 2nd...
by jmcall10
18 Sep 2018, 13:34
Forum: Ask For Help
Topic: Extracting numbers from string Topic is solved
Replies: 6
Views: 1151

Extracting numbers from string Topic is solved

Hi All, I have a string which I require to extract the numerical valuses from. Here is an example of the string: "149 APPLES 1205 ORANGES AND 151 APPLES 1263 ORANGES" I would like to extract it as follows: variable 1 = 149 variable 2 = 1205 variable 3 = 151 variable 4 = 1263 Some things to consider:...
by jmcall10
18 Sep 2018, 13:24
Forum: Ask For Help
Topic: open excel file using wildcard
Replies: 4
Views: 732

Re: open excel file using wildcard

Worked a treat!
by jmcall10
18 Sep 2018, 12:34
Forum: Ask For Help
Topic: open excel file using wildcard
Replies: 4
Views: 732

Re: open excel file using wildcard

Excellent! I shall give these a go and feedback.
by jmcall10
18 Sep 2018, 11:39
Forum: Ask For Help
Topic: open excel file using wildcard
Replies: 4
Views: 732

open excel file using wildcard

Hi All, I currently have a script that opens an excel using the following format: run \\Server001\Documents\MAINFILE.xlsx However, the file now has random text added to the filename (I cannot control the naming of the file). For example the filename might be "MAINFILE ABC.xlsx" one moment and then "...
by jmcall10
13 Aug 2018, 22:07
Forum: Ask For Help
Topic: String clean up. remove starting empty space
Replies: 11
Views: 1421

Re: String clean up. remove starting empty space

Once again thanks! I really appreciate the answer and feedback.
by jmcall10
13 Aug 2018, 21:44
Forum: Ask For Help
Topic: String clean up. remove starting empty space
Replies: 11
Views: 1421

Re: String clean up. remove starting empty space

I have a follow up question which I will keep here unless told to repost as it still relates to cleaning up my string. I have the following now: mainContents:= Loop, 5 { vText1 := "Sample Text" vText2 := " Some more Sample text " vText2 := Trim(vText2, "`n `t") ;trim LFs and spaces/tabs vText2 := Tr...
by jmcall10
13 Aug 2018, 21:32
Forum: Ask For Help
Topic: String clean up. remove starting empty space
Replies: 11
Views: 1421

Re: String clean up. remove starting empty space

Thank you for the reply and explantions.

Very helplful answer.
by jmcall10
13 Aug 2018, 20:30
Forum: Ask For Help
Topic: String clean up. remove starting empty space
Replies: 11
Views: 1421

Re: String clean up. remove starting empty space

Ok this was my solution. Not sure if it could be a lot cleaner?

vText := sampleText
vText := Trim(vText, Chr(10))
vText := LTrim(vText)
vText := RTrim(vText)
MsgBox, %vText%
by jmcall10
13 Aug 2018, 20:26
Forum: Ask For Help
Topic: String clean up. remove starting empty space
Replies: 11
Views: 1421

Re: String clean up. remove starting empty space

Hi, Thanks again for the response. Not sure if you missed it but I have posted the string below my original post.
Ok, so I test the "debugged" the string using ORD and basically the first char number is "10" then followed by numerous "32"'s.
Then it has my string and ends with numerous "32"'s again.
by jmcall10
13 Aug 2018, 20:09
Forum: Ask For Help
Topic: String clean up. remove starting empty space
Replies: 11
Views: 1421

Re: String clean up. remove starting empty space

Hi, thank you for the reply.

I have tried the solution and it hasnt worked in this example. Perhaps they are not spaces?
Also I thought LTrim and RTrim are no longer used?

Regards,
jmcall10

Go to advanced search