add text from web page to a variable and convert it to int
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
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
add text from web page to a variable and convert it to int
Hello guys,
I want to add a text from a web page to a variable and convert it to integer value.
EX.
I have a web page and there is a text in that page like (Hello i am 20 years old.)
And this is the html code with class <b class="hello">Hello i am 20 years old.</b>
Now i want to take "20" to a variable and covert it to integer to add this number to another integer variable.
Any help?!!
I want to add a text from a web page to a variable and convert it to integer value.
EX.
I have a web page and there is a text in that page like (Hello i am 20 years old.)
And this is the html code with class <b class="hello">Hello i am 20 years old.</b>
Now i want to take "20" to a variable and covert it to integer to add this number to another integer variable.
Any help?!!
Re: add text from web page to a variable and convert it to i
CIM...! (Read my Sig...)Ha3li wrote:Hello guys,
I want to add a text from a web page to a variable and convert it to integer value.
EX.
I have a web page and there is a text in that page like (Hello i am 20 years old.)
And this is the html code with class <b class="hello">Hello i am 20 years old.</b>
Now i want to take "20" to a variable and covert it to integer to add this number to another integer variable.
Any help?!!
Well, use 'EXTRACT' to extract your Field and 'EVAL()' to isolate the "20" from the Extract and to do your Data Manipulation...
- (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...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: add text from web page to a variable and convert it to i
Thanks, but what if "20" is dynamic not static (changes every time i refresh the page)chivracq wrote:CIM...! (Read my Sig...)Ha3li wrote:Hello guys,
I want to add a text from a web page to a variable and convert it to integer value.
EX.
I have a web page and there is a text in that page like (Hello i am 20 years old.)
And this is the html code with class <b class="hello">Hello i am 20 years old.</b>
Now i want to take "20" to a variable and covert it to integer to add this number to another integer variable.
Any help?!!
Well, use 'EXTRACT' to extract your Field and 'EVAL()' to isolate the "20" from the Extract and to do your Data Manipulation...
i.e. next time the text will be (Hello i am 23 years old.) and so on.
Re: add text from web page to a variable and convert it to i
You missed the "CIM" part...Ha3li wrote:Thanks, but what if "20" is dynamic not static (changes every time i refresh the page)
i.e. next time the text will be (Hello i am 23 years old.) and so on.
- (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...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: add text from web page to a variable and convert it to i
And..., any Follow-up/Progress...?
... As I see that you are checking your Thread..., you don't need 3 days to mention 3 Versions I would think...!?
... As I see that you are checking your Thread..., you don't need 3 days to mention 3 Versions I would think...!?
- (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...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: add text from web page to a variable and convert it to i
Yup, i get itchivracq wrote:And..., any Follow-up/Progress...?
... As I see that you are checking your Thread..., you don't need 3 days to mention 3 Versions I would think...!?
Code: Select all
SET !EXTRACT_TEST_POPUP NO
TAG POS=1 TYPE=b ATTR=CLASS:hello EXTRACT=TXT
SET !VAR1 EVAL("var s=\"{{!EXTRACT}}\"; s.split(' ')[3];")
SET !VAR1 EVAL("parseInt({{!var1}})")
Re: add text from web page to a variable and convert it to i
Yep..., very-very good...! That's one very good Solution... And Thanks for sharing...Ha3li wrote:Yup, i get itchivracq wrote:And..., any Follow-up/Progress...?
... As I see that you are checking your Thread..., you don't need 3 days to mention 3 Versions I would think...!?
Thanks for u broCode: Select all
SET !EXTRACT_TEST_POPUP NO TAG POS=1 TYPE=b ATTR=CLASS:hello EXTRACT=TXT SET !VAR1 EVAL("var s=\"{{!EXTRACT}}\"; s.split(' ')[3];") SET !VAR1 EVAL("parseInt({{!var1}})")
You didn't mention your FCI like I asked you (x2), fair enough then..., but be aware that next time you'll open a Thread, I won't even react if you don't include that Required Info in your OP, just saying...
EDIT: Hum..., and that's exactly what I mean, applied to your 2nd Thread that you just opened...
But hum..., we are not going to be "Friends" I'm afraid..., and I wouldn't answer that 2nd Thread anyway as I only help Users using the Forum "a bit correctly"..., which starts by opening your Threads in the correct Sub-Forum...! Your 2nd Thread has nothing to do with 'Data Extraction'...., grr...!
Correct Sub-Forum is the 'General' one... (You can still delete that Thread (as long as nobody posts in it after you) and open it in the correct Sub-Forum...)
+ I don't answer Threads either with ugly Typos / Spelling Mistakes in the Thread Title...
Last edited by chivracq on Thu Mar 22, 2018 10:11 pm, edited 1 time in total.
- (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...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: add text from web page to a variable and convert it to i
I am so sorry, but i am a new user here and i don't know what do you mean about these sentenceschivracq wrote:Yep..., very-very good...! That's one very good Solution... And Thanks for sharing...Ha3li wrote:Yup, i get itchivracq wrote:And..., any Follow-up/Progress...?
... As I see that you are checking your Thread..., you don't need 3 days to mention 3 Versions I would think...!?
Thanks for u broCode: Select all
SET !EXTRACT_TEST_POPUP NO TAG POS=1 TYPE=b ATTR=CLASS:hello EXTRACT=TXT SET !VAR1 EVAL("var s=\"{{!EXTRACT}}\"; s.split(' ')[3];") SET !VAR1 EVAL("parseInt({{!var1}})")
You didn't mention your FCI like I asked you (x2), fair enough then..., but be aware that next time you'll open a Thread, I won't even react if you don't include that Required Info in your OP, just saying...
CIM...! (Read my Sig...)
You missed the "CIM" part...
You didn't mention your FCI
i am sorry again
Re: add text from web page to a variable and convert it to i
Yeah, well, "Read my Sig..." means "Read my Signature..." which explains completely "CIM"/"FCIM"/"FCI"...Ha3li wrote:I am so sorry, but i am a new user here and i don't know what do you mean about these sentences
CIM...! (Read my Sig...)
You missed the "CIM" part...
You didn't mention your FCI
i am sorry again
Or you can read the Forum Rules like you should have done..., for Required Info to include in your OP when you start a Thread...
And hum, I edited my previous Reply in the time that you were posting your new Reply... (concerning your 2nd Thread...)
- (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...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: add text from web page to a variable and convert it to i
Now i know what do you mean about CIM.chivracq wrote:Yeah, well, "Read my Sig..." means "Read my Signature..." which explains completely "CIM"/"FCIM"/"FCI"...Ha3li wrote:I am so sorry, but i am a new user here and i don't know what do you mean about these sentences
CIM...! (Read my Sig...)
You missed the "CIM" part...
You didn't mention your FCI
i am sorry again
Or you can read the Forum Rules like you should have done..., for Required Info to include in your OP when you start a Thread...
And hum, I edited my previous Reply in the time that you were posting your new Reply... (concerning your 2nd Thread...)
I deleted my 2nd thread.
I respect that "we are not going to be "Friends" I'm afraid".
Finally i have not a lot of English, because i am a middle eastern (Egyptian) .. "I don't answer Threads either with ugly Typos / Spelling Mistakes in the Thread Title".
Thanks a lot.