Is it possible to get RichEditBox text written by the user in UWP? - win-universal-app

I have a RichEditBox in a UWP project.
Is it possible to extract the text written by the user with all the new lines?
I can't find an attribute like RichEditBox.Text.
Is it maybe the wrong tool for my purpose?

I must use the Document property of RichEditBox.
https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.richeditbox.document.aspx

Related

How to find element in appium using text?

I want to click on a button on a website. Is there a code which can allow me to click on the element by using the TEXT field? I can neither use the resource id field nor name as they are empty. I tried to click on the element using the xpath but that did not work.
this is example using Java, but i believe that it is pretty easy to migrate it to a Python.
You need to use AndroidUiAutomator:
androidDriver.findElementByAndroidUIAutomator("new UiSelector().text(\"your_text\")").click();

How to correctly utilize Zip Code entity for DialogFlow?

I'm currently trying to use the built in entity '#sys.zip-code' from DialogFlow (formerly API.AI) for capturing Zip Codes. However so far it does not seem to recognize any actual zipcodes except those which I explicitly set through training. It also does not recognize the '5 digit' pattern as a possible match if #sys.phone-numbers is used in another intent (ex: 54545 gets recognized as a phone number, rather than a zip).
Should I upload a list of known zipcodes through the training section to get this working? Or is there something I'm missing from the built in functionality? Haven't seen a ton of info online on how to best utilize this entity, so figured I'd ask here before coming up with a custom solution.
Thanks in advance!
I think the best way to prompt a user when the bot says something like "could I get your name and zip code? ".The intent which i have created contains multiple combinations of “User says”.They are as below
#"#sys.given-name #sys.zip-code"
#"#sys.zip-code #sys.given-name"
#"#sys.given-name"
#"#sys.zip-code"
and I also have required Parameters setup to pick these values with prompt messages.
So I have attached a picture for this which i have iterated

Does Blockly have a file selector?

I am looking to use Blockly to allow non-techie users to specify test scripts.
One part of it will require a File Selector, however, I can't see that Blockly has one. Does it?
Actually, I can't find a complete list of standard blocks. Does anyone have a URL?
If there is no standard Blockly File Selector, (how) can I access the Windows File Selector? (and how, in general, can I execute DOS commands?)
As far as I know, I think that you cannot get a File Selector from Blockly but maybe this post is useful for you in which a man creates a custom Block for this purpose.
Also, I could not find a list with only the names of all the standard blocks but I saw that on the playground of Blockly you can see all the standard blocks that Google provides to you. If you want to see the code of all of them you can see it on Blockly GitHub.
I suppose that if Blockly does not have a File Selector it will not also has access to the Windows File Selector but maybe you can create a custom Block for that purpose via Javascript (I do not know what programming language are you using for). This link can help with Javascript Windows File Selector.
I expect it will be useful for you!
You can override the showEditor_ function on a blockly input - this works quite well with FieldTextInput. See https://youtu.be/eYHo0VeSLCI for an example of an 'intercepted' click opening a jquery mobile dialog, that then fills in the text value. The text value is then retrieved by the javascript generator to load the selected file at 'runtime'.
I've pasted below some cut down code:
Show a standard text input
let fileInput = new Blockly.FieldTextInput('** CHOOSE A FILE **')
Then you can attach a click handler which would show your file selector - so the standard browser file selector may do...
fileInput.showEditor_=(()=>alert("Intercepted"))
You'll need to replace the alert with your file selector code. Your code will also need to set the value of the text input - with something like this:
let block = Blockly.mainWorkspace.getBlockById(block_id)
block.setFieldValue(filename, widget_id)
Where widget_id identifies the text input and block_id the actual containing block.

Adding a LIKE Finder on a Localized column in Liferay Service Builder

I have a column that have been set to Localized="true", is there a way to add a finder that only matches LIKE on specific locale?
Unfortunately, I don't think it would be possible: localized columns are stored as xml strings in db, and I haven't found any example of a search like this in Liferay source. Have you considered using the index? It would be way easier to do a LIKE query for a localized field.
You can use xPath (if you use a db engine that supports it, for example postgresql)

Lotus Notes: RichText Item

Okay, here's the deal. I am using C# with the Domino API. I have some rich text data that I want to insert into a lotus notes rich text field.
NotesDocument.ReplaceItemValue just inserts the text as is with no formatting.
NotesDocument.CreateRichTextItem gives me a NotesRichTextItem object that I can use for manually creating RichText (methods like AddNewLine() AddPageBreak() etc). But it does not have any kind of Parse method to get already formatted rich text data, which is what I need. I want my users to put whatever they want in there - so using the aforementioned methods is useless to me.
The NotesRichTextItem.Values object throws an error when I try to add a rich text formatted string.
So now, what do I do? I guess I'm pretty much screwed here, but hoping some genius will come up with a solution. Any help much appreciated.
Thanks guys!
PS - Inserting notes rich text data or HTML data would be fine. Either one would be just as good as long as it displays proper rich text in the document and not an unformatted string.
Well, I found an answer - it's not pretty, but it works! What I did was
Use the DXL Exporter to grab the xml
edit it (adding the rich text) and then
Delete the original document
Use the DXL importer to import the edited document
Voila! :-D
Thanks anyway for such a quick response :-)
Without knowing the details of your application, I'm not sure this would suffice. But you can store HTML as text within a Notes rich text field, and then in your Notes app display the field as "pass-through HTML". Downside is that you would not be able to do subsequent editing from the Notes client. Also, the HTML rendering engine within the Notes client is pretty poor, so you may not get anywhere near full fidelity.
If that doesn't meet your needs, you can always look into using the Notes C API (rather than the COM/API you are using). The lower level API does allow you to insert anything into a rich text field, but you will need to write the parser / converter yourself. Search for Composite Data (CD) records.
Here is a link to the API site: http://www14.software.ibm.com/webapp/download/nochargesearch.jsp?k=ALL&status=Active&q=Lotus+%22C+API%22
Does the API not provide you with access to the various rich text classes? Perhaps they could help? For example, there are classes for NotesRichTextStyle, NotesRichTextNavigator, NotesRichTextSection, NotesRichText, and so on and so forth.

Resources