Sign in to follow this  
Followers 0
smack

WinExist doesn't work, WinMove does (?)

12 posts in this topic

Hi,

how can this be possible: 'If WinExist' just won't detect a window, but 'WinMove' has no problem moving that window around. ^_^

(it's a window inside a program, not the main window of some program itself)

What's the case if this is happening? Any ideas please?

Best regards, Smack

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

It's a child window!!!...???

I noticed that when you use WinMove() on a child window, it will only move within the parent, not the screen.

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

wingethandle? im not sure waht you mean

Share this post


Link to post
Share on other sites

Hi,

how can this be possible: 'If WinExist' just won't detect a window, but 'WinMove' has no problem moving that window around. ^_^

(it's a window inside a program, not the main window of some program itself)

What's the case if this is happening? Any ideas please?

Best regards, Smack

I assume you means WinExists? (Not WinExist)

Sounds unlikely to me ;)

Can you show some code which you used?


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

@ Valuator: Yes, i guess 'child window' is the correct name for this.

@ CodyBarrett: I've never used WinGetHandle, i always use WinExists

@ martin: WinExist must be WinExists, of course.

I only use the basics of Autoit, so it's a simple code like this:

If Not WinExists("name-of-window") Then

(some action)

ElseIf WinExists("name-of-window") Then

(some action)

EndIf

Best regards, Smack

Share this post


Link to post
Share on other sites

Hi,

try it with Opt. Have a look at WinDetectHiddenText, WinSearchChildren, WinTitleMatchMode and so on

Mega


Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

I have the sampe problem atm. Im trying to detect a Mediaportal window, but winexists cant see it when its open.


Software:Model Train Calculator (Screen)Autoit3 beginner!

Share this post


Link to post
Share on other sites

@Xenobiologist: will have a look at that. Thanks for mentioning it.

Share this post


Link to post
Share on other sites

If i want to use WinHandle, then how do i use that please?

Share this post


Link to post
Share on other sites

find the handle in the autoitinfo tool.... then use the examples in the window management section in the help file

like this

HELP>Autoit>Function reference>Window management

Share this post


Link to post
Share on other sites

I think if the window is appeared just and if you are trying to check if it exists, it may return an error. so add sleep command before the winexists command. may be it will work. i think u understand what i mean...


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

@CodyBarrett:

but how do i use that returned handle? If i use it in 'If WinExists()' instead of the window's name, then it still won't detect that window.

(AutoIt > Using AutoIt > Window Titles and Text (Advanced))

@Shaarad:

i want to check if a child window is opened, and if not, open it. But according to AutoIt the window is always there, even if it's closed.

I don't know what i'm doing wrong...

BTW, thanks for the replies.

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