Sign in to follow this  
Followers 0
strate

GUI Displays Wrong

16 posts in this topic

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...

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 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...

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Must be using a variable or relying on AutoIt's dynamic placement ability... check your variables (x,y) using MsgBox()s

Lar.

<{POST_SNAPBACK}>

All of my variable are the same in the two versions. I'm confussed. Edited 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...

Share this post


Link to post
Share on other sites

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...

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

#7 ·  Posted (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 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...

Share this post


Link to post
Share on other sites

$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.

Share this post


Link to post
Share on other sites

$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...

Share this post


Link to post
Share on other sites

#10 ·  Posted (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 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...

Share this post


Link to post
Share on other sites

#11 ·  Posted (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)

EDIT

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)

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 :P;)

Edited 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.

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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.

 

Share this post


Link to post
Share on other sites

#16 ·  Posted (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 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...

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0