Loop throw couple of numbers?

Discussions and Tech Support specific to the iMacros for Chrome extension.
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
ifchor
Posts: 18
Joined: Wed Oct 03, 2018 2:17 pm

Loop throw couple of numbers?

Post by ifchor » Thu Feb 07, 2019 11:38 am

BUILD=1005 RECORDER=CR
OPERATING SYSTEM = WINDOWS 10 Pro / Version 1809 / English
BROWSER= Chrome 72
I AM A BEGINNER, NEED TO HELP TO MAKE A LOOP (PLEASE!). I HAVE BEEN TRYING TO READ AND READ BUT I AM NOT ABLE TO GET THE ANSWER... SORRY GUYS!

So i need to loop around pairs of numbers: (i.e. 23000 & 30000, 30001 & 37000...etc). I tried to create an array but did not succeed. Here is the code!

Thanks in advance.

Here's the code!

TAG POS=1 TYPE=A ATTR=TXT:Refine<SP>Ship<SP>SearchRefine
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTFrom CONTENT=23001
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTTo CONTENT=30000
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:Form1 ATTR=ID:ctl00_btnSearch2
WAIT SECONDS=2
TAG POS=1 TYPE=SPAN ATTR=TXT:Export<SP>Selected
WAIT SECONDS=2
TAG POS=1 TYPE=SPAN ATTR=TXT:Excel<SP>(XLSX)
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Refine<SP>Ship<SP>SearchRefine
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTFrom CONTENT=30001
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTTo CONTENT=37000
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:Form1 ATTR=ID:ctl00_btnSearch2
WAIT SECONDS=2
TAG POS=1 TYPE=SPAN ATTR=TXT:Export<SP>Selected
WAIT SECONDS=2
TAG POS=1 TYPE=SPAN ATTR=TXT:Excel<SP>(XLSX)
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Refine<SP>Ship<SP>SearchRefine
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTFrom CONTENT=37001
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTTo CONTENT=47000
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:Form1 ATTR=ID:ctl00_btnSearch2
WAIT SECONDS=3
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Loop throw couple of numbers?

Post by chivracq » Thu Feb 07, 2019 7:58 pm

ifchor wrote:
Thu Feb 07, 2019 11:38 am

Code: Select all

BUILD=1005       RECORDER=CR
OPERATING SYSTEM = WINDOWS 10 Pro / Version 1809 / English
BROWSER= Chrome 72 
I AM A BEGINNER, NEED TO HELP TO MAKE A LOOP (PLEASE!). I HAVE BEEN TRYING TO READ AND READ BUT I AM NOT ABLE TO GET THE ANSWER... SORRY GUYS!

So i need to loop around pairs of numbers: (i.e. 23000 & 30000, 30001 & 37000...etc). I tried to create an array but did not succeed. Here is the code!

Thanks in advance.

Here's the code!

Code: Select all

TAG POS=1 TYPE=A ATTR=TXT:Refine<SP>Ship<SP>SearchRefine
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTFrom [b]CONTENT=23001[/b]
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTTo [b]CONTENT=30000[/b]
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:Form1 ATTR=ID:ctl00_btnSearch2
WAIT SECONDS=2
TAG POS=1 TYPE=SPAN ATTR=TXT:Export<SP>Selected
WAIT SECONDS=2
TAG POS=1 TYPE=SPAN ATTR=TXT:Excel<SP>(XLSX)
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Refine<SP>Ship<SP>SearchRefine
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTFrom [b]CONTENT=30001[/b]
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTTo [b]CONTENT=37000[/b]
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:Form1 ATTR=ID:ctl00_btnSearch2
WAIT SECONDS=2
TAG POS=1 TYPE=SPAN ATTR=TXT:Export<SP>Selected
WAIT SECONDS=2
TAG POS=1 TYPE=SPAN ATTR=TXT:Excel<SP>(XLSX)
WAIT SECONDS=2
TAG POS=1 TYPE=A ATTR=TXT:Refine<SP>Ship<SP>SearchRefine
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTFrom CONTENT=37001
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTTo CONTENT=47000
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:Form1 ATTR=ID:ctl00_btnSearch2
WAIT SECONDS=3
Are you using the 'Free' or the 'PE' Version...?

