strate Posted September 15, 2005 Share Posted September 15, 2005 I have to different version of the same program. One version will work fine and open and display properly. All of the buttons and list boxes are diplayed correctly. The other version is the exact same thing. Except a couple lines have been added that don't even effect control parameters. The GUI will not display correctly though, all of the controls are placed to one side of the screen. I'd give you my code but it is very large. I've included to pictures that show whats happening. I imagine some one else has came across this and can guide me, thank you. INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 15, 2005 Moderators Share Posted September 15, 2005 No disrespect, but you will get the 'correct' answer a lot quicker than someone guessing what the specific problem is, by uploading your script. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
strate Posted September 15, 2005 Author Share Posted September 15, 2005 (edited) No disrespect, but you will get the 'correct' answer a lot quicker than someone guessing what the specific problem is, by uploading your script.<{POST_SNAPBACK}>The code that was here was incomplete. The part that was added is at the very end and is commented out.;~ Func _CursorBounbary() ;~ Opt("WinTitleMatchMode", 4) ;~ $handle = WinGetHandle("classname=AutoIt v3 GUI", "") ;~ If @error Then ;~ MsgBox(4096, "Error", "Could not find the correct window") ;~ EndIf ;~ If WinActive($handle) Then ;~ $size = WinGetPos($handle) ;~ _CursorClip($size[0], $size[1], $size[0] + $size[2], $size[1] + $size[3]) ;~ Else ;~ _CursorRestore() ;~ EndIf ;~ Opt("WinTitleMatchMode", 1) ;~ EndFunc Edited September 15, 2005 by strate INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
strate Posted September 15, 2005 Author Share Posted September 15, 2005 (edited) Must be using a variable or relying on AutoIt's dynamic placement ability... check your variables (x,y) using MsgBox()sLar.<{POST_SNAPBACK}>All of my variable are the same in the two versions. I'm confussed. Edited September 15, 2005 by strate INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
seandisanti Posted September 15, 2005 Share Posted September 15, 2005 All of my variable are the same in the two versions. I'm confussed.<{POST_SNAPBACK}>which are the added lines in the second script? if they are all that have been changed, that is where your problem lies. your best bet is to go into the script you've already posted and change the text color to red or something for the changes... Link to comment Share on other sites More sharing options...
seandisanti Posted September 15, 2005 Share Posted September 15, 2005 which are the added lines in the second script? if they are all that have been changed, that is where your problem lies. your best bet is to go into the script you've already posted and change the text color to red or something for the changes...sorry, i was thinking more along the lines of an 'edit' of your original post, with the 'few new lines' you mentioned highlighted...i sincerely doubt anyone is going to go through all of those posts and dig through all of that code to find your issue. Link to comment Share on other sites More sharing options...
strate Posted September 15, 2005 Author Share Posted September 15, 2005 (edited) sorry, i was thinking more along the lines of an 'edit' of your original post, with the 'few new lines' you mentioned highlighted...i sincerely doubt anyone is going to go through all of those posts and dig through all of that code to find your issue.<{POST_SNAPBACK}>Yeah the script is too long I was an idiot for even trying that. I've included the entire script in my second post and I made a note of what was changed. Edited September 15, 2005 by strate INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 15, 2005 Moderators Share Posted September 15, 2005 $size = WinGetPos($handle) Out of curiousity... are you ever minimized when it fails? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
strate Posted September 15, 2005 Author Share Posted September 15, 2005 $size = WinGetPos($handle)Out of curiousity... are you ever minimized when it fails?<{POST_SNAPBACK}>This is how it looks when it is opened. INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
strate Posted September 15, 2005 Author Share Posted September 15, 2005 (edited) first, i think you have a guictrlcreate after a guicreate... is that not wrong?$USER_LOG_LIST = GUICtrlCreateList(StringStripCR(StringStripWS($List1, 1)), 10, 560, 1000, 150, $listBoxStyle) $MAIN = GUICreate("Label Data Entry", @DesktopWidth, @DesktopHeight, -1, -1)lastly... yes... I aslo think that this line is your problem...$handle = WinGetHandle("classname=AutoIt v3 GUI", "")Is it possible there are more than 1 window with this classname and you are getting the unintended one?Lar.<{POST_SNAPBACK}>I'm not sure how the first issue ever worked but thats in the correct order now.I did have a AU3info open so I closed it and tried again, no luck. after recompiling I still get the same results. Edited September 15, 2005 by strate INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 15, 2005 Moderators Share Posted September 15, 2005 (edited) I really have to read up on "Larry's World".I haven't even peaked at the DLLStruct's. And after looking at them, I'm getting more curious on end functions.I do have some questions not being knowledgeable on DLL's.I am assuming your trying to confine the cursur within the GUI itself?If that is the case, I know that Gary (gafrost) has done something similiar within AutoIt.2nd Question is: Do you have to use the PTR or would you be able to put each of the DllStructGetData() into variables and use that in your DLL? (told you I was ignorant to them if it's a stupid question)EDIT2nd Question is: Do you have to use the PTR or would you be able to put each of the DllStructGetData() into variables and use that in your DLL? (told you I was ignorant to them if it's a stupid question)Parameters lpRect [in] Pointer to the RECT structure that contains the screen coordinates of the upper-left and lower-right corners of the confining rectangle. If this parameter is NULL, the cursor is free to move anywhere on the screen. Guess I could always take a look for myself Edited September 15, 2005 by ronsrules Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
strate Posted September 15, 2005 Author Share Posted September 15, 2005 As said before I have the two scripts that "should" be the same, except for the part that I know is different. Would anyone have anything so that I could scan both files and anything that is different be noted in another file? INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 15, 2005 Moderators Share Posted September 15, 2005 I like the idea really, but might this help if your running into the problems?.Replacing the DLL functions?Gary's MouseTrap Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
strate Posted September 15, 2005 Author Share Posted September 15, 2005 I like the idea really, but might this help if your running into the problems?.Replacing the DLL functions?Gary's MouseTrap<{POST_SNAPBACK}>That was his trap that i used. INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
GaryFrost Posted September 16, 2005 Share Posted September 16, 2005 That was his trap that i used.<{POST_SNAPBACK}>It's was Larry's 1st, just converted it to UDF. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
strate Posted May 11, 2006 Author Share Posted May 11, 2006 (edited) Well, even though this was a dead topic I just thought I'd give a response as to what fixed it today. I commented out line 295. This line was/is a simple: WinSetState("Label Data Entry", "", @SW_MAXIMIZE). Why would this cause the afore mentioned problems? Oddly enough this is my 295th post. Edited May 11, 2006 by strate INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... 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