Search found 54 matches
- 12 Oct 2023, 10:41
- Forum: Wish List
- Topic: Option to terminate and restart thread when called again
- Replies: 4
- Views: 1609
Re: Option to terminate and restart thread when called again
Correct me if I'm wrong as I am still learning all the features and capabilities of AHK, but doesn't this behavior already exist in the form of return ? I suppose one could even use Reload upon errors. Or maybe I'm misunderstanding what the person is so LIVID about. I know that when I'm trying to ru...
- 11 Oct 2023, 06:58
- Forum: Ask for Help (v2)
- Topic: CSVtoDict - v1 => v2 problems Topic is solved
- Replies: 11
- Views: 934
Re: CSVtoDict - v1 => v2 problems Topic is solved
@flyingDman
I guess ask and I shall receive. This is... beautiful. Thank you.
I guess ask and I shall receive. This is... beautiful. Thank you.
- 10 Oct 2023, 22:35
- Forum: Ask for Help (v2)
- Topic: CSVtoDict - v1 => v2 problems Topic is solved
- Replies: 11
- Views: 934
Re: CSVtoDict - v1 => v2 problems Topic is solved
flyingDman So... like this, then... for idx, val in StrSplit(FileRead(file), "`n", "`r") { if (idx == 1) { Loop Parse, val, "csv" { arrayOfHeaders.Push(A_LoopField) } } else { arrayOfData := [] Loop Parse, val, "csv" { arrayOfData.Push(A_LoopField) } subdict := Map() for index, value in arrayOfData...
- 10 Oct 2023, 21:52
- Forum: Ask for Help (v2)
- Topic: CSVtoDict - v1 => v2 problems Topic is solved
- Replies: 11
- Views: 934
Re: CSVtoDict - v1 => v2 problems Topic is solved
flyingDman As far as I can tell, I cannot parse each individual line with the information that I want to extract with FileRead . I would still have to loop through the lines anyway so I can parse the information as I need to. I'm dealing with over 100 lines per file so that I can do my work tasks a...
- 10 Oct 2023, 17:44
- Forum: Scripts and Functions (v2)
- Topic: CSVtoDict v2
- Replies: 12
- Views: 1589
CSVtoDict v2
Updated code thanks to flyingDman I went searching for a way to convert CSV to an Associative array, and I found old code in a couple places, but they were for AHK v1. So, because I needed this for work, I went about trying to recreate it for v2. The original code can be found here: read CSV to Asso...
- 10 Oct 2023, 17:38
- Forum: Ask for Help (v2)
- Topic: CSVtoDict - v1 => v2 problems Topic is solved
- Replies: 11
- Views: 934
Re: CSVtoDict - v1 => v2 problems Topic is solved
WarlordAkamu67 So, turns out that while the v1 code used array, subdict should have been upgraded to use Map() . I didn't even need the array.Push({}) portion of it, but I did need to use Push. Now I have fully functional code, partly due to your contributions, albeit it not direct. Thanks! CSVtoDi...
- 10 Oct 2023, 16:06
- Forum: Ask for Help (v2)
- Topic: CSVtoDict - v1 => v2 problems Topic is solved
- Replies: 11
- Views: 934
Re: CSVtoDict - v1 => v2 problems Topic is solved
WarlordAkamu67 Yes, that is all understood. But from my understanding, the script is merely attempting to create an object for array[A_Index - 1] so that information CAN be pushed to it. It seems that the code worked in AHKv1, so now I need to understand what needs to change for the object to be cr...
- 10 Oct 2023, 14:27
- Forum: Ask for Help (v2)
- Topic: CSVtoDict - v1 => v2 problems Topic is solved
- Replies: 11
- Views: 934
CSVtoDict - v1 => v2 problems Topic is solved
I'm trying to take old AHKv1 code and turn it into ahkv2 (used the converter for this, truthfully), but I'm getting an error at the following: 028: array[A_Index - 1] := {} Error: Invalid index And I am unsure how to fix it. The v1 code I grabbed came from here: read CSV to Associative Array My csv ...
- 29 Sep 2023, 21:12
- Forum: Ask for Help (v2)
- Topic: Hotstring Helper, using period to start shortcut? Topic is solved
- Replies: 2
- Views: 373
Re: Hotstring Helper, using period to start shortcut? Topic is solved
mikeyww Yep, that was it. I was used to my own hotstrings working immediately after typing them without an end character because I wrote all my current ones with *, and this one uses T. I may need to make some modifications for that. What I'm trying to do is help a friend with work stuff and allowi...
- 29 Sep 2023, 12:02
- Forum: Ask for Help (v2)
- Topic: Hotstring Helper, using period to start shortcut? Topic is solved
- Replies: 2
- Views: 373
Hotstring Helper, using period to start shortcut? Topic is solved
I'm using the Hotstring Helper script provided by the documents, and I'm trying to determine if I need to make adjustments or if what I want to do just doesn't work. Simple question: Is it possible to create hotstrings using '.' as an indicator? For example, .sig would input my entire signature. I a...
- 22 Sep 2023, 10:00
- Forum: Scripts and Functions (v2)
- Topic: AHK2 comma after loop / sleep, Warns, Template
- Replies: 5
- Views: 960
Re: AHK2 comma after loop / sleep, Warns, Template
@emp00
Hotstrings to convert from v1 to v2 code, as some may be accustomed to v1 coding style still.
Hotstrings to convert from v1 to v2 code, as some may be accustomed to v1 coding style still.
- 12 Sep 2023, 15:07
- Forum: Ask for Help (v2)
- Topic: Is this as "elegant" as it gets? Code review, please. Topic is solved
- Replies: 3
- Views: 499
Re: Is this as "elegant" as it gets? Code review, please. Topic is solved
Thanks for the feedback, guys! I learned a couple things here, but ultimately simplified my code a bit more to: ^+t:: { faxTankMap := Map() faxTankMap["headers"] := "User, Pages, Date, Time, Fax ID" tempClip := "" limitReached := false WebMedEl := UIA.ElementFromHandle("A") scrollBarEl := WebMedEl.E...
- 12 Sep 2023, 12:54
- Forum: Scripts and Functions (v2)
- Topic: UIA v2
- Replies: 385
- Views: 59581
Re: UIA v2
Descolada I wound up using the second example (and corrected some mistakes from the example), and it seems considerably faster than it had been before. I would use the Caching option, except I am refreshing the group of elements through a loop to get the next set to insert them into an array. Still...
- 08 Sep 2023, 22:32
- Forum: Ask for Help (v2)
- Topic: Is this as "elegant" as it gets? Code review, please. Topic is solved
- Replies: 3
- Views: 499
Is this as "elegant" as it gets? Code review, please. Topic is solved
I'm just trying to see if this is as clean as it gets for this code, or if there's something that I'm overlooking that would make this even cleaner. The getRowElements is a non-issue here, just want to focus on this bit of code. ^+t:: { global faxTankArray := [] faxTankArray.Push("User, Pages, Date,...
- 08 Sep 2023, 22:30
- Forum: Scripts and Functions (v2)
- Topic: UIA v2
- Replies: 385
- Views: 59581
Re: UIA v2
Descolada Is there a faster way to achieve these same results? getRowElements(base) { WebMedEl := UIA.ElementFromHandle("A") rowUser := WebMedEl.FindElement({AutomationId: base}).Name rowPage := WebMedEl.FindElement({AutomationId: base+1}).Name rowID := WebMedEl.FindElement({AutomationId: base+3})....
- 24 Aug 2023, 07:40
- Forum: Ask for Help (v2)
- Topic: Delaying next step until SendText is done? Topic is solved
- Replies: 4
- Views: 232
Re: Delaying next step until SendText is done? Topic is solved
Thanks, @mikeyww!
Still so many things that I am learning here. This helped quite a bit!
Still so many things that I am learning here. This helped quite a bit!
- 23 Aug 2023, 07:47
- Forum: Ask for Help (v2)
- Topic: Delaying next step until SendText is done? Topic is solved
- Replies: 4
- Views: 232
Delaying next step until SendText is done? Topic is solved
Real simple problem, hopefully there's a simple solution. Is there a way to delay the next step until SendText has completed its job? In my case, it cuts off the input text because it wants to race to the next step before it completes. SendText "This is some text that gets cut off midway if I do not...
- 21 Aug 2023, 15:05
- Forum: Scripts and Functions (v2)
- Topic: UIA v2
- Replies: 385
- Views: 59581
Re: UIA v2
Descolada I'm attempting to click on an element that has no name, no value, and really no explicit identifying marks except to be located here in the tree: 3,2,1,1,#,1,1,1: Type: 50033 (Pane) Name: "CTableIconElement" LocalizedType: "pane" AutomationId: "386259960" ClassName: "Client Screen Element...
- 08 Aug 2023, 06:53
- Forum: Scripts and Functions (v2)
- Topic: UIA v2
- Replies: 385
- Views: 59581
Re: UIA v2
@Descolada
That indeed solved the problem. You have amazing patience for all the questions you get asked, and as usual, I appreciate your quick responses.
That indeed solved the problem. You have amazing patience for all the questions you get asked, and as usual, I appreciate your quick responses.
- 07 Aug 2023, 15:04
- Forum: Scripts and Functions (v2)
- Topic: UIA v2
- Replies: 385
- Views: 59581
Re: UIA v2
@Descolada
Ah, I think I found out why it doesn't work for me. Apparently the element I am attempting to find has a newline affixed to it, so it doesn't recognize Value: "Some Value" because the actual value is:
Value:"Some Value
"
as copied from UIA. Is there a way to account for that?
Ah, I think I found out why it doesn't work for me. Apparently the element I am attempting to find has a newline affixed to it, so it doesn't recognize Value: "Some Value" because the actual value is:
Value:"Some Value
"
as copied from UIA. Is there a way to account for that?