Select Text on Page Canvas - Basic Example Requested

Hello friends,

is there a very basic example that would help me to find the word

##100##

in my OneNote page window and select that word.

I am using OneNote and I want to find that word in my page.

I am able to type into a page i have basic knowlege using macro recorder.

I need a very very newbie example as Im a bit stumped with all the information.

I dont know how to do this

How can I select the word in my onenote page

thank you for any help

:slight_smile:

Have you been through the RPA academy? This is the best resource for newbies.

Hi Richard,
I am looking for something really specific, I have been through many of the videos found on youtube and here

They are not good tutorials.

I want to know how exactly i can find some text on my screen.

Where is this tutorial that shows this specifically.

There is a function Text Exists - but how do i use this?

UI Path although a visual application is still not as intuitive to use, scraping some screen shots using the macro recorder is not helpful.

i would like to know how i can then implement this and make something tangible work

I have so many links and resources from here but i cant find what i need.

How exactly does one go about finding text on a screen?

thank you for any help

Here we go.

  • Opens Google.
  • Looks for text “Gmail”
  • pass any text in assignment activity that you want to search.
    FindText.xaml (8.8 KB)

Off topic but related to selecting texts or words or phrases.
Can we make robots highlight texts and use hot key Ctrl+V to copy them?

Sure.
Please find solution.

Hello dd,

thank you for the basic example this has been very helpful.
It works in google

I have set it up for OneNote but for some reason its not finding the text.

I have set it up correctly but so far no luck

are you getting any error?
whats the issue.

Hello d,
theres no error, just Text Not found from the message box

increasing timeoutMS property to 30000.
Check FormatedText property and try ,not sure it will work :slight_smile:
Could you please attach workflow.
are you using one note on online or office 365 installed in the system?

I am using OneNote on Desktop,

Ok let me increase time out

thank you

I increased the variables - Text Not found

No error - just message box text not found

HI,
Could you please attach workflow .

Hi d,

it wont allow me to upload the work flow :frowning:


<TextExpression.NamespacesForImplementation>
<sco:Collection x:TypeArguments=“x:String”>
<x:String>System.Activities</x:String>
<x:String>System.Activities.Statements</x:String>
<x:String>System.Activities.Expressions</x:String>
<x:String>System.Activities.Validation</x:String>
<x:String>System.Activities.XamlIntegration</x:String>
<x:String>Microsoft.VisualBasic</x:String>
<x:String>Microsoft.VisualBasic.Activities</x:String>
<x:String>System</x:String>
<x:String>System.Collections</x:String>
<x:String>System.Collections.Generic</x:String>
<x:String>System.Data</x:String>
<x:String>System.Diagnostics</x:String>
<x:String>System.Drawing</x:String>
<x:String>System.IO</x:String>
<x:String>System.Linq</x:String>
<x:String>System.Net.Mail</x:String>
<x:String>System.Xml</x:String>
<x:String>System.Xml.Linq</x:String>
<x:String>UiPath.Core</x:String>
<x:String>UiPath.Core.Activities</x:String>
<x:String>System.Windows.Markup</x:String>
</sco:Collection>
</TextExpression.NamespacesForImplementation>
<TextExpression.ReferencesForImplementation>
<sco:Collection x:TypeArguments=“AssemblyReference”>
System.Activities
Microsoft.VisualBasic
mscorlib
System.Data
System
System.Drawing
System.Core
System.Xml
System.Xml.Linq
UiPath.Core
UiPath.Core.Activities
PresentationFramework
WindowsBase
PresentationCore
System.Xaml
System.ComponentModel.Composition
System.ServiceModel
System.Runtime.WindowsRuntime
</sco:Collection>
</TextExpression.ReferencesForImplementation>


<Sequence.Variables>


</Sequence.Variables>

