Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Use ClassNN in active window



  • Please log in to reply
6 replies to this topic
heegenees
  • Members
  • 51 posts
  • Last active: May 23 2014 10:17 AM
  • Joined: 14 Apr 2014

Hello,

 

I want to use the ClassNN of a button to left click it.

It is not possible to use the Windows Title as it changes every time.

Because of that I want to use the A to use the active window. I used the following code but nothing happends:

ControlClick, WFC.Edit.14, A, left,

I've checked http://www.autohotke...ontrolClick.htm but can't figure out why it is not working.

Any idea's?



stanman
  • Members
  • 177 posts
  • Last active: Oct 10 2015 12:52 AM
  • Joined: 29 Apr 2004

You could use WinGetActiveTitle to find the title of the active window. http://www.autohotke...ActiveTitle.htm

Left click is the default so you can leave that out.

WinGetActiveTitle, Title
ControlClick, WFC.Edit.14, %Title%

Are sure the control name is correct? Did you check with Window Spy?

 

Edited to add percent signs.



heegenees
  • Members
  • 51 posts
  • Last active: May 23 2014 10:17 AM
  • Joined: 14 Apr 2014

You could use WinGetActiveTitle to find the title of the active window. http://www.autohotke...ActiveTitle.htm

Left click is the default so you can leave that out.

WinGetActiveTitle, Title
ControlClick, WFC.Edit.14, Title

Are sure the control name is correct? Did you check with Window Spy?

I tried your code but it still does not work.

I checked the ClassNN with windows spy.

 

You can try it yourself using Adobe Reader 9.4.5.236

Try the following code:

^n::
WinGetActiveTitle, Title
ControlClick, AVL_AVView44, Title, AVToolbarEasel

It should open File>Open

But nothing happends.



stanman
  • Members
  • 177 posts
  • Last active: Oct 10 2015 12:52 AM
  • Joined: 29 Apr 2004
✓  Best Answer

Oops, I forgot the percent signs in my code. However I don't have Adobe Reader so I couldn't actually test this. Try this:

^n::
WinGetActiveTitle, Title
ControlClick, AVL_AVView44, %Title%, AVToolbarEasel
Return


Oldman
  • Members
  • 2475 posts
  • Last active: Feb 18 2015 04:57 PM
  • Joined: 01 Dec 2013

I think AVL_AVView44 is not the toolbar, but it is the AVPageView. If you click into the page, it is not going to open the Open Dialog window.

You could replace the ControlClick by a Send, ^O (Ctrl+O), this is the shortcut key to open the open dialog window.

 

For WFC.Edit.14, I need more information. What program are you using and what do you want to do ?


Si ton labeur est dur et que tes résultats sont minces, souviens toi du grand chêne qui avant n'était qu'un gland....comme toi ! (anonyme) ;)

L'art de lire, c'est l'art de penser avec un peu d'aide. (É. Faguet)

Windows 3.1. Collector's Edition.     (www.avaaz.org)


heegenees
  • Members
  • 51 posts
  • Last active: May 23 2014 10:17 AM
  • Joined: 14 Apr 2014

I think AVL_AVView44 is not the toolbar, but it is the AVPageView. If you click into the page, it is not going to open the Open Dialog window.

You could replace the ControlClick by a Send, ^O (Ctrl+O), this is the shortcut key to open the open dialog window.

 

For WFC.Edit.14, I need more information. What program are you using and what do you want to do ?

HPSD, it the program name.

The classNN is a little button, if it's clicked a box appears giving two options to choose from.

I typed WFC.Edit.14 but that was only a textfield I used in HPSD to test it with. The actual box is:  WFC.Windows.839. If I use windows spy on it, it gives the following output:

>>>>>>>>>>( Window Title & Class )<<<<<<<<<<<
1.085.624 - Achmea Change
ahk_class WFC.Window.8

>>>>>>>>>>>>( Mouse Position )<<<<<<<<<<<<<
On Screen:	1902, 210  (less often used)
In Active Window:	1906, 214

>>>>>>>>>( Now Under Mouse Cursor )<<<<<<<<
ClassNN:	WFC.Window.839
Text:	
Color:	0xFFFFFF  (Blue=FF Green=FF Red=FF)

>>>>>>>>>>( Active Window Position )<<<<<<<<<<
left: -4     top: -4     width: 1928     height: 1153

>>>>>>>>>>>( Status Bar Text )<<<<<<<<<<



heegenees
  • Members
  • 51 posts
  • Last active: May 23 2014 10:17 AM
  • Joined: 14 Apr 2014
WinGetActiveTitle, Title
ControlClick, WFC.Edit.14, %Title%

Solved my issue, it was missing the procent signs. Tnx stanman!

And ofcourse tnx Oldman for thinking with me.