i am making a Fancy Font Generator
it has two edit boxes : ed1 and ed2
it works like this that when i enter abc in the first editbox (ed1) , the second edit box automatically returns @ß©
i tried to write a function using StringReplace and RegexReplace but didnt succeed because the variables got mixed up and only the last character , that is, © was changed
here's the basic code=needs IMPROVEMENT
it has lots of irrelevant lines....
Code:
Gui, Add, Edit, r9 gUpdate vMyEdit, Text to appear inside the edit control (omit this parameter to start off
Gui, Add, Edit, r9 vMyEdit2, Text to appear inside the edit control (omit this parameter to start off empty).
gui, show,, Fancy Font Generator
gui, submit, nohide
;setTimer, Fontgen, 200
Fontgen:
gui, submit, nohide
if (MyEdit = "a")
{
GuiControl, ,MyEdit2, @
Return
}
else if (MyEdit = "b")
{
GuiControl, ,MyEdit2, ß
return
}
else if (MyEdit = "c")
{
GuiControl, ,MyEdit2, ©
return
}
else
{
GuiControl, ,MyEdit2, %MyEdit%
return
}
Update:
gui, submit, nohide
NewStr:=RegExReplace(MyEdit, "a", "@")
GuiControl,, MyEdit2, %NewStr%
gui, submit, nohide
NewStr:=RegExReplace(MyEdit, "b", "B")
GuiControl,, MyEdit2, %NewStr%
;StringReplace, a1, MyEdit,a,@, All
;gui, submit, nohide
;GuiControl,, MyEdit2, %a1%
;StringReplace, b1, MyEdit,b,ß, All
;gui, submit, nohide
;GuiControl,, MyEdit2, %b1%
;StringReplace, MyEdit2, MyEdit,b,ß, All
;GuiControl,, MyEdit2, %MyEdit2%
;StringReplace, MyEdit2, MyEdit,c,©, All
;GuiControl,, MyEdit2, %MyEdit2%
;StringReplace, MyEdit2, MyEdit,d,d, All
;GuiControl,, MyEdit2, %MyEdit2%
return
GuiClose:
ExitApp