I have string i want to replace slash(/) with comma(,)
Please take a look at my attempts:
This work well with dash(-):
Code: Select all
Clipboard = Android / Windows / Xbox One
StringReplace, NewName, % Clipboard, /, -, All
MsgBox, %NewName%
Return
When i write comma(,) between quotes instead dash(-) it does not work (I thought I should to put quotes because there is a parameter):
Code: Select all
Clipboard = Android / Windows / Xbox One
StringReplace, NewName, % Clipboard, /, ",", All
MsgBox, %NewName%
Return
The code below works as expected but as you can see I have to set a variable containing the comma sign,
Is there a better way to do this thing?
Code: Select all
Clipboard = Android / Windows / Xbox One
Comma := ","
StringReplace, NewName, % Clipboard, /, %Comma%, All
MsgBox, %NewName%
Return
Esc::ExitApp