Jump to content

$SS_SUNKEN :(


SmOke_N
 Share

Recommended Posts

  • Moderators

Hey all, I've got a situation in one of my scripts... below is simply what it is... When I run it in SciTe, the labels look fine, when I compile it, I get a dark background on the labels... and this is all the code I have for it.

#include <guiconstants.au3>
GUICreate('test', 450, 200)
GUISetBkColor(0xFAFAFB)
Local $one[5], $two[5], $three[5]
    For $i = 1 To 4
        $one[$i] = GUICtrlCreateLabel("A-Example-"&$i, 10 + (($i - 1) * 105), 125, 100, 17, BitOR($SS_SUNKEN , $SS_CENTER))
        $two[$i] = GUICtrlCreateLabel("B-Example-"&$i, 10 + (($i - 1) * 105), 148, 80, 17, BitOR($SS_SUNKEN , $SS_CENTER))
        $three[$i] = GUICtrlCreateLabel("", 90 + (($i - 1) * 105), 148, 20, 17, BitOR($SS_SUNKEN , $SS_CENTER))
        GUICtrlSetFont($one[$i], 8.5, '', 1, "Arial Bold")
        GUICtrlSetColor($one[$i], 0x008080)
        GUICtrlSetFont($two[$i], 8.5, "", 1, "Arial Bold")
        GUICtrlSetColor($two[$i], 0x3C57C4)
    Next
GUISetState()
While 1
    $msg = GUIGetMsg()
    If $msg = - 3 Then Exit
WEnd

Any thoughts on what might cause this, I have several GUI's through out the script that use the same BitOr(), and they are all fine when compiled and ran.... It's a shot in the dark, and there's absolutely no other code to show, so... any debug ideas would be great!! :o

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

  • Moderators

Yeh, was just a shot in the dark... Just wondering if anyone else had had it happen to them. It's got to be somewhere in the rest of my code, guess I'll try and find it there.

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

  • Moderators

This was a bad reproduction script above (this only happened to 1 out of 5 GUI's that I'm useing BitOr($SS_SUNKEN, $SS_CENTER)) for the labels... but the error is true. It only happens with v.107 (I don't have v.106) but when I compiled it with v.105 the error never happens.

Maybe something was written different for the constants in that release?

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

I didn't see any difference with beta 107, either. I'd pop open a MsgBox showing @AutoItVersion in the course of the script to make certain there's no accidental difference between AutoIt3.exe and the EXE stub...

Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines.

Link to comment
Share on other sites

  • Moderators

NO problems here. Tested with 95/98SE/2K/XPSP2.

Right, you guys are probably not going to get the problem with what I posted, even if I compile that on my own, standing by itself, I don't get it. It's within my script itself. But that is exactly how it is placed in one of my GUI udf's. And it is exactly the same as another one of my GUI udf's with one value change.

It's a poor example because it doesn't re-create the issue as a stand alone example.

I figured whom ever played with the values from v105 to v107 (i didn't have v106), would know if they changed anything for 0x1000 ($SS_SUNKEN). I just don't understand why one udf works and the other doesn't, why one version of compiler works and the other doesn't.

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

Hey all, I've got a situation in one of my scripts... below is simply what it is... When I run it in SciTe, the labels look fine, when I compile it, I get a dark background on the labels... and this is all the code I have for it.

#include <guiconstants.au3>
GUICreate('test', 450, 200)
GUISetBkColor(0xFAFAFB)
Local $one[5], $two[5], $three[5]
    For $i = 1 To 4
        $one[$i] = GUICtrlCreateLabel("A-Example-"&$i, 10 + (($i - 1) * 105), 125, 100, 17, BitOR($SS_SUNKEN , $SS_CENTER))
        $two[$i] = GUICtrlCreateLabel("B-Example-"&$i, 10 + (($i - 1) * 105), 148, 80, 17, BitOR($SS_SUNKEN , $SS_CENTER))
        $three[$i] = GUICtrlCreateLabel("", 90 + (($i - 1) * 105), 148, 20, 17, BitOR($SS_SUNKEN , $SS_CENTER))
        GUICtrlSetFont($one[$i], 8.5, '', 1, "Arial Bold")
        GUICtrlSetColor($one[$i], 0x008080)
        GUICtrlSetFont($two[$i], 8.5, "", 1, "Arial Bold")
        GUICtrlSetColor($two[$i], 0x3C57C4)
    Next
GUISetState()
While 1
    $msg = GUIGetMsg()
    If $msg = - 3 Then Exit
WEnd

Any thoughts on what might cause this, I have several GUI's through out the script that use the same BitOr(), and they are all fine when compiled and ran.... It's a shot in the dark, and there's absolutely no other code to show, so... any debug ideas would be great!! :o

HI

All worked ok on my end also but I have noticed the behavior of labels has changed in 1.07. In the TV_HittestArrays.au3 I posted a while back in scraps the label that i drag has a grey background now instead of white.

Also noticed the entire rect region is drawn (and willl overwrite rest of gui) for a label where in older versions just the area that held text was drawn. Not sure if tis helps but...maybe i need to play with styles a bit.

Jim

.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...