Sign in to follow this  
Followers 0
Wolfshare

Check if class exist

11 posts in this topic

Hey, i am trying to make a check if class exist.. but class name is: "32770" and title is Sandboxie, but another program is runing which title is simuliar to Sandboxie - "Sandboxie Control", so i am trying to make script check when sandboxie exist, which class is "32770"..

I cannot use 

if winexist("sandboxie") then.. because there is sandboxie and sandboxie control, i just need somehow to make it detect when Only sandboxie exist..

Anyone could help me with this?

Share this post


Link to post
Share on other sites



You cannot find unique text to include in your WinExist call? Have you tried WinGetHandle?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

How it looks like..

post-59586-0-89233800-1388163960_thumb.p

Share this post


Link to post
Share on other sites

So when you hover the AutoIt Window Info Tool, does it return the text? You should be able to use this to specify which of the Sandboxie windows you want.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

How to make that?

Share this post


Link to post
Share on other sites

Try

Opt("WinTitleMatchMode", 3)   ; Exact title match

Share this post


Link to post
Share on other sites

The text is the second parameter in the WinExists function, e.g. WinExists("Sandboxie", <text in window>). If you look in your AutoIt installation directory you will see Au3Info.exe (Au3Info_X64.exe), this is the AutoIt Window Info tool. Use it to find unique text on the window.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

32770's are popups of another application.  You can use this to grab it's handle (hparent is the handle of the parent window):

_WinAPI_GetWindow($hParent,6)
Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

How this will work?

Share this post


Link to post
Share on other sites

Wolfshare,

If you put

Opt("WinTitleMatchMode", 3) ; Exact title match

at the top of the script, your  WinExists("Sandboxie")  should match "Sandboxie" but not "Sandboxie Control" :)

Share this post


Link to post
Share on other sites

How this will work?

 

At some point you need to try it on your own. We can only spoon-feed so much.


√-1 2^3 ∑ π, and it was delicious!

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