Select item in dropdown list by taking the text from user - sikuli

By taking user-input, search for the text in the dropdown. If exists, select it. Else, print: "the text is not present in dropdown".

In Sikuli, you have 2 ways to recognize textual data:
By taking a screenshot of the whole text and creating a pattern.
Use built in OCR features to find the text directly.
It is known however that OCR functionality is very limited and not reliable at the moment, hence the preferred solution is to take screenshot of every option you have in your dropdown menu. Then you can just click on the dropdown menu to display the options and then look for your pattern. If the item will be there, you will get a match if not, you know that it doesn't exist.
Assuming you have already saved you text as a pattern in a file, the code will be fairly simple:
find("dropDownMenu.png).click()
if exists("menuItem.png"):
click("menuItem.png") #not very efficient! Left for code simplicity.
else:
print "the text is not present in dropdown"

Related

SharePoint (lists) - Multiline clamping (display only the first line)

I have a column that contains multiline data and I am trying to keep only the first line visible and hide the rest so I can have a nice displayed list with minimum gap between the lines. Ideally a JSON script to customize the column formatting. I tried to keep only a certain number of characters visible, works but then again the problem is that when you open the record, the information in that multiline field is not showing but only the number of characters we limited to be displayed in the first place.
I was thinking about putting the value of the first line in a different column (single line text) and have the rest in a different column, that i can just hide. but when i hide that column, i am not able to use my power automate flow as it detects that it is not available (...) if i can get that to work then my problem is resolved.
Appreciate everyone's inpu
There is no such function to hide a part of the multiline. We can only show or hide the whole item in the column. SharePoint will display top 5 lines and hide the others as default.
Elaborating on the comment: Power Automate does not have to work with the view that the user sees in the SharePoint browser interface. You can create a new view in SharePoint and include only the columns you need for the workflow. Give the view a nice, descriptive name.
Then, in Power Automate you can use the Get Items command and under Advanced options > Limit Columns by View specify which view you want to use to return the list items. In the screenshot, I'm using a view I called wfView. This will return the columns of that view, plus some of the SharePoint default fluff.

Looking to make an HTML form with and edit field connected to a list

I would like to preset an HTML page that has list box (scrollable) that is connected to an edit field. Every time the edit field is updated the list box should show only the items that match the text pattern in the edit field.
Am sure it's possible but not even sure what it's called and all my Google attempts have failed.
Thanks
For anyone who comes across this same question, the term that I was looking for was "creating an autocomplete form."

get an option list where the cursor is according to what the user has typed in text area

I am making a word prediction software. I have a text area. I want that as the user types something in that text area, an option list should appear on that cursor, the option list should contain all the predictions.
I just want to know how that option list can appear near the cursor in text area.
this can be accomplished using Jquery AutoComplete, but you will need to save all the words to be predicted (may be in json format for example) or use a server-side function

Scroll a number of lines in a Spark textarea

I am writing a database program that allows searches for imported books. On the left hand side of my screen is a Spark TextArea and on the right is a List that shows the results of the search.
When I click on the List, I load the chapter into the TextArea. Here is my problem that I simply cannot figure out. I want the top sentence in the TextArea to be the sentence that was clicked in the List.
I know how many sentences are in my TextArea because I control the "\n". How do I get line xx at the top of TextArea?
For instance, the user searches for "truth" and finds 20 entries for this book. He clicks on a choice in List. That chapter is loaded into the TextArea. This particular chapter has 400 lines. The line I want at the top is line 230. The user can immediately see the context for what follows his choice. He may scroll up to see what precedes.
I've searched and tried a host of ideas but with no success.
Can anyone help with this?
Thanks!
Use TextArea#scrollToRange(). You just pass in the index of the first character of the result and it will scroll to the position you want. I've used it in the past and I remember it working, though it can take some work to get it working exactly as you want.

Adding list items to a page tactically

I have about 2000 items that I want to add my page. They are right now in alphabetical order in a word doc, and I want to add them in a list sort of manner. Since there are so many of them, and I basically right now am adding each of them one by one I needed to know if there is a quicker way I am missing? Please let me know if so.
Ok I've got some real trick out here go to TinyMCE, Copy Paste the list of words, select all and make it as a list and press submit now copy paste all the items from "Source output from post"
Open your dreamweaver and the page you are working on.
Paste the texts
Select All
Go Properties Panel Find the list button then click it. It should convert all the texts to list items