james3mg Posted June 6, 2005 Share Posted June 6, 2005 I've got a fairly sizable script containing two basic GUI windows and two pretty intricate GUI windows. They work with one of the difficult windows (call it the "main" window) being parent to the other difficult window (call it "secondary"). Secondary opens up by pushing a button on Main. Secondary then has (among other things) two buttons opening up the two simple windows. My problem is that Secondary has a ListView whose added ListViewItem(s)' IDs seem to be the same as Inputs and Labels on Main. Thus, when I try to get Secondary to send Main information about what is highlighted in Secondary's ListView using GUICtrlRead(GUICtrlRead($listviewname)), it returns the data listed in one of the labels or inputs in Main window, rather than the ListViewItem in Secondary window. I've tried switching which window is active (guiswitch), to no avail, also calling out all the inputs and labels as global variables, but that didn't do anything either, since it's the IDs which are duplicated, not the variable names. Has anyone else had this problem? I can post the code if anyone wants, but it's over 18kb...not much as far as file size goes, but a LOT of code to wade through. Thanks "There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110 Link to comment Share on other sites More sharing options...
jpm Posted June 6, 2005 Share Posted June 6, 2005 Try to remove what is not useful from your script and post it. Unless it is difficult to help you specially when you say same return id for different control/item which is impossible as the GUI work. But Bugs are ugs so We will see. Link to comment Share on other sites More sharing options...
james3mg Posted June 7, 2005 Author Share Posted June 7, 2005 (edited) OK, here you go. I took out all functions except those necessary for showing the problem, as well as removing extra GUI windows. I made note of those functions I added back into this script to make it work similar to the full script (at the end of their respective lines, in comments). Now it's getting the data from the buttons on the Main window. so the glitch is still happening, it's just different elements sharing similar IDs now. To witness this glitch, start the script, and click the "New Message" button. Fill it out however you wish, then click the "Done" button. The listview in the main window will be populated with your data, except in the "number" column...which will contain the data of one of the elements within the Main window! I think the codes are legible now...good luck :-) all functions are in a while loop at the bottom. There's only a few now. Distilling a program is almost as hard as writing it in the first place! Hope anyone can spot my mistake(s)! Thanks Edited June 7, 2005 by james3mg "There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110 Link to comment Share on other sites More sharing options...
Lazycat Posted June 8, 2005 Share Posted June 8, 2005 Not sure if this is cause of your problem, but you have 7 columns in the main list, but secondary GUI return string with 8 columns (because return string from secondary listview is "type|phone"). I have tried to add one more column into main list, and now this is seems works. $MsgLog=GUICtrlCreateListView("Reported|Time|Name|Project|Message|Action|Type|Number",5,5,500,440,$LVS_NOSORTHEADER+$LVS_SHOWSELALWAYS) Nice GUI, btw Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
james3mg Posted June 8, 2005 Author Share Posted June 8, 2005 (edited) OK, guess I forgot to include that in the simplified version; I'm using StringReplace to get "Type: Number" so I won't have that problem, $ContactStr=StringReplace(GUICtrlRead(GUICtrlRead($NumberList)),"|",": ")but even when I take your advice, I still end up with the button data in the type field, and a blank number field...did it work better for you?Nice GUI, btwThanks...I hope it'll be really nice when I get this working...I've got all the other functions working but saving and opening...gotta find how to get the list view to output all its current data. :-)Cheers Edited June 8, 2005 by james3mg "There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110 Link to comment Share on other sites More sharing options...
Lazycat Posted June 9, 2005 Share Posted June 9, 2005 Oh, now I see. It's probably was a bug in the 3.103 version that have been solved most likely in the 3.1.0.15I:10th March 2005 - v3.1.0.15I (unstable)Fixed : GuiCtrlRead on ListViewItem on a child window (Thanks Zaxon)So try latest beta Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
james3mg Posted June 9, 2005 Author Share Posted June 9, 2005 Beautiful...that seems to work! It's a good feeling to know I hadn't made a mistake, after all. I'd been hoping it was something like that, but I'd just been keeping up on the official releases, hoping one of them would fix it, not thinking about trying all the betas. Thanks for the help everyone...and yesterday I got save and open working on that GUI so my script is about done! Have a great one, I'm sure I'll be back for more help on something else someday...this forum is always such a big help (though I miss access to the stuff on the old yahoo forum as well). -- "There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110 Link to comment Share on other sites More sharing options...
james3mg Posted June 10, 2005 Author Share Posted June 10, 2005 If any of you who helped me here are interested in seeing the final program,go to this topic.Thanks again! "There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now