You're creating an entirely new array (multidimension al instead of jagged), why?
I'm sorry I didnt explain it in my post, but i thought the code illustrated it well enough.
What I want is a copy of my original jagged array, but instead it references to the original, even when I'm using Clone/CopyTo/Array.Copy
User Profile
Collapse
-
Copying a jagged array
I've made this short test code, to illustrate my problem:
The program writes out both j and k as 1, where it should write j as 0.Code:int[][] j = new int[2][]; j[0] = new int[] { 0 }; int[][] k = (int[][])j.Clone(); k[0][0] = 1; Console.WriteLine("j: "+j[0][0].ToString()); Console.WriteLine("k: " + k[0][0].ToString());
... -
I tested them today, and it appears that the screen that pops up isn't a childwindow :/
I tried with all 3:
ChildWindowFrom Point
ChildWindowFrom PointEx (with all 4 parameters)
RealChildWindow FromPoint
All of them gave the same childwindow handle on both the normal board and the scoreboard.
So now I've no idea why the sendmessage doesn't get through.Leave a comment:
-
The ChildWindowFrom Point looks like its just what i need :)
I'll try it out tomorrow, and report back how if it works :)
Thanks a lot for your help so far.Leave a comment:
-
Hmn yeah it would be possible to send it as a keypress, but how would that change the situation?
Is there any way to check for handles on childwindows? It would be an easy way to stop it from pressing, if i could check that the handle changes....Leave a comment:
-
After further tests it showed that postmessage has the exact same fail ratio and requirements as sendmessage :(Leave a comment:
-
Yep that's exactly what happens, although i don't even have to move the mouse, its enough just pressing the winkey or doing anything that sets off another message.
It is possible to get a screenshot just before sending, but it's quite CPU consuming.. I'm actually doing this as a workaround right now :)
It works, but I'd prefer finding the reason as to why its actually happening....Leave a comment:
-
Sendmessage interrupted?
Hi,
I'm currently working on a bot for a game.
It works like this:
1: Take a picture of the current playing field
2: Do the calculations on what i gotta do (best move)
3: Use sendmessage to send a mouseclick to the game at the correct position
I do this about every 2nd second.
Most of the time its working like a charm However there is a certain instance where...
No activity results to display
Show More
Leave a comment: