Jump to content
Sign in to follow this  
Wolfshare

Check if class exist

Recommended Posts

Wolfshare

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
JLogan3o13

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
JLogan3o13

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
JLogan3o13

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
jdelaney

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
mikell

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
JLogan3o13

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  

×