How to Remove or alter button image

Get help with using AutoHotkey and its commands and hotkeys
Question1000

How to Remove or alter button image

24 Nov 2017, 16:57

Can someone please tell me how to remove or alter an image of another programs button?

The Button is identified as ClassNN: WindowsForms10.BUTTON.app.0.2982bee_r28_ad122

I'm able to alter its position and size using controlmove however the image in the button doesn't scale with the size change. I need to either get it to change to text only alter the image to scale.

I'm really stumped on this one. Thanks in advance.
Haxt0r Baxtor

Re: How to Remove or alter button image

24 Nov 2017, 17:14

Question1000 wrote:Can someone please tell me how to remove or alter an image of another programs button?

The Button is identified as ClassNN: WindowsForms10.BUTTON.app.0.2982bee_r28_ad122

I'm able to alter its position and size using controlmove however the image in the button doesn't scale with the size change. I need to either get it to change to text only alter the image to scale.

I'm really stumped on this one. Thanks in advance.
i just did this, post up your code you have ill fix if i can
Question1000

Re: How to Remove or alter button image

24 Nov 2017, 18:13

Here is a excerpt of my code. This part all works. However the the image in the button doesn't scale with the changes and looks bad.

Code: Select all

IfWinExist, ahk_class WindowsForms10.Window.848.app.0.2982bee_r28_ad1
{
  WinGet, active_id, ID, ahk_class WindowsForms10.Window.848.app.0.2982bee_r28_ad1
  FUNK_ControlMoveRelative("WindowsForms10.BUTTON.app.0.2982bee_r28_ad122",0,0,-60,-10,active_id) ; Resize Button
}
Return

; ========================================
; FUNK_ControlMoveRelative
; ========================================

FUNK_ControlMoveRelative(ControlName,ChangeX,ChangeY,ChangeW,ChangeH,WinTitle)
{
  ControlGetPos , Control1X, Control1Y, Control1W, Control1H, %ControlName%, ahk_id %WinTitle%
  NControl1X:=Control1X+ChangeX
  NControl1Y:=Control1Y+ChangeY
  NControl1W:=Control1W+ChangeW
  NControl1H:=Control1H+ChangeH
  ControlMove,%ControlName%,%NControl1X%,%NControl1Y%,%NControl1W%,%NControl1H%, ahk_id %WinTitle%
}

Haxt0r Baxtor

Re: How to Remove or alter button image

24 Nov 2017, 19:04

Question1000 wrote:Here is a excerpt of my code. This part all works. However the the image in the button doesn't scale with the changes and looks bad.

Code: Select all

IfWinExist, ahk_class WindowsForms10.Window.848.app.0.2982bee_r28_ad1
{
  WinGet, active_id, ID, ahk_class WindowsForms10.Window.848.app.0.2982bee_r28_ad1
  FUNK_ControlMoveRelative("WindowsForms10.BUTTON.app.0.2982bee_r28_ad122",0,0,-60,-10,active_id) ; Resize Button
}
Return

; ========================================
; FUNK_ControlMoveRelative
; ========================================

FUNK_ControlMoveRelative(ControlName,ChangeX,ChangeY,ChangeW,ChangeH,WinTitle)
{
  ControlGetPos , Control1X, Control1Y, Control1W, Control1H, %ControlName%, ahk_id %WinTitle%
  NControl1X:=Control1X+ChangeX
  NControl1Y:=Control1Y+ChangeY
  NControl1W:=Control1W+ChangeW
  NControl1H:=Control1H+ChangeH
  ControlMove,%ControlName%,%NControl1X%,%NControl1Y%,%NControl1W%,%NControl1H%, ahk_id %WinTitle%
}

change only the W or the H and dont have anything for the one you dont change,

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], justAnotherUser, roysubs, Sweetins and 203 guests