<Assign.To>
[searchText]
</Assign.To>
<Assign.Value>
[“#100#”]
</Assign.Value>

<ui:TextExists DisplayName=“Text Exists ‘#100#’” FormattedText=“True” sap2010:WorkflowViewState.IdRef=“TextExists_2” Occurrence=“1” Result=“[Found_My_Text]” Text=“[searchText]”>
ui:TextExists.Target
<ui:Target ClippingRegion=“{x:Null}” Element=“{x:Null}” Selector=“<wnd app=‘onenote.exe’ cls=‘Framework::CFrame’ /><wnd cls=‘OneNote::DocumentCanvas’ />” TimeoutMS=“100000” WaitForReady=“INTERACTIVE” />
</ui:TextExists.Target>
</ui:TextExists>

<If.Then>
<ui:MessageBox Caption=“{x:Null}” ChosenButton=“{x:Null}” Buttons=“Ok” DisplayName=“Message box” sap2010:WorkflowViewState.IdRef=“MessageBox_3” Text=“Text Has Been Found” TopMost=“True” />
</If.Then>
<If.Else>
<ui:MessageBox Caption=“{x:Null}” ChosenButton=“{x:Null}” Buttons=“Ok” DisplayName=“Message box” sap2010:WorkflowViewState.IdRef=“MessageBox_4” Text=“Text Not Found” TopMost=“True” />
</If.Else>


sads:DebugSymbol.SymboldzdDOlxVc2Vyc1xTaGFuYVxEZXNrdG9wXE9uZU5vdGUgLSBTZWFyY2ggVGV4dCAtIE5ldy54YW1sETsDWA4CAQE8BVYQAgECQQdIEAIBEUkHTRcCAQpOB1UMAgEDRjlGQgIBFEM6Q0YCARJJqgFJuAECAQ5JkwFJpAECAQxJiAFJiwECAQtLTEuwAQIBEEu7AUvDAQIBD04VTisCAQRQC1DIAQIBCFMLU8IBAgEGUKABULYBAgEJU6ABU7ABAgEH</sads:DebugSymbol.Symbol>

sap2010:WorkflowViewState.ViewStateManager
sap2010:ViewStateManager
<sap2010:ViewStateData Id=“Assign_2” sap:VirtualizedContainerService.HintSize=“653,60” />
<sap2010:ViewStateData Id=“TextExists_2” sap:VirtualizedContainerService.HintSize=“653,96” />
<sap2010:ViewStateData Id=“MessageBox_3” sap:VirtualizedContainerService.HintSize=“314,59” />
<sap2010:ViewStateData Id=“MessageBox_4” sap:VirtualizedContainerService.HintSize=“314,59” />
<sap2010:ViewStateData Id=“If_2” sap:VirtualizedContainerService.HintSize=“653,208” />
<sap2010:ViewStateData Id=“Sequence_6” sap:VirtualizedContainerService.HintSize=“675,568”>
sap:WorkflowViewStateService.ViewState
<scg:Dictionary x:TypeArguments=“x:String, x:Object”>
<x:Boolean x:Key=“IsExpanded”>True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id=“Sequence_2” sap:VirtualizedContainerService.HintSize=“697,692”>
sap:WorkflowViewStateService.ViewState
<scg:Dictionary x:TypeArguments=“x:String, x:Object”>
<x:Boolean x:Key=“IsExpanded”>True</x:Boolean>
</scg:Dictionary>
</sap:WorkflowViewStateService.ViewState>
</sap2010:ViewStateData>
<sap2010:ViewStateData Id=“OneNote_1” sap:VirtualizedContainerService.HintSize=“737,772” />
</sap2010:ViewStateManager>
</sap2010:WorkflowViewState.ViewStateManager>

I pasted it above

@Cosin @ovi @badita another one.

Note sure you can receive private message or not .
You can send xaml file to below mail id.
d.d.padil@gmail.com

for private msgs their are no such rules i guess @ddpadil

Thank you
I will attach the xaml

Hi,
It’s working for me.
Could you please share your one note doc

Hi d,

:black_medium_small_square: UI Path - Find Text

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum

#100#

is that what you mean above text?