Is there any possibility to display only the X characters from a string?
Like the LEFT$ function in Basic for example.
I'm trying to fit a certain string in a box (see image below).
Thank you,
Tikl
I found it!
You have to use a rich text module (I was using only text) and the [tr] BB code will format the text as you will.
It even adds '...' at the end of a trimmed text!
Tikl
Related
Hi all. Can someone who uses Notepad++ explain why you use this program over Notepad? I ask because of course, I already have Notepad and Notepad++ does not appear to be readily available. Does it offer any advantage to editing .xmls or something else?
I think you actually mean Notepad++, and here's a quick summary of its features according to Wikipedia:
Features
Some of its general features include:
Tabbed document interface
Drag-and-drop
Multiple Clipboard (plugin required)
Split screen editing and synchronized scrolling
Spell checker (requires Aspell) (Spell checker does not distinguish between text and code)
Supports text encoding formats such as Unicode, for international writing systems
Find and replace over multiple documents
File comparison
Zooming
Programming languages
Running under Mac OS X using the Wine compatibility layer.
It also includes features for source code editing:
Auto-completion
Bookmarks
Syntax highlighting and syntax folding
Brace and indent highlighting
Regular expression find and replace
Speech synthesis
FTP Browser (plug-in included in standard installation)
Macro recording and execution.
Various tools such as line sorting, text encoding conversion, text folding
File status auto-detection
Plugins for multiline regular expression search and replace
Notepad++ supports syntax highlighting and syntax folding for 48 programming, scripting, and markup languages. It attempts to automatically detect the language that a given file uses, using a modifiable list of file extension bindings. Users may also manually set the current language, overriding the extension's default language. The program also supports autocompletion for a subset of the API of some programming languages.
Users can also define their own language (for syntax highlighting) and its respective API (for autocompletion) by using the built-in User Language Define System. Users may configure the syntax highlighting's font styles per element, per language, and the resulting formatted script may be printed in full-color (WYSIWYG). Additionally, Notepad++ displays indent guidelines when source code is indented with tab characters, and highlights closing braces, brackets and tags.
Plugins
Notepad++ has support for macros and plugins. Currently, there are 27 official plugins for Notepad++, 10 of which are included by default in the program. The first plugin to be included in the program was "TextFX", which includes features such as W3C validation for HTML and CSS, text sorting, character case alteration and quote handling.
Hopefully that answers your question!
Ha I did mean Notepad++!! That's probably why I couldn't find much info on Wordpad lol.
I use it cause it allows you to save stuff as unix/linux. When you write code with regular notepad it adds under
un-wanted characters messing **** up. Notepad ++ dont do this
Sent from my SPH-D700 using Tapatalk
Thanks. I need to download that notepad++ tonight
Sent from my SPH-D700 using XDA App
running_the_dream said:
Hi all. Can someone who uses Notepad++ explain why you use this program over Notepad? I ask because of course, I already have Notepad and Notepad++ does not appear to be readily available. Does it offer any advantage to editing .xmls or something else?
Click to expand...
Click to collapse
I use it because of all of the features. There is no comparison. The main features I use are the code formatting, comparison, advanced search and replace & spell checker just to name a few.
Sent from my SPH-D700
Sent from my SPH-D700 using XDA App
Can this be accomplished below? I have all the .png and fonts, but not the regex know how etc...
From my experience most emoticons (emoji) do not use a font, but are rather bitmap graphics (e.g. emoticons in the default Android text editor). There are several downsides to using a font:
•Suppose you made the characters a, b, c, d etc into emoticons - the user would then be unable to read/send messages with those characters in without them turning to emoticons.
•Fonts are generally quite large as they contain a lot of information for displaying the text at different sizes/styles
Using bitmap graphics will allow you to easily use the same emoticons across a wide range of devices, whilst using standard device fonts the text around the emoticons.
You will have to parse the string that you are displaying, find the emoticons, and replace them with images.
On Android for instance you would accomplish this with:
1.Search the string for all emoticon occurences (regex can do this easily enough)
2.Replace all emoticons with the string <img src="emoticon.png" /> (althugh change emoticon.png based on the type of emoticon)
3.Convert the String to HTML with String myHtmlString = Html.fromHtml(myEmoticonString, myImageGetter, null);
4.Display the string in a TextView myTextView.setText(myHtmlString)
In step 3 myImageGetter needs to be an instance of Html.ImageGetter which returns a graphic (drawable) based on the src attribute of the images in the string (ie it converts a string file name to an actual graphic)
The steps on other platforms would be different but you should be able to use the same basic method (parse string, replace emoticons with images).
Any help or direction would be appreciated, I would do what I can if I had direction.
Thanks in advance!
10 little chars
Color emoji is POSSIBLE.. or is it (squinty eye emoji)...
Can this be accomplished below? I have all the .png and fonts, but not the regex know how etc... If i can get some help on starting a few lines, I will write the rest myself.
From my experience most emoticons (emoji) do not use a font, but are rather bitmap graphics (e.g. emoticons in the default Android text editor). There are several downsides to using a font:
•Suppose you made the characters a, b, c, d etc into emoticons - the user would then be unable to read/send messages with those characters in without them turning to emoticons.
•Fonts are generally quite large as they contain a lot of information for displaying the text at different sizes/styles
Using bitmap graphics will allow you to easily use the same emoticons across a wide range of devices, whilst using standard device fonts the text around the emoticons.
You will have to parse the string that you are displaying, find the emoticons, and replace them with images.
On Android for instance you would accomplish this with:
1.Search the string for all emoticon occurences (regex can do this easily enough)
2.Replace all emoticons with the string <img src="emoticon.png" /> (althugh change emoticon.png based on the type of emoticon)
3.Convert the String to HTML with String myHtmlString = Html.fromHtml(myEmoticonString, myImageGetter, null);
4.Display the string in a TextView myTextView.setText(myHtmlString)
In step 3 myImageGetter needs to be an instance of Html.ImageGetter which returns a graphic (drawable) based on the src attribute of the images in the string (ie it converts a string file name to an actual graphic)
The steps on other platforms would be different but you should be able to use the same basic method (parse string, replace emoticons with images).
Any help or direction would be appreciated, I would do what I can if I had direction.
Thanks in advance!
just asking
http://developer.oesf.biz/em/developer/reference/durian/android/emoji/EmojiFactory.html
http://gitorious.org/0xdroid/frameworks_opt_emoji/blobs/master/EmojiFactory.h
Just a bit of help.. I want to make emoji a part of the framework so all apps will see the emoji as a .png image instead of black n white.
Anyone?
I am making a spin-off of infobar, and I have it mostly working the want I want with two exceptions:
1) The weather string is usually fine, but in some cases it gets too large. Is there any way to get it to wrap to a specific bounding rectangle, or to shrink it if it gets past a certain length? Is there some way to test how long the string is? I don't want to use [tr], because I want to see the whole string.
2) Right now I am using [tr=0,25] to make sure the appointments don't overrun the box. I use [tr=0,25] instead of [tr=25] because I don't want the "..." for shorter strings. Is there some way to test the length of the string so I can only use the [tr] when I need to? That way I can get the "..." when it is appropriate. I tried using
$[tr=0,22]#C0TITLE#[tr]=#C0TITLE#?#C0TITLE#: [tr=22]#C0TITLE#[/tr]$
but the [tr=0,22]#C0TITLE#[tr]=#C0TITLE# always comes back as not equal.
Thanks.
mlkaufman said:
I am making a spin-off of infobar, and I have it mostly working the want I want with two exceptions:
1) The weather string is usually fine, but in some cases it gets too large. Is there any way to get it to wrap to a specific bounding rectangle, or to shrink it if it gets past a certain length? Is there some way to test how long the string is? I don't want to use [tr], because I want to see the whole string.
2) Right now I am using [tr=0,25] to make sure the appointments don't overrun the box. I use [tr=0,25] instead of [tr=25] because I don't want the "..." for shorter strings. Is there some way to test the length of the string so I can only use the [tr] when I need to? That way I can get the "..." when it is appropriate. I tried using
$[tr=0,22]#C0TITLE#[tr]=#C0TITLE#?#C0TITLE#: [tr=22]#C0TITLE#[/tr]$
but the [tr=0,22]#C0TITLE#[tr]=#C0TITLE# always comes back as not equal.
Thanks.
Click to expand...
Click to collapse
There is currently no way to test the length of a string in Zooper, sorry. As to the "wrap to a specific bounding rectangle", check out the X margin and Lines on a Rich Text Module The first defines the distance in pixels from the screen side when the text will break into additional lines. The second option sets into how many lines the text will break at maximum. Anything above that will be cut-off without an indicator like you get with the trim option. It's not exactly what you are looking for but I thought you might want another option to work with
hello, i am relatively new to zooper, but I'm pretty good with tasker.
I'm creating a basic notification widget, and i have it sending and updating the notification numbers just fine, but I am lazy and i don't wan't to have to copypasta the color codes/font sizes 12 times whenever i change my mind (frequently).
I have a tasker widget called" Zooper Widget Vars" pushing these commands (via the Zooper Widget Pro Variable plugin) (brackets are obviously not in the code)
configuration #TZFLG# = 50 (large size for icons)
configuration #TZFSM# = 10 (small size for numbers)
configuration #TZFLGC# = #ffffffff (color for icons)
configuration #TZFSMC# = #ff66d5da (color for numbers)
And i just press play whenever i want to send the variables to Zooper.
in zooper, in a rich text module, I have:
[s=#TZFSM#][c=#TZFSMC#]#TWHATSAPPCT#[/c][/s]
and in another Rich text module I have:
[s=#TZFLG#][c=#TZFLGC#]f[/c][/s]
#TZFSM#,#TZFLG#,#TZLGC# and #TZFSMC#
#TWHATSAPPCT# updates just fine. Problem is, #TZFSM# and #TZFSMC# do not update the widget until #TWHATSAPPCT# changes. #TZFLG# and #TZLGC# do not change at all unless I manually change the letter icon and change it back, which is, quite frankly, a pain in the ass.
I have tried just sticking #TZFSM#,#TZFLG#,#TZLGC# and #TZFSMC# in an RT module without the BBcode around them, and their values do print out, so I know that Zooper is actually receiving them, but its just ignoring them when they are enclosed in BBtags.
In layman's terms, the widget will not redraw with the new color and size parameters unless the content that the bbcode is modifying changes. Ive spent about 2 hours youtubing and googleing and wiki-ing, and I've decided I'm a noob and should just ask for help.
thank you so much in advance for any assistance.
(Nexus 5 with the lollipop dev preview installed)
P.S. though I think that ZW Utilities is a lovely little tool, it does not solve the lack of size updates, so please do not direct me there.
digitalgraffiti said:
hello, i am relatively new to zooper, but I'm pretty good with tasker.
I'm creating a basic notification widget, and i have it sending and updating the notification numbers just fine, but I am lazy and i don't wan't to have to copypasta the color codes/font sizes 12 times whenever i change my mind (frequently).
I have a tasker widget called" Zooper Widget Vars" pushing these commands (via the Zooper Widget Pro Variable plugin) (brackets are obviously not in the code)
configuration #TZFLG# = 50 (large size for icons)
configuration #TZFSM# = 10 (small size for numbers)
configuration #TZFLGC# = #ffffffff (color for icons)
configuration #TZFSMC# = #ff66d5da (color for numbers)
And i just press play whenever i want to send the variables to Zooper.
in zooper, in a rich text module, I have:
[s=#TZFSM#][c=#TZFSMC#]#TWHATSAPPCT#[/c][/s]
and in another Rich text module I have:
[s=#TZFLG#][c=#TZFLGC#]f[/c][/s]
#TZFSM#,#TZFLG#,#TZLGC# and #TZFSMC#
#TWHATSAPPCT# updates just fine. Problem is, #TZFSM# and #TZFSMC# do not update the widget until #TWHATSAPPCT# changes. #TZFLG# and #TZLGC# do not change at all unless I manually change the letter icon and change it back, which is, quite frankly, a pain in the ass.
I have tried just sticking #TZFSM#,#TZFLG#,#TZLGC# and #TZFSMC# in an RT module without the BBcode around them, and their values do print out, so I know that Zooper is actually receiving them, but its just ignoring them when they are enclosed in BBtags.
In layman's terms, the widget will not redraw with the new color and size parameters unless the content that the bbcode is modifying changes. Ive spent about 2 hours youtubing and googleing and wiki-ing, and I've decided I'm a noob and should just ask for help.
thank you so much in advance for any assistance.
(Nexus 5 with the lollipop dev preview installed)
P.S. though I think that ZW Utilities is a lovely little tool, it does not solve the lack of size updates, so please do not direct me there.
Click to expand...
Click to collapse
Instead of entering the bbcode in the text field with the text did you try separating it out and entering it in the advanced parameters field.
jr67 said:
Instead of entering the bbcode in the text field with the text did you try separating it out and entering it in the advanced parameters field.
Click to expand...
Click to collapse
in the end i figured it out with putting all of the styling in the advanced params space and the content in the text area
thanks for your help!