Search found 191 matches
- 12 Mar 2022, 07:52
- Forum: Ask for Help (v1)
- Topic: Unexpected behaviour of nested (2D) arrays Topic is solved
- Replies: 23
- Views: 1675
Unexpected behaviour of nested (2D) arrays Topic is solved
I'm not sure if this is a bug or known issue, or if there's just something I haven't got my head around about arrays (I mean, something else, LOL, there's plenty). Adding 'rows' (i.e. first index arrays) to a parent array to create a 2D array gives odd behaviour depending on how it's done. It's diff...
- 28 Feb 2022, 09:06
- Forum: Ask for Help (v1)
- Topic: Send Image to Printer Topic is solved
- Replies: 10
- Views: 907
Re: Send Image to Printer Topic is solved
I've just set this to "solved" with SGDIPrint.ahk as you suggested, mikeyww , and I thought I'd share a method that (kind of) worked for me. The situation I've got is a page of graphics already printed on screen, drawn using GDIP.ahk, with which the user can interact. I just wanted them to be able t...
- 22 Feb 2022, 16:00
- Forum: Ask for Help (v1)
- Topic: Select and move graphic elements over background image? Topic is solved
- Replies: 5
- Views: 540
Re: Select and move graphic elements over background image? Topic is solved
I've made a few tweaks to my music drawing routines and they're running much faster, and I think I'll go with that, but I do think Hellbent's PopupWindow Class would be another way to go in other circumstances. I watched him demo it on Joe's YT: https://www.youtube.com/watch?v=8D3o2Y5eSR8 Thanks aga...
- 22 Feb 2022, 09:34
- Forum: Ask for Help (v1)
- Topic: Select and move graphic elements over background image? Topic is solved
- Replies: 5
- Views: 540
Re: Select and move graphic elements over background image? Topic is solved
Excellent, I'll learn a lot from those vids, I reckon.
- 22 Feb 2022, 07:28
- Forum: Ask for Help (v1)
- Topic: Select and move graphic elements over background image? Topic is solved
- Replies: 5
- Views: 540
Re: Select and move graphic elements over background image? Topic is solved
AFAIK, @bichlepa's :arrow: AutoHotflow could give you an idea. Well, I might be wrong. Make up your mind 8-) & good luck :thumbup: Thanks for that, BoBo . Unfortunately, it's way above my pay grade, especially as the code is in lots of different scripts. I'll need something quite simple for me to u...
- 22 Feb 2022, 06:15
- Forum: Ask for Help (v1)
- Topic: Select and move graphic elements over background image? Topic is solved
- Replies: 5
- Views: 540
Select and move graphic elements over background image? Topic is solved
Hi, I'm looking for a way to draw and then move little graphic elements (piano-roll style musical notes) on a background image (the musical staff), to create a simple music editor or 'digital audio workstation', where notes can be moved up and down, left and right, changed, etc. What method would yo...
- 12 Feb 2022, 11:07
- Forum: Ask for Help (v1)
- Topic: Can't enumerate associative array in order created? Topic is solved
- Replies: 8
- Views: 960
Re: Can't enumerate associative array in order created? Topic is solved
This doesn't respond to the question but it can be a workaround Cars := [ { "Toyota" : { color : "red" , style : "sedan" } } , { "BMW" : { color : "gray" , style : "coupe" } } , { "Acura" : { color : "blue" , style : "convertible" } } , { "Mercedes" : { color : "black" , style : "smooth" } } ] Out ...
- 12 Feb 2022, 06:32
- Forum: Ask for Help (v1)
- Topic: Can't enumerate associative array in order created? Topic is solved
- Replies: 8
- Views: 960
Re: Can't enumerate associative array in order created? Topic is solved
You can make one of the values in the associative array an index number that would indicate the order in which they were created. Yes, I meant when I'm using an associative array because its keys are not sequential numbers, although that is the point of an associative array. Yes, I know. My suggest...
- 12 Feb 2022, 05:58
- Forum: Ask for Help (v1)
- Topic: Can't enumerate associative array in order created? Topic is solved
- Replies: 8
- Views: 960
Re: Can't enumerate associative array in order created? Topic is solved
You can make one of the values in the associative array an index number that would indicate the order in which they were created. Yes, I meant when I'm using an associative array because its keys are not sequential numbers, although that is the point of an associative array. Thanks for your replies...
- 11 Feb 2022, 14:46
- Forum: Ask for Help (v1)
- Topic: Can't enumerate associative array in order created? Topic is solved
- Replies: 8
- Views: 960
Can't enumerate associative array in order created? Topic is solved
Is there a way to enumerate the key-value pairs from an associative array in the order in which they're written or introduced by .push(), etc.? Are they actually stored in alphabetical order (since they're usually enumerated that way)? If this can't be done, I'll probably have to resort to two paral...
- 31 Jan 2022, 19:35
- Forum: Ask for Help (v1)
- Topic: #Warn with Gdip variable clash Topic is solved
- Replies: 3
- Views: 241
Re: #Warn with Gdip variable clash Topic is solved
Ahem, sorry, I don't know why I didn't look it up! Thanks.
- 31 Jan 2022, 19:22
- Forum: Ask for Help (v1)
- Topic: #Warn with Gdip variable clash Topic is solved
- Replies: 3
- Views: 241
#Warn with Gdip variable clash Topic is solved
Hi, I've been using Gdip.ahk library and writing my code by hacking examples from tic . These call the library with many of the same variable names as are used by the functions in Gdip itself. Should I be worried when I put #Warn in my code that I get lots of error warnings about variables I'm using...
- 28 Jan 2022, 18:32
- Forum: Ask for Help (v1)
- Topic: Sort, Push, RemoveAt etc., with 2D array/object? Topic is solved
- Replies: 6
- Views: 973
Re: Sort, Push, RemoveAt etc., with 2D array/object? Topic is solved
Yes, that can be tricky at times. You might find Arrays of Arrays to be an informative passage. Enjoy! Yes, I've read it many times, but apparently too quickly! It's pretty dense. I should unpack it and do some experiments. I've written a sort routine that does what I wanted, so here it is in case ...
- 27 Jan 2022, 18:57
- Forum: Ask for Help (v1)
- Topic: Sort, Push, RemoveAt etc., with 2D array/object? Topic is solved
- Replies: 6
- Views: 973
Re: Sort, Push, RemoveAt etc., with 2D array/object? Topic is solved
Oh, and my mistake on push() was trying a[x].push(temp) when it should have just been a.push(temp) . Hell it's confusing. So I was maybe trying to push temp into an element of a[x] rather than of a , without that depth having been dimensioned? Which (if I wanted to) would require something like a.x ...
- 27 Jan 2022, 18:42
- Forum: Ask for Help (v1)
- Topic: Sort, Push, RemoveAt etc., with 2D array/object? Topic is solved
- Replies: 6
- Views: 973
Re: Sort, Push, RemoveAt etc., with 2D array/object? Topic is solved
Thanks guys, Chunjee Thanks, it was good to see the example with nested (2D) array elements, and to understand a bit more about where my confusion comes from, i.e. the history of array development in AHK. I might use that sortBy() function, or I might just see if I can cobble something together - so...
- 27 Jan 2022, 10:39
- Forum: Ask for Help (v1)
- Topic: Sort, Push, RemoveAt etc., with 2D array/object? Topic is solved
- Replies: 6
- Views: 973
Sort, Push, RemoveAt etc., with 2D array/object? Topic is solved
Can you sort a 2D array on a row (or column), so that all other contents are sorted along with the indexed row? If so, could someone show me the syntax for doing that please? Also, can you use .push() for a whole row/column (say, to add a separate 1D array as a new row/col), and RemoveAt a similar s...
- 23 Jan 2022, 05:36
- Forum: Scripts and Functions (v1)
- Topic: AHK Piano
- Replies: 23
- Views: 5297
Re: AHK Piano
P.S. Now I've found the higher notes are shorter - about 12 s. Probably best to interrogate MCI_Length() first for the "to" value so as not to exceed it, if you do it that way.
- 23 Jan 2022, 02:41
- Forum: Scripts and Functions (v1)
- Topic: AHK Piano
- Replies: 23
- Views: 5297
Re: AHK Piano
Yeah, that all fitted with my tests, but I think I've made inroads into it now. As you thought, we have to reset the audio with MCI_Seek. I suspect subsequent Play calls aren't being ignored, it's just it's already playing at position x, and continues playing at position x, so you don't notice unles...
- 22 Jan 2022, 19:02
- Forum: Scripts and Functions (v1)
- Topic: AHK Piano
- Replies: 23
- Views: 5297
Re: AHK Piano
Hi guys - I'm having fun with this. But why does each media file have to be loaded again after the MCI_Play()? Isn't there a way to re-use it from memory?
- 21 Jan 2022, 11:30
- Forum: Scripts and Functions (v1)
- Topic: AHK Piano
- Replies: 23
- Views: 5297
Re: AHK Piano
Ooooooh, Drugwash you fixed it for me! I didn't get time to do lots more debugging, and when I came back, there you were with this solution. Thanks. x32 Thanks again - this is amazing. I'll have to see what more I can do with that. I see it plays notes together, polyphonic, but only apparently up to...