Confused about If-Then. Please help

Discuss RoboTask here

Confused about If-Then. Please help

Postby lacazet2k » Sun Feb 23, 2020 4:54 pm

Hi, I'm new to RoboTask and have the following issue. My task has an action step of highlighting a string of text from a website, and then (CTRL+C) to copy. I want to use the IF-THEN command to check

IF this copied string of text contains the word "roof"
THEN remove roof from the string before I paste it with the next step of the task.

I've read the manual but don't understand what First/Second operand are in my situation, or where I set up the IF-THEN function relative to my other steps in my task.

Please help me
tks
lacazet2k
 
Posts: 1
Joined: Sun Feb 23, 2020 4:50 pm

Re: Confused about If-Then. Please help

Postby Oleg » Mon Feb 24, 2020 10:56 am

look at my example
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
 
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|444033236
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
ExternalName=STRING|"Task231"
Hide=INTEGER|0
ID=INTEGER|-625463694
LogOnAsUser=INTEGER|1
Name=STRING|"check clipboard"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER

[Actions\Action1]
ActionID=STRING|"A_FLOW_IF"
Enabled=INTEGER|-1
Name=STRING|"If Then"
Params=FOLDER

[Actions\Action1\Params]
case=STRING|"0"
connection=STRING|"0"
count=STRING|"1"
operator=STRING|"6"
type=STRING|"0"
value1=STRING|"roof"
value2=STRING|"{ClipBoardContent}"

[Actions\Action2]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show """"roof"" is in clipboard text"""
Params=FOLDER

[Actions\Action2\Params]
icon=STRING|"1"
msg0=STRING|"""roof"" is in clipboard text"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"

[Actions\Action3]
ActionID=STRING|"A_FLOW_ELSE"
Enabled=INTEGER|-1
Name=STRING|"Else"

[Actions\Action4]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""Clipboard doesn't contain necessary word"""
Params=FOLDER

[Actions\Action4\Params]
icon=STRING|"3"
msg0=STRING|"Clipboard doesn't contain necessary word"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"

[Actions\Action5]
ActionID=STRING|"A_FLOW_ENDIF"
Enabled=INTEGER|-1
Name=STRING|"End If"


Save the text of the task to a file and use menu Task->Import to import the task into RoboTask.
Do not forget to enable the task after importing.
Oleg Yershov
Oleg
Site Admin
 
Posts: 2511
Joined: Thu Jan 01, 1970 1:00 am


Return to General Discussion

Who is online

Users browsing this forum: Majestic-12 [Bot], MSN [Bot] and 14 guests

cron