contact  |  about  |  sitemap

Multiple Conditional If statement
Last Post 19 Mar 2010 11:13 AM by Tijn. 3 Replies.
Sort:
PrevPrev NextNext
Author Messages
Kim Lee

--
08 Mar 2010 05:50 PM
I am running a web extraction via a loop, i am having trouble with an IF condition.

It is for a employment site, so they have listing that say;

"posted 5 hours ago"
"posted 1 days ago"
"posted 10 days ago"
etc

I only want to run the extraction loop on anything that contains the text "hours" and "1 days ago", "2 days ago", and "3 days ago."

How can i write this If condition, can I just list them in one of the functions? like;(hours, 1,2,3) instead or writing multiple if conditions??

thank you


Tijn

--
10 Mar 2010 08:49 AM
I would use a copy text between action to grab the number to a number variable. Use posted as the from and a space to until the action.

Next you can use an if statement not greather then 4.
Tijn
kim lee

--
17 Mar 2010 09:46 PM
thanks for the response...BUT

as i said above, it will display "posted 4 hours ago, posted 15 hours ago, posted 3 days ago"

so I cant use a > integer because i will remove alot of the "posted x hours ago"

i was hopeing i could use the words "hours", "1 day ago", 3 days ago in the script somehow to either filter what i want to grab or what i want to put into the grid....

is there a way to do this?



Tijn

--
19 Mar 2010 11:13 AM
You could use a Text variable as a bool.
Like:
GO=FALSE
If contains hours: Go=TRUE
If contains 1 Days: Go=TRUE
If Go= TRUE then ...



Quick Reply
toggle
  Username:
Subject:
Body:
Security Code:
Enter the code shown above:

Submit

Powered by Active Forums

Forum participation and optional registration

You don't need to be registered to partcipate in the Djuggler forums, however if you want to subscribe to email notifications you need to register. You can also subscribe to the forum RSS feed.