AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Fancy Font Generator - chars changer

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
X-unknown
Guest





PostPosted: Fri Mar 19, 2010 1:02 pm    Post subject: Fancy Font Generator - chars changer Reply with quote

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 Embarassed , 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





PostPosted: Fri Mar 19, 2010 1:05 pm    Post subject: Reply with quote

i need help quick

thx to anyone who bothers
Back to top
X
Guest





PostPosted: Fri Mar 19, 2010 1:06 pm    Post subject: Reply with quote

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

PostPosted: Fri Mar 19, 2010 1:42 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group