Jump to content

Recommended Posts

Posted (edited)

Hi


I need to use ControlGetPos() on VLC's Video Output control.
This control's class is named differently each run of VLC:
On one run it may be "VLC video output 02E20328"
and on the second     "VLC video output 02D56114"

So the only known part is the beginning: "VLC video output ".


Is it possible somehow to reference a Control with a partial Class name?


Thank you

 

Edited by Zohar
Posted

Hi FrancescoDiMuro


Thank you very much.


I am curious to ask:
What does the "(?i)" before the string mean?
And also, why in the end there's a "." before the *?


Thank you

Posted (edited)

@Zohar

The "i" at the start of the string is called a modifier, and it tells to the RegEx engine:

"Don't care about capitalization; threat VLC and vlc (and all the other possible combinations) in the same manner.

The ".*" at the end of the string, instead, is a metacharacter (the dot), and a quantifier (the asterisk), and they tell to the RegEx:

"After matching VLC Video Output, there could be 0 to N character (every character) after that string", so you don't need to worry about what does follow the string, but just be secure that VLC Video Output is in the string :)

Edited by FrancescoDiMuro

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Posted

Terrific, thank you so much.

I am using it, and it works.


I am also curious to ask,
If I ever want to get the Control's Name as string, and hold it in a variable,
Is there a way to List the controls that are on a Window (specified by a Window Handle)?

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...