Has this issue been brought up before or anyone else notice this?
let>myString="Hello & World"
MessageModal>Did you say %myString%
OUTPUT: Did you say "Hello & World"
ASK>Did you say %myString%,r1
OUTPUT: Did you say "Hello_World"
It drops the & and replaces it with a _
ASK - Not displaying '&' correctly.
Moderators: Dorian (MJT support), JRL
Actually it repaces it with _. If you look carefully you'll see the first space is still there.It drops the & and replaces it with a _
The ampersand is special within the Ask> prompt. It lets you underscore the character following the ampersand. If you want to see the ampersand in the prompt, put in two of them.
Ask>Hello && World,res
Hi BrianM and JRL,
You also have to watch out for the special properties of the Ampersand & char when creating Label text in dialogs... and with label text you place on a Button in a dialog and other objects... its just a Windows thing.
You also have to watch out for the special properties of the Ampersand & char when creating Label text in dialogs... and with label text you place on a Button in a dialog and other objects... its just a Windows thing.
See dialog demo below:A out-take from [url]http://en.wikipedia.org/wiki/Ampersand[/url] wrote:In Microsoft Windows menus, labels and other captions, the ampersand is used to denote the keyboard shortcut for that option (Alt + that letter, which appears underlined). A double ampersand is needed in order to display a real ampersand. This convention originated in the first WIN32 api, and is used in Windows Forms,[21] and is also copied into many other tookits on multiple operating systems.
Code: Select all
Dialog>Dialog1
object Dialog1: TForm
Left = 251
Top = 97
HelpContext = 5000
BorderIcons = [biSystemMenu]
Caption = 'CustomDialog'
ClientHeight = 144
ClientWidth = 300
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
ShowHint = True
OnTaskBar = False
PixelsPerInch = 96
TextHeight = 13
object Label1: TLabel
Left = 35
Top = 33
Width = 32
Height = 13
Caption = 'Label1'
end
object Label2: TLabel
Left = 35
Top = 89
Width = 32
Height = 13
Caption = 'Label2'
end
object MSButton1: tMSButton
Left = 163
Top = 27
Width = 89
Height = 25
Caption = 'MSButton1'
DoubleBuffered = True
ParentDoubleBuffered = False
TabOrder = 0
DoBrowse = False
BrowseStyle = fbOpen
end
object MSButton2: tMSButton
Left = 163
Top = 83
Width = 89
Height = 25
Caption = 'MSButton2'
DoubleBuffered = True
ParentDoubleBuffered = False
TabOrder = 1
DoBrowse = False
BrowseStyle = fbOpen
end
end
EndDialog>Dialog1
Let>Var1=Hello&Goodbye
Let>Var2=Hello&&Goodbye
SetDialogProperty>Dialog1,Label1,Caption,Var1
SetDialogProperty>Dialog1,Label2,Caption,Var2
SetDialogProperty>Dialog1,MSButton1,Caption,Var1
SetDialogProperty>Dialog1,MSButton2,Caption,Var2
Show>Dialog1
Wait>10
jpuziano
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -
Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post -