Jump to content

Clicking Toolbar Buttons


Skorn
 Share

Recommended Posts

Hello, Did several searches on this and came up empty. I have an application which has a toolbar with some buttons that have no keyboard shortcut associated with them. So I'm trying to write a script to do just that. The problem is identifying each individual button to send a controlclick to it. For example here is the info for 2 of the buttons:

Button 1:

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<

Title: unnamed

Class: AfxFrameOrView70s

Size: X: -4 Y: -4 W: 1928 H: 1208

>>>>>>>>>>> Mouse Details <<<<<<<<<<<

Screen: X: 73 Y: 65

Cursor ID: 2

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<

RGB: Hex: 0x9D9DA1 Dec: 10329505

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size: X: -2 Y: 0 W: 1194 H: 34

Control ID: 59392

ClassNameNN: ToolbarWindow321

Text:

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<

(1): Flip selected brushes along x-axis

(2): x:: 0.0 y:: 288.0 z:: 280.0

(3): Selection X:: 128.0 Y:: 128.0 Z:: 8.0

(4):

(5): G:8.00 T:1.00 R:45 C:13 L:MR

(6):

Button 2:

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<

Title: unnamed

Class: AfxFrameOrView70s

Size: X: -4 Y: -4 W: 1928 H: 1208

>>>>>>>>>>> Mouse Details <<<<<<<<<<<

Screen: X: 93 Y: 62

Cursor ID: 2

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<

RGB: Hex: 0xE0DFE3 Dec: 14737379

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size: X: -2 Y: 0 W: 1194 H: 34

Control ID: 59392

ClassNameNN: ToolbarWindow321

Text:

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<

(1): Rotate selected brushes along x-axis

(2): x:: -384.0 y:: -112.0 z:: 0.0

(3): Selection X:: 128.0 Y:: 128.0 Z:: 8.0

(4):

(5): G:8.00 T:1.00 R:45 C:13 L:MR

(6):

The only major differences besides their pixel location is the status bar text. So is there a way to send a controlclick to a toolbar button by using it's status bar text??

Thanks B)

Edited by Skorn
Link to comment
Share on other sites

Maybe

;button1

MouseClick(73, 65, 1)

8)

heh yea i actually used this code:

$pos = MouseGetPos()
    MouseMove (72, 65, 0)
    MouseClick ("left", 72, 65)
    MouseMove ($pos[0],$pos[1],0)

but its really kind of hacky, wish there was a cleaner way to activate the function behind the button

thanks

Link to comment
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
 Share

  • Recently Browsing   0 members

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