TYPE=A|BUTTON, IF Statement, and Regex

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
umarcos
Posts: 5
Joined: Thu Jan 02, 2020 7:36 pm

TYPE=A|BUTTON, IF Statement, and Regex

Post by umarcos » Thu Jan 02, 2020 7:47 pm

Hi. I am new to iMacros.

I use Windows 10 Pro and iMacros v12.6.

I have 3 simple questions:

A) TAG POS=1 TYPE=BUTTON ATTR=TXT:*
B) TAG POS=1 TYPE=A ATTR=TXT:*

Q1) I want to combine the two into one like TYPE=BUTTON|A
How can I do this? What is the OR equivalent?

Q2) I need something like below:

If (TAG POS=1 TYPE=BUTTON ATTR=TXT:*) { Do something }
else if (TAG POS=1 TYPE=A ATTR=TXT:*) { Do something }

How can I do this?

TAG POS=1 TYPE=A ATTR=TXT:answer1
TAG POS=1 TYPE=A ATTR=TXT:answer2
TAG POS=1 TYPE=A ATTR=TXT:answer3

Q3) I want to combine the 3 into one using regular expressions like TAG POS=1 TYPE=A ATTR=TXT:answer\d+

How can do this?

Thank you in advance.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: TYPE=A|BUTTON, IF Statement, and Regex

Post by chivracq » Sun Jan 05, 2020 7:21 pm

umarcos wrote:
Thu Jan 02, 2020 7:47 pm
Hi. I am new to iMacros.

I use

Code: Select all

Windows 10 Pro and iMacros v12.6.
I have 3 simple questions:

Code: Select all

 A) TAG POS=1 TYPE=BUTTON ATTR=TXT:*
 B) TAG POS=1 TYPE=A ATTR=TXT:*
Q1) I want to combine the two into one like TYPE=BUTTON|A
How can I do this? What is the OR equivalent?

Q2) I need something like below:

Code: Select all

       If (TAG POS=1 TYPE=BUTTON ATTR=TXT:*) { Do something }
       else if (TAG POS=1 TYPE=A ATTR=TXT:*) { Do something }
How can I do this?

Code: Select all

 TAG POS=1 TYPE=A ATTR=TXT:answer1
 TAG POS=1 TYPE=A ATTR=TXT:answer2
 TAG POS=1 TYPE=A ATTR=TXT:answer3
Q3) I want to combine the 3 into one using regular expressions like TAG POS=1 TYPE=A ATTR=TXT:answer\d+

How can do this?

Thank you in advance.

Alright, I didn't "intend" to reply in this current Thread as I don't "intend" to help for this one as your Scenario feels related to a Game/Competition and I usually don't help in such Cases... (Your 3 Qt's are not very clearly organized btw...)

>>>

But hum, you had opened this Thread already in the "wrong" Sub-Forum, this current Thread has nothing specific to the 'Data Extraction' Sub-Forum, OK, I didn't say anything, I would have asked the Forum Admin "later" to move your Thread to the "correct" Sub-Forum (=> 'General'), but, hum...!, you just opened a 2nd Thread, and again, in the same "wrong" 'Data Extraction' Sub-Forum, grrr...! :shock:

:arrow: => Can you delete that 2nd Thread, and recreate it in the 'General' Sub-Forum...? :!:
(The Content is "fine", it's only that you opened it in the wrong Sub-Forum... And mention also in your FCI if you are using iMB v12.6 'Full'/'Trial'...?)

I could help for that one, but I don't want to post in it (yet), and start answering it, until the Thread has been "moved" to the correct Sub-Forum, which can be done in 2 Ways: Either "really" moved from one Sub-Forum to another one, which I cannot do myself, only the Forum Admin (which could take several days/weeks)..., or you delete it from one Sub-Forum and recreate it in another one... (Reason I am posting in this current Thread and not in the "incriminated" one, or you won't be able to delete it if I post in it after you...) :idea:

Thanks, and try "in the Future" to select the "correct" Sub-Forum when you open a New Thread... (or I don't help...) :wink:
(The 'General' one is always OK if you are "unsure"...)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
umarcos
Posts: 5
Joined: Thu Jan 02, 2020 7:36 pm

Re: TYPE=A|BUTTON, IF Statement, and Regex

Post by umarcos » Mon Jan 06, 2020 10:36 am

I am going to erase this soon and post a new one in the right area.

Thank you.

BTW, I never play any computer or smartphone games. I don't even play poker. lol
Also, I never thought I could use iMacros for games. lol
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: TYPE=A|BUTTON, IF Statement, and Regex

Post by chivracq » Mon Jan 06, 2020 1:53 pm

umarcos wrote:
Mon Jan 06, 2020 10:36 am
I am going to erase this soon and post a new one in the right area.

Thank you.

BTW, I never play any computer or smartphone games. I don't even play poker. lol
Also, I never thought I could use iMacros for games. lol

"Also, I never thought I could use iMacros for games. lol"
=> Oh...!, yep you can...! and that's actually where I gained 90% of my Knowledge about iMacros myself..., (and the remaining 10% from answering Threads on the Forum), so that's a very good "Learning School", I would think... :oops:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
User avatar
thecoder2012
Posts: 446
Joined: Sat Aug 15, 2015 5:14 pm
Location: Internet
Contact:

Re: TYPE=A|BUTTON, IF Statement, and Regex

Post by thecoder2012 » Sun Jan 26, 2020 7:16 pm

chivracq wrote:
Mon Jan 06, 2020 1:53 pm
=> Oh...!, yep you can...! and that's actually where I gained 90% of my Knowledge about iMacros myself..., (and the remaining 10% from answering Threads on the Forum), so that's a very good "Learning School", I would think... :oops:
Only 10%? Really low. :wink:
Join 9kw.eu Captcha Service now and let your iMacros continue downloads and scripts while you sleep. - Custom iMacros? Contact me! :idea:
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: TYPE=A|BUTTON, IF Statement, and Regex

Post by chivracq » Mon Jan 27, 2020 1:28 am

thecoder2012 wrote:
Sun Jan 26, 2020 7:16 pm
chivracq wrote:
Mon Jan 06, 2020 1:53 pm
=> Oh...!, yep you can...! and that's actually where I gained 90% of my Knowledge about iMacros myself..., (and the remaining 10% from answering Threads on the Forum), so that's a very good "Learning School", I would think... :oops:
Only 10%? Really low. :wink:

Yeah well, I only liked one of my free Fingers and put it in the Wind to pull out those "Statistics", so make it 80%-20% if you like, ah-ah...! :P
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Post Reply