KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

how to insert an @ symbol

 
Post new topic   Reply to topic    KiXforms Forum Index -> Starters Code Clinic
View previous topic :: View next topic  
Author Message
scifiiman
KiXforms Novice
KiXforms Novice


Joined: 18 May 2011
Posts: 4

PostPosted: Fri Aug 12, 2011 7:57 pm    Post subject: how to insert an @ symbol Reply with quote

i would like to insert an email address into a label, whenever i try to do it, right now i get an unknown where the @ symbol is, what is the correct way of doing this?

Code:

$Label = $Form.Controls.Add("Label")
$Label.Text = "If you require technical assistance please contact IT via email@address.com or by following the link provided."+@CRLF++@CRLF+"Thank you"
$Label.TextAlign = 16
$Label.FontSize = 12
$Label.Width = $Form.Width-25
$Label.Height = $Form.Height-90
$Label.Top = 10
$Label.Left = 10
$Label.FontBold = 1
$Label.ForeColor = "Black"
$Label.BackColor = "White"
$Label.Image = $System.Bitmap(@SCRIPTDIR + "\WSP_logo.jpg")
$Label.ImageAlign = 4
Back to top
View user's profile Send private message
scifiiman
KiXforms Novice
KiXforms Novice


Joined: 18 May 2011
Posts: 4

PostPosted: Fri Aug 12, 2011 10:55 pm    Post subject: Reply with quote

nevermind, i figured it out, just need to have 2 @ in order for it to work, so email@@address.com did the trick.
Back to top
View user's profile Send private message
eriqjaffe
KiXforms Follower
KiXforms Follower


Joined: 16 Aug 2004
Posts: 19
Location: Arlington Heights, IL, USA

PostPosted: Fri Aug 19, 2011 4:42 pm    Post subject: Reply with quote

scifiiman wrote:
nevermind, i figured it out, just need to have 2 @ in order for it to work, so email@@address.com did the trick.

You can also do the following at the head of your script:

Code:
$ = SetOption("NoMacrosInStrings","ON")
$ = SetOption("NoVarsInStrings","ON")

That will essentially ignore @ (NoMacros) and $ (NoVars) symbols inside of strings.
Back to top
View user's profile Send private message
scifiiman
KiXforms Novice
KiXforms Novice


Joined: 18 May 2011
Posts: 4

PostPosted: Mon Aug 29, 2011 4:48 pm    Post subject: Reply with quote

thanks, one other question, i know how to add a link into the message box, but is there a specific way to add an email address as a link so that it would launch your default mail client like outlook when clicked?
Back to top
View user's profile Send private message
enahsyemotp
KiXforms Regular
KiXforms Regular


Joined: 22 Sep 2010
Posts: 40
Location: Tulsa, OK

PostPosted: Mon Aug 29, 2011 6:19 pm    Post subject: Reply with quote

I'm not sure you can use a LABEL as a clickable link. BUT, there is a builtin hyperlink object you can use...I made up a quick example below.

Code:
Break On
$RC=setoption("NoVarsinstrings","on")
$RC=setoption("NoMacrosinstrings","on")

$System = CreateObject("Kixtart.System")

$Form = $System.Form()

$Label = $Form.Controls.Add("Label")
$Label.Text = "If you require technical assistance please contact IT via email@address.com or by following the link provided."+@CRLF+@CRLF+"Thank you"
$Label.TextAlign = 16
$Label.FontSize = 12
$Label.Width = $Form.Width-25
$Label.Height = $Form.Height-90
$Label.Top = 10
$Label.Left = 10
$Label.FontBold = 1
$Label.ForeColor = "Black"
$Label.BackColor = "White"
$Label.Image = $System.Bitmap(@SCRIPTDIR + "\WSP_logo.jpg")
$Label.ImageAlign = 4

$Link = $Form.Controls.Add("Hyperlink")
$Link.Value = "mailto:email@address.com"
$Link.Text = "Click Me To Send An Email"
$Link.Width = $Form.Width
$Link.Center()
$Link.Top = $Label.Bottom

$Form.Show()

While $Form.Visible
   $Nul = Execute($System.DoEvents)
Loop

Exit 0
Back to top
View user's profile Send private message
scifiiman
KiXforms Novice
KiXforms Novice


Joined: 18 May 2011
Posts: 4

PostPosted: Mon Aug 29, 2011 6:32 pm    Post subject: Reply with quote

great, thanks for the help!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Starters Code Clinic All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group