Jump to content
Sign in to follow this  
Atti

How do I add spaces in between strings?

Recommended Posts

TrayTip ("Bot Status", "Waiting and Searching For a Target                                        Percent of Life:" & $hpp      &   "Percent of Energy:" & $epp, 100)

I've tried adding spaces, but alas, no spaces are put into the Tray Tip... If anyone can tell me how I'd really be happy!

(or tell me how to make a traytip have a return on a line, so text will appear on the next line as opposed to having to tab/ space down to the next line)

Share this post


Link to post
Share on other sites

TrayTip ("Bot Status", "Waiting and Searching For a Target                                          Percent of Life:" & $hpp         &   "Percent of Energy:" & $epp, 100)

I've tried adding spaces, but alas, no spaces are put into the Tray Tip... If anyone can tell me how I'd really be happy!

(or tell me how to make a traytip have a return on a line, so text will appear on the next line as opposed to having to tab/ space down to the next line)

<{POST_SNAPBACK}>

spaces:

TrayTip ("Bot Status", "Waiting and Searching For a Target Percent of Life: " & $hpp & " Percent of Energy: " & $epp, 100)

line breaks:

TrayTip ("Bot Status", "Waiting and Searching For a Target" & @lf & "Percent of Life: " & $hpp & @lf & "Percent of Energy: " & $epp, 100)


Phillip

Share this post


Link to post
Share on other sites

Oh, and can I slap a % to the end of a variable w/o changing it's value?

e.g. $hpp = 100

But I want it to say 100% in the tray tip?

Share this post


Link to post
Share on other sites

Oh, and can I slap a % to the end of a variable w/o changing it's value?

No, just think a second about it: You cannot change the value without changing it's value.

How did you display the text before the variables? Just do the same thing with the %.

Share this post


Link to post
Share on other sites

sugi, you are optimistic about the ability of this guy of understanding something... I guess he understand nothing about the & operator...

I am afraid he meant:

TrayTip ("Bot Status", "Waiting and Searching For a Target" & @lf & "Percent of Life: " & $hpp & "%"& @lf & "Percent of Energy: " & $epp & "%", 100)

Edited by ezzetabi

Share this post


Link to post
Share on other sites

Oh dear... The & operator means CONCANTENATE! So: yes of course

You need concatenating different const, variant or macros!

So if the value of $test is 'Hello' and you want to concatenate with the const ' world' you have to write

$test & ' world'

is it so hard?!?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...