Sign in to follow this  
Followers 0
longxx

Always on top GUI window doesn't work..

15 posts in this topic

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)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

 

Share this post


Link to post
Share on other sites

Thanks for the help,

winsetontop works fine

and i did include guiconstants.au3

but I opened GUIconstants.au3 file and there is no ALWAYSONTOP option anymore...

weird.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

 

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

 

Share this post


Link to post
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.

Share this post


Link to post
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

 

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

$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

Share this post


Link to post
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

 

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

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

 

Share this post


Link to post
Share on other sites

that's the other reason why i do not use includes anymore, as i pointed out.


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

 

Share this post


Link to post
Share on other sites

keep getting an empty file while downloading v3.2.12.0.

will try tomorrow.


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

 

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