Skorn Posted November 20, 2005 Posted November 20, 2005 (edited) 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: unnamedClass: AfxFrameOrView70sSize: X: -4 Y: -4 W: 1928 H: 1208>>>>>>>>>>> Mouse Details <<<<<<<<<<<Screen: X: 73 Y: 65Cursor ID: 2>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<RGB: Hex: 0x9D9DA1 Dec: 10329505>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<Size: X: -2 Y: 0 W: 1194 H: 34Control ID: 59392ClassNameNN: ToolbarWindow321Text: >>>>>>>>>>> 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: unnamedClass: AfxFrameOrView70sSize: X: -4 Y: -4 W: 1928 H: 1208>>>>>>>>>>> Mouse Details <<<<<<<<<<<Screen: X: 93 Y: 62Cursor ID: 2>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<RGB: Hex: 0xE0DFE3 Dec: 14737379>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<Size: X: -2 Y: 0 W: 1194 H: 34Control ID: 59392ClassNameNN: ToolbarWindow321Text: >>>>>>>>>>> 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 Edited November 20, 2005 by Skorn
Skorn Posted November 21, 2005 Author Posted November 21, 2005 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
herewasplato Posted November 21, 2005 Posted November 21, 2005 (edited) I changed it a bit:$pos = MouseGetPos() MouseClick("left", 72, 65, 1, 0) MouseMove($pos[0], $pos[1], 0) Edited November 21, 2005 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size]
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now