- If using the 'PE' Version, the "easiest" Sol would be to use some '.CSV' DataSource...
- If using the 'Free' Version, "creating an Array" would also be the way I would implement it, and it works, as I use it myself in several of my Scripts, ah-ah...! 8)

=> How did you try to create and implement using "your" Array...?
(Thing to know is that iMacros (Built-in) Vars are not able to handle "True" Arrays, only Strings..., that you then each time need to "re-convert on-the-fly" to Arrays using 'EVAL()' + 'split()'... :idea: )
- (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...
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Loop throw couple of numbers?

Post by chivracq » Fri Feb 08, 2019 6:48 am

Hum, any Feedback...?, as I'm nearly surprised I ever approved any of of your Posts on this Forum, as you seem to be hiding behind some Proxy/VPN Provider...: (Typical Spam-Behaviour, ah-ah...! :roll: )

=> Can you react to your QT and my Qt a bit quick...? :idea:
(Chance is "otherwise" your Account might get deleted as a "Spam" Account, just saying...) :idea:
Sorry for you but you are using a very IP, and "everything" you'll be doing on our Forum will be "suspicious", ah-ah...!
=> IP [52.114.*.* - Proxy/VPN - Ireland + IP Reported as Blacklisted for SPAM]
=> Be happy you are still allowed to post on our Forum...
=> (And if +10 from the same Proxy/VPN Provider, and 5x Spam in the Past, then we block the whole [0-255] IP-Range...! 8)

Get the Picture...!? :wink:
(Never a good Idea to register to some Forum through some "hiding" Technique, ah-ah...!, a least if you really expect some HELP from that Forum... :roll: )
Last edited by chivracq on Fri Feb 08, 2019 10:22 am, 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...
ifchor
Posts: 18
Joined: Wed Oct 03, 2018 2:17 pm

Re: Loop throw couple of numbers?

Post by ifchor » Fri Feb 08, 2019 8:11 am

Oh, well... I do not know what to say. I started as an analyst in a company (Ifchor) one year ago.
After doing some research I convinced them to purchase iMacros, since it looked good to do some stuff that we needed, we are not using the free version.
I am currently in charge of that, reading iMacros wikipedia, watching some tutorials... and I am struggling more than I thought, that is why I have asked three times in this forum, I am sorry if I bother you.

On the other hand, I have no clue about IP adresses, VPN things... Shall I ask our IT department? We are currently based in Switzerland.... (you can check the name on internet).

Thanks for your reply, I will try to do what you suggested.

Best,

Laura.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Loop throw couple of numbers?

Post by chivracq » Fri Feb 08, 2019 10:21 am

ifchor wrote:
Fri Feb 08, 2019 8:11 am
Oh, well... I do not know what to say. I started as an analyst in a company (Ifchor) one year ago.
After doing some research I convinced them to purchase iMacros, since it looked good to do some stuff that we needed, we are not using the free version.
I am currently in charge of that, reading iMacros wikipedia, watching some tutorials... and I am struggling more than I thought, that is why I have asked three times in this forum, I am sorry if I bother you.

On the other hand, I have no clue about IP adresses, VPN things... Shall I ask our IT department? We are currently based in Switzerland.... (you can check the name on internet).

Thanks for your reply, I will try to do what you suggested.

Best,

Laura.
Yeah, sorry Users behind Proxy/PVN are "until now" for 99,999999% Fake_Users/Spammers, last "Legit" User behind a Proxy/VPN was this one, already more than 1 year ago, hence my "Suspicion"...! :oops:

Just be aware, IP-Reputation is "important", if your IP is "Proprietary" from your Company, behind VPN or not, it should be "clean" for Spam... For our Forum, we still do the Assessment "manually", and you already see how "difficult" I do, most (80%) of (Tech) Forums on Internet let some Service do the Check automatically and if IP=Proxy/VPN, the Account + IP get already directly banned from the Forum..., just saying..., so "I' might "over-react" a little bit directly, but if I get the 'good' Arguments/Explanation, I can change "my Mind", but go and try to convince some Cloud Service like yours about taking a "different" Decision than what it was Black_or_White programmed for...! Good luck ah-ah...!! :shock:
Yeah, sorry, I find it "funny" in a way, as I've been "doing" AI for about 10 years now, but I should probably call it "pathetic" in this case, which I'm afraid will very soon be what will be happening, with all Cloud Services being convinced that their Service and Intelligence is "higher" than anybody else, tja...!! :roll:
I'm waiting for the next War to start, completely based on some AI Assessments, with mini-Escalations escalating upon each other in reaction, ah-ah...! :shock:
Hum, I've actually already implemented stg like that, on some RT Market, with RT Buying/Selling, mostly selling actually, always 1 Ct cheaper that the "Competition" and than itself, until a certain Limit, and until a 2nd and 3rd Limit if any of the previous Prices are/might be "mine" from the same or any 3 to 12 other Accounts that might also be active at the same moment... , and my Script will "decide" by itself which Account will "win" at some point and will remain the cheapest, unless some "Newcomer" comes to "disturb" the Market, unless it gets "ignored" depending on the Volume sold by this Newcomer and the Volume historically handled in the previous hour(s)/day(s) or any timeframe I or the Script might find "appropriate"... (I usually let the Script decide because it has "Access" to the Historic Data and I don't, or I need a lot of time to find the relevant Logs myself...)

