 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
X-unknown Guest
|
Posted: Fri Mar 19, 2010 1:02 pm Post subject: Fancy Font Generator - chars changer |
|
|
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
can anyone plz help , this is my first try to write a script after so much inspiration from the community plus ive never programmed b4 |
|
| Back to top |
|
 |
X Guest
|
Posted: Fri Mar 19, 2010 1:05 pm Post subject: |
|
|
i need help quick
thx to anyone who bothers |
|
| Back to top |
|
 |
X Guest
|
Posted: Fri Mar 19, 2010 1:06 pm Post subject: |
|
|
here is the scipt:
| 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
|
|
|
| Back to top |
|
 |
Jasdeep
Joined: 09 Nov 2009 Posts: 258
|
Posted: Fri Mar 19, 2010 1:42 pm Post subject: |
|
|
try this
| Code: |
Gui, Add, Edit, r9 gFontgen 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
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
}
return
GuiClose:
ExitApp
|
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|