ClassNN changes dynamically?

pavel_j

Member²
Hello,
I'm using AutoHotKey for adding (some) missing hotkeys in PLSQL developer. I know that adding a better support for keyconfiguration into plsql developer has a low priority and will be added maybe in a far future. I need to use hotkeys now.

My problem is that ClassNN is changed (dynamically?) for column filter in results, _WHY_ ??? (see images). I'm not able to click this control by AutoHotKey if these are changed. It's annoyning.

Is there some algorithm for generating ClassNN, which I would copy in my AutoHoyKey script or it's generated randomly?

filter-hot-key-change1.png


filter-hot-key-change2.png

 
I'm not sure why that happens. Maybe these identifiers change if multiple SQL Windows are opened?

The button has a logical name "ColFilterBtn", just like all other buttons on the SQL Window toolbar have logical names.
 
Last edited:
Maybe it's not possible to solve easily, because you use logicalname 'ColFilterBtn' and and ClassNN is probably created dynamically on runtime. I had only one window opened and when I close and open window and run sql, buttons are generated and probably also ClassNN are generated as well.
 
If somebody interest, I have found a solution. Buttons (icons) have an image with specific color on it. If you find color, you can check if you are going to push a correct button.

My AHK script is not perfect, but it seems it's working.

^!f:: ;ctrl+alt+f - hotkey for pressing filter button in SQL result
obj = TcxSpeedButton45 ;check if ClassNN TcxSpeedButton45 is correct button
ControlGetPos, x_pos, y_pos, w_size, h_size, %obj%
PixelGetColor, mycolor, x_pos+8, y_pos+8
if (mycolor = "0xB17D4A") {
PushButton(obj, x_pos, y_pos)
return
}

obj = TcxSpeedButton44
ControlGetPos, x_pos, y_pos, w_size, h_size, %obj%
PixelGetColor, mycolor, x_pos+8, y_pos+8
if (mycolor = "0xB17D4A") {
PushButton(obj, x_pos, y_pos)
return
}

obj = TcxSpeedButton46
ControlGetPos, x_pos, y_pos, w_size, h_size, %obj%
PixelGetColor, mycolor, x_pos+8, y_pos+8
if (mycolor = "0xB17D4A") {
PushButton(obj, x_pos, y_pos)
return
}

PutMessage(mycolor, "filter button not found", x_pos, y_pos)
return

; procedure push button on position x,y on object "obj"
PushButton(obj, x, y) {
MouseMove, x+8, y+8
SetControlDelay -1
ControlClick, %obj%,,,,, NA
}

; prints message
PutMessage(myColor, myText, x, y) {
MsgBox %myText%: %mycolor%, %x%, %y%
}
 
Back
Top