"... based in Switzerland...'...? Euh......?
Hum, OK, 2nd check => "52.114.*.*' is MS Azure, Server in Ireland, yep, correct indeed, not many Spammers normally, hum, I will remove the last 2 IP Block Ranges (from my previous Post), maybe I over-reacted a mini-little bit, oops...!
(Done... (Last 2 Blocks anonymized...) But still, like I had previously mentioned, your/the IP I had posted and that "you were using for our Forum", was know for "notorious Spam Activity", oops...!)

But what I said about +10 from a same (Cloud) Provider, even if you get a dedicated IP that you try to keep "clean", you never know what the other Customers from the same Cloud Service are "doing", and most are Spammers usually, ah-ah...!, then like I mentioned, after 10x times being spammed/tried to be hacked from some same IP Range, then the whole IP-Range simply gets banned... And if "we" do it, some other Forums will do it also, and those IP's or (full) IP-Range(s) get reported and blacklisted, and it's difficult to whitelist 1 single IP in the middle...

>>>

"we are not using the free version..."
=> Ah OK, => 'PE' Version..., then back to your original Qt, and like I said, if you are using the 'PE' Version, the "easiest" Solution for you I would think, would be to use a DataSource as a '.CSV' File...

The Array "Solution" is OK if you only have a "very" limited List of Entries..., (and "maintaining" a Double Array synchronized is even more "a little bit difficult" ah-ah...!, I do it myself for 15 Logins and Passwords, and hum..., it regularly "goes wrong", ah-ah...!, and I still don't really know why...), or if you need to go for "absolute" Speed... (Reason I use it myself..., hum + more Control on the Format also...)
(And my "it regularly goes wrong" is difficult to debug, because I need Speed, and it's difficult to debug a Script in "Speed-Mode", ah-ah...!)
Last edited by chivracq on Fri Feb 08, 2019 1:32 pm, edited 7 times 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...
ifchor
Posts: 18
Joined: Wed Oct 03, 2018 2:17 pm

Re: Loop throw couple of numbers?

Post by ifchor » Fri Feb 08, 2019 10:28 am

Thanks for your advice Chivracq, I understand when you are trying to keep everything in order! Besides, you are just trying to help so I really cannot say anything or even complaint! Whatever advice you can give is more than welcome! :)

I will try to read about the CSV option (looks easier), I hope I can go forward with the project! Or just repeat the lines until I die :D

Thank you again, and sorry for any trouble caused.

Laura.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Loop throw couple of numbers?

Post by chivracq » Fri Feb 08, 2019 12:02 pm

ifchor wrote:
Fri Feb 08, 2019 10:28 am
Thanks for your advice Chivracq, I understand when you are trying to keep everything in order! Besides, you are just trying to help so I really cannot say anything or even complaint! Whatever advice you can give is more than welcome! :)

