Jump to content

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

Change Button Names terrible problem...


  • Please log in to reply
2 replies to this topic
polyethene
  • Administrators
  • 5511 posts
  • Last active: Yesterday, 03:52 AM
  • Joined: 26 Oct 2012
This is the code I'm using...
ChangeButtonNames: 
IfWinNotExist, AutoMagic Auto-Spinner , , return  ; Keep waiting.
SetTimer, ChangeButtonNames, off 
WinActivate 
ControlSetText, &Yes, &Yes
ControlSetText, &No, &No
ControlSetText, Cancel, &Manual

ControlSetText, Cancel, &Manual


If you notice in the last line the 'Cancel' doesn't have the & sign before it because when I use the & sign it doesn't work, and if I remove the & sign form the other ControlSetText's then it doesn't work.

This worries me, why is it that the 'Cancel' won't accept the & sign before it like normal when other's can. Will this affect users with other computers? Please help me rectify the problem.

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
The & symbol is used to indicate which letter of the button is underlined (underlined letters represent keyboard shortcuts that can be used instead of pressing that button). Because the Cancel button lacks an underlined letter, there is no ampersand in that case.

By the way, the title of each button can be determined more exactly by looking in WindowSpy's "Visible Window Text" section.

polyethene
  • Administrators
  • 5511 posts
  • Last active: Yesterday, 03:52 AM
  • Joined: 26 Oct 2012
Thankyou.