Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

AU3GUI magically broke...


  • Please log in to reply
4 replies to this topic

#1 Valik

Valik

    Former developer.

  • Active Members
  • PipPipPipPipPipPip
  • 18,879 posts

Posted 10 January 2004 - 12:44 AM

Larry, does CheckGUI.au3 (or any other GUI with WS_CAPTION + WS_POPUP) create a titleless/borderless window for you, too? If so, think it has anything to do with AutoIt using doubles now instead of ints? I updated a script that used AU3GUI but now the window is borderless (Removing WS_POPUP seems to fix it and that's a rather large number...).







#2 Valik

Valik

    Former developer.

  • Active Members
  • PipPipPipPipPipPip
  • 18,879 posts

Posted 10 January 2004 - 02:19 AM

AutoIt3 seems to function correctly... perhaps $WS_POPUP is wrong...  I forget...

For my script, I looked it up in the Windows header file and converted it to decimal myself and it's the same was what you have. The thing is, it worked before (The last version of AutoIt 3 I compiled it with was 3.0.77). Now, trying to run it with 3.0.84, the WS_POPUP style is causing problems. I thought maybe it was because AutoIt was using doubles internally, that was the only big change I could think of. I don't know what the problem is now.

#3 Valik

Valik

    Former developer.

  • Active Members
  • PipPipPipPipPipPip
  • 18,879 posts

Posted 10 January 2004 - 02:11 PM

Alrighty, I figured out how to "fix" whatever the problem I had. I found two solutions:

First, easy one, instead of converting the styles to their decimal equivalent, just use the hex values since AutoIt supports hex now:

$WS_POPUP = 0x80000000
$WS_CAPTION = 0x00C00000
EnvSet("GUI.style", $WS_POPUP + $WS_CAPTION)

Second one makes sense, but is clunky because BitOR is a function and not an operator, but using BitOR works with either decimal or hex values.

$WS_POPUP = 2147483648 ; or $WS_POPUP = 0x80000000
$WS_CAPTION = 12582912 ; or $WS_CAPTION = 0x00C00000
EnvSet("GUI.style", BitOR($WS_POPUP, $WS_CAPTION))

The second method will get ugly with more than 2 styles being used since you'll either have a bunch of nested BitOR calls or have to store the results of each call somewhere and make multiple calls.

This does not work, and it did work in previous versions of AutoIt:
$WS_POPUP = 2147483648
$WS_CAPTION = 12582912
EnvSet("GUI.style", $WS_POPUP + $WS_CAPTION)

Edited by Valik, 10 January 2004 - 02:12 PM.


#4 Jon

Jon

    Up all night to get lucky

  • Administrators
  • 10,468 posts

Posted 10 January 2004 - 02:37 PM

2147483648 is actually -1 when using 32 bits (overflow) - this will be the problem.

When using the hex notation it forces 32bit operation for a while, so 0x80000000 will set the variant to -1, and then it will correctly be converted to the double -1.

Or something.

#5 Lemures

Lemures

    Prodigy

  • Active Members
  • PipPipPip
  • 153 posts

Posted 13 January 2004 - 07:20 PM

"or something"

lol jon, i always end technical stuff the exact same way :whistle:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users