I will try to read about the CSV option (looks easier), I hope I can go forward with the project! Or just repeat the lines until I die :D

Thank you again, and sorry for any trouble caused.

Laura.
Yeah, don't worry, like I said, I think I over-reacted a little bit previously...
But hum, I was also a little bit "day-dreaming" while still editing my previous Reply, you may want to check it again... (as I saved it again after you had posted your last Reply...)

Yeah, like I said, the ''.CSV' Option is I think the easiest, with simply 2 Cols and your 2 Values per Code Block...

But maybe only for the "Exercise", your Array Idea was not "stupid at all", well if I use it myself, I guess it's definitely "not stupid at all", ah-ah...! :P , it honestly took me a mini-while to get it to work because of this "True Array" Problematique with iMacros Vars, so you may want to "show me" what you had tried and I would be able to guide you towards a "working Sol using an Array", even if you maybe won't use it "this time", but you won't know for some next time, then you will already have the Sol ready without needing to "think" or to ask again on the Forum... :idea:

I've already explained this Array Sol twice or thrice, but I didn't post any Script I thiiiiiiink... (hum, I'm not sure...), and I really consider about stopping answering the Forum... in a few months I think, as most Threads are now related to some "newer" Versions (=> 'Free') that I don't and won't use, and I've already posted or explained most "creative" Solutions I use myself... 8)
Hum, except a little bit about one big "Area" (=> AI and Automorphing), but I consider a bit anyway "My Mission" as more or less "accomplished", ah-ah...! :|
Nearly all Solutions for all Usecases can now be found on the Forum, ah-ah...! ... or can be "deducted" from some other Solution(s)... I never need more than 10 sec to find the (first) Sol to any Scenario, then I guess anybody could find it/them..., or at least one... :twisted:

=> Did you understand what I meant with 'EVAL()' + 'split()' on a String..., (for the "Array Implementation"), or what had you tried yourself...?
Last edited by chivracq on Fri Feb 08, 2019 1:37 pm, edited 3 times 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...
ifchor
Posts: 18
Joined: Wed Oct 03, 2018 2:17 pm

Re: Loop throw couple of numbers?

Post by ifchor » Fri Feb 08, 2019 1:34 pm

Thanks for your reply!

I will try to find for this Array idea on the forum them! I understand if you stop (yes, mission acoomplished!), but of course would be the end of many users :D haha. If I am not able to do the array thing, i will probably give a try to the CSV, simpler and my boss is already on my shoulders... unfortunately he thinks I am a machine (and actually I am totally the opposite).

I will send you what i did on Monday, since I am traveling and I haven't the code with me right now (sorry!!!).

Did you understand what I meant with 'EVAL()' + 'split()' on a String... --> no, I did not, but i read about it on the weekend.

Thank youuuu and have a nice weekend!
ifchor
Posts: 18
Joined: Wed Oct 03, 2018 2:17 pm

Re: Loop throw couple of numbers?

Post by ifchor » Mon Feb 11, 2019 10:55 am

Good Morning!

I am back to the office again. That's the script that I am currently trying (please, bear with me with my low level...).

