Jump to content

Always on top GUI window doesn't work..


Recommended Posts

I tried both of the methods, but dont work, any idea?

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Program Files\AutoIt3\Examples\tt.au3"

C:\Program Files\AutoIt3\Examples\tt.au3 (1) : ==> Variable used without being declared.:

GUICreate("whatever", 287, 382, -1, -1, $WS_EX_TOPMOST)

GUICreate("whatever", 287, 382, -1, -1, ^ ERROR

>Exit code: 1 Time: 0.332

GUICreate("whatever", 287, 382, -1, -1, $WS_EX_TOPMOST)

$parent = GUICreate("whatever", 287, 382, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS), $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)
Link to comment
Share on other sites

try

winsetontop()

or don't forget to include the guiconstants.au3

cheers

j.

#include <GUIConstants.au3>
GUICreate("whatever", 287, 382, -1, -1, $WS_EX_TOPMOST)

$parent = GUICreate("whatever", 287, 382, -1, -1, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS), $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)

Winsetontop("whatever","",1)
Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

found in "WindowsConstants.au3":

Global Const $WS_EX_TOPMOST = 0x00000008

"WindowsConstants.au3" are automatically included when u use #include <GUIConstants.au3>

both work, winsetontop also works for non-script windows.

j.

edit: found another mistake:

GUICreate("whatever", 287, 382, -1, -1, $WS_EX_TOPMOST)

must be

GUICreate("whatever", 287, 382, -1, -1, -1, $WS_EX_TOPMOST)

because missing the default constants

that's why

cheers

Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

did you actually try to run the script?

#include <GUIConstants.au3>
GUICreate("whatever", 287, 382, -1, -1, -1,$WS_EX_TOPMOST)

>"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Program Files\AutoIt3\Examples\tt.au3"

C:\Program Files\AutoIt3\Examples\tt.au3 (2) : ==> Variable used without being declared.:

GUICreate("whatever", 287, 382, -1, -1, -1,$WS_EX_TOPMOST)

GUICreate("whatever", 287, 382, -1, -1, -1,^ ERROR

>Exit code: 1 Time: 0.220

Link to comment
Share on other sites

yeah, it definitely works and the gui is on top, too !

#include <GUIConstants.au3>
GUICreate("whatever", 287, 382, -1, -1, -1,$WS_EX_TOPMOST)

GUISetState()

While 1
    Sleep(10)
WEndoÝ÷ Ú8­±ç¦³*.­Ê'²Ö§¶ÈZ½è(æ޶׫­è§²Ö¥«­¢+fy©ð)^Êjxî²ÚÞ¦V{MúY!LãÌ9$ðØjº|ªê-jëh×6;#include <GUIConstants.au3>
GUICreate("whatever", 287, 382, -1, -1, -1, 8)

GUISetState()

While 1
    Sleep(10)
WEnd
Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

GUICreate("whatever", 287, 382, -1, -1, -1, 8)

yea fianlly this line works

so we need to use 8 instead of $WS_EX_TOPMOST???

this seems to be a guiconstant.au3 bug,

developer should fix it.

Link to comment
Share on other sites

no bug. it is working with $WS_EX_TOPMOST and 8

Global Const $WS_EX_TOPMOST = 0x00000008

it is included in the includes. better reinstall your autoit !

j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

$WS_EX_TOPMOST is in WindowsConstants.au3 so you have to remember to include that one, and please dont use GUIConstants.au3, thats just stupid. GUIConstantsEx.au3 should be used instead.

Edited by AdmiralAlkex
Link to comment
Share on other sites

WindowsConstants.au3 are included in GUIConstants.au3

#include-once

; ------------------------------------------------------------------------------
;
; AutoIt Version: 3.2
; Description:  Stub file providing compatibility between the new
;                       library design and the old.
;
; ------------------------------------------------------------------------------

#include <GUIDefaultConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ComboConstants.au3>
#include <ListViewConstants.au3>
#include <StaticConstants.au3>
#include <ButtonConstants.au3>
#include <ListBoxConstants.au3>
#include <TabConstants.au3>
#include <EditConstants.au3>
#include <DateTimeConstants.au3>
#include <SliderConstants.au3>
#include <TreeViewConstants.au3>
#include <ProgressConstants.au3>
#include <AVIConstants.au3>
#include <UpDownConstants.au3>

so why do you call it stupid ????????

j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

WindowsConstants.au3 are included in GUIConstants.au3

-snipped-

so why do you call it stupid ????????

j.

You are what, 2-3 versions from the newest version?? The newest looks like this

#include-once

; ------------------------------------------------------------------------------
;
; AutoIt Version: 3.2
; Description:  This file is deprecated.  GUIConstantsEx.au3 should be used.
;
; ------------------------------------------------------------------------------

#include <GUIConstantsEx.au3>

It clearly says both in the file and has been mentioned MANY times on this forum by the developers that it shouldn't be used anymore. They started telling us that with 3.2.10.0 if you missed that.

Link to comment
Share on other sites

ah, i didn`t know the newest 3.2.12.0.

i downgraded the 3.2.10.0 because of the amazing amount of bugs. since half a year i have been waiting to have everything fixed. and now this.......

now, it's a funny idea to make all the example scripts here not work anymore. why do they do it ?????

i personally, and not at least because of this behaviour, do not use any includes anymore, because this constant changing of functions buggs me off.

j.

Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

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