VERSION BUILD=1005 RECORDER=CR
URL GOTO=https://maritime.ihs.com/Areas/Seaweb/a ... earch&bp=1
SET !VAR1 EVAL("[10000, 10501, 11001][{{!LOOP}} - 1];")
SET !VAR2 EVAL("[10500, 11000, 11500][{{!LOOP}} - 1];")
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTFrom CONTENT={{!VAR1}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTTo CONTENT={{!VAR2}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:Form1 ATTR=ID:ctl00_btnSearch2
TAG POS=1 TYPE=SPAN ATTR=TXT:Refine<SP>Ship<SP>Search


I have two buttons called "ID:ctl00_DWTFrom" and "ID:ctl00_DWTTo", and there is a limit in the records i can download. So I choose the values, I search and I download, and then come back again... So what i do is i split the numbers for example....

in DWT_from: 10000 in DWT_to:10500 and then look for the data... and then come back and search this time for the range 10501-11000, etc.

So i defined (looking for other codes in internet, in particular, chats in where you participated...) two variables and prayed for that to help. But I cannot go forward... I dont know why. It works for the first couple of numbers but doesnt go back... am I missing part of the code? I guess yes...

Thanks in advance... and sorry for the troubles... AGAIN.

Cheers,

Laura.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Loop throw couple of numbers?

Post by chivracq » Mon Feb 11, 2019 11:53 am

ifchor wrote:
Mon Feb 11, 2019 10:55 am
Good Morning!

I am back to the office again. That's the script that I am currently trying (please, bear with me with my low level...).

Code: Select all

VERSION BUILD=1005 RECORDER=CR
URL GOTO=https://maritime.ihs.com/Areas/Seaweb/authenticated/authenticated_handler.aspx?control=shipsearch&bp=1
SET !VAR1 EVAL("[10000, 10501, 11001][{{!LOOP}} - 1];")
SET !VAR2 EVAL("[10500, 11000, 11500][{{!LOOP}} - 1];")
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTFrom CONTENT={{!VAR1}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTTo CONTENT={{!VAR2}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:Form1 ATTR=ID:ctl00_btnSearch2
TAG POS=1 TYPE=SPAN ATTR=TXT:Refine<SP>Ship<SP>Search

I have two buttons called "ID:ctl00_DWTFrom" and "ID:ctl00_DWTTo", and there is a limit in the records i can download. So I choose the values, I search and I download, and then come back again... So what i do is i split the numbers for example....

in DWT_from: 10000 in DWT_to:10500 and then look for the data... and then come back and search this time for the range 10501-11000, etc.

So i defined (looking for other codes in internet, in particular, chats in where you participated...) two variables and prayed for that to help. But I cannot go forward... I dont know why. It works for the first couple of numbers but doesnt go back... am I missing part of the code? I guess yes...

Thanks in advance... and sorry for the troubles... AGAIN.

Cheers,

Laura.
Hum..., this Syntax actually works, for declaring an Array: :o :D

Code: Select all

SET !VAR1 EVAL("[10000, 10501, 11001][{{!LOOP}} - 1];")
PROMPT LOOP:<SP>_{{!LOOP}}_<BR>VAR1:<SP>_{{!VAR1}}_
I had "previously" tried as well but probably had used some different Syntax(es) and had not gotten it to work, and even "your" Syntax doesn't work anymore if I first try to declare the Array as a "stand-alone" Var for "easy Access", to later reuse in the Script where needed, using 'EVAL()', then each '[a][n]' only retrieves 1 Char at the time or the whole Array as 1 String Element. => I was declaring the Array as a String and using some "Separator" like '#' or '_' to reuse in the 'EVAL()' with 'split()' on that Separator.

Your Script looks then correct to me, apart from the fact you are repeating 3 times the 'TAG' Statement to fill in the 'From' Field, I guess this one would do the same... Oh...!, but ah-ah...!, OK, you've already corrected, OK... :wink:

But then I don't understand your "doesnt go back"..., your Script starts with an 'URL GOTO', so if you loop it 3 times, it should "start" again on each Loop from the same URL that should get reloaded... :o
I tried to have a look at the Site, but it's behind Login&Password... :cry:
[Gr..., and I "hate" those Sites which "need" some FB+Twitter+LinkedIn 'Like'/'Share' Buttons for more Tracking..., I'm glad the German Anti-Cartel just ruled last week that FB (first) must stop with that Practice... :x ]
- (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...
ifchor
Posts: 18
Joined: Wed Oct 03, 2018 2:17 pm

Re: Loop throw couple of numbers?

Post by ifchor » Mon Feb 11, 2019 12:16 pm

I mean... Is there any part of the code that is missing for this to loop? I can't understand very well the comand loop, even if i have been reading about it (yes, its sad but I am not a very technological person), so the code just does it for the first numbers but does not refresh and then put the other numbers.... I dont know! :(

Sorry, because this conversation maybe doesnt have sense....

Laura.

VERSION BUILD=1005 RECORDER=CR
URL GOTO=https://maritime.ihs.com/Areas/Seaweb/a ... earch&bp=1
SET !VAR1 EVAL("[10000, 11000, 13000][{{!LOOP}} - 1];")
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTFrom CONTENT={{!VAR1}}
SET !VAR2 EVAL("[10500, 11500, 13500][{{!LOOP}} - 1];")
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTFrom CONTENT={{!VAR2}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTFrom CONTENT={{!VAR1}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTTo CONTENT={{!VAR2}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:Form1 ATTR=ID:ctl00_btnSearch2
TAG POS=1 TYPE=SPAN ATTR=TXT:Refine<SP>Ship<SP>Search

'PROMPT LOOP:<SP>_{{!LOOP}}_<BR>VAR1:<SP>_{{!VAR1}}_
'TAG POS={{!LOOP}} TYPE=BUTTON ATTR=TXT:Follow
'SET !LOOP {{!VAR1}}
'SET !LOOP {{!VAR2}}
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Loop throw couple of numbers?

Post by chivracq » Mon Feb 11, 2019 12:26 pm

ifchor wrote:
Mon Feb 11, 2019 12:16 pm
I mean... Is there any part of the code that is missing for this to loop? I can't understand very well the comand loop, even if i have been reading about it (yes, its sad but I am not a very technological person), so the code just does it for the first numbers but does not refresh and then put the other numbers.... I dont know! :(

Sorry, because this conversation maybe doesnt have sense....

Laura.

Code: Select all

VERSION BUILD=1005 RECORDER=CR
URL GOTO=https://maritime.ihs.com/Areas/Seaweb/authenticated/authenticated_handler.aspx?control=shipsearch&bp=1
SET !VAR1 EVAL("[10000, 11000, 13000][{{!LOOP}} - 1];")
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTFrom CONTENT={{!VAR1}}
SET !VAR2 EVAL("[10500, 11500, 13500][{{!LOOP}} - 1];")
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTFrom CONTENT={{!VAR2}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTFrom CONTENT={{!VAR1}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:Form1 ATTR=ID:ctl00_DWTTo CONTENT={{!VAR2}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:Form1 ATTR=ID:ctl00_btnSearch2
TAG POS=1 TYPE=SPAN ATTR=TXT:Refine<SP>Ship<SP>Search

Code: Select all

[b][b]'PROMPT LOOP:<SP>_{{!LOOP}}_<BR>VAR1:<SP>_{{!VAR1}}_
'TAG POS={{!LOOP}} TYPE=BUTTON ATTR=TXT:Follow
'SET !LOOP {{!VAR1}}
'SET !LOOP {{!VAR2}}[/b][/b]
Yeah well, "Looping" is done from using the 'Play (Loop)' (or 'Play (Repeat)') Button from the iMacros Side-Panel (instead of the 'Play' Button)... (I'm not sure anymore how all Buttons are now called in v10.0.5 for CR as I don't really use this Version... (nor this Browser that I don't like at all, beurk...!, and I'm too "lazy" to launch CR to check as it always needs several minutes to launch, before it will have updated what it decides to update...))

Your Script has gone back to the x3 'From' Field, ah-ah...! :wink:
- (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...
ifchor
Posts: 18
Joined: Wed Oct 03, 2018 2:17 pm

Re: Loop throw couple of numbers?

Post by ifchor » Mon Feb 11, 2019 1:39 pm

Oh... OK, I think I am blind. Just saw it and it looks like it works! You cant imagine how this means to me, really.... thank you so so so much!
I just can admire people that help other people like that! I hope I can do it today myself in other fields.


Thank you so much! I will keep on learning iMacros, promise :)

Regards,

Laura.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Loop throw couple of numbers?

Post by chivracq » Mon Feb 11, 2019 1:49 pm

ifchor wrote:
Mon Feb 11, 2019 1:39 pm
Oh... OK, I think I am blind. Just saw it and it looks like it works! You cant imagine how this means to me, really.... thank you so so so much!
I just can admire people that help other people like that! I hope I can do it today myself in other fields.

Thank you so much! I will keep on learning iMacros, promise :)

Regards,

Laura.
Oh...!, good News then..., and glad it's now working...!! :D

And don't worry, it's always nice to help "nice" and friendly Users...! 8)
- (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