aytacesmebasi wrote: ↑Mon May 11, 2020 4:09 pm
Ok and thanks. Fish was very tasty nomnomnom
But if I understood correctly, there are opportunities for 4 branches. I have 37 branches. Working in the free version is a bit difficult.I haven't tried it yet imb can read from excel file but i think the extension is unable to read or I'm wrong because I haven't tried. Let me try to work with an excel file for branches list.
Euh..., nope, the first Script I posted...:
Code: Select all
SET !VAR2 EVAL("var s='{{!EXTRACT}}'; var brh1='e807d0f59c2345bea6c3737dbe05661a', brh2='bb5c8f2ef5cf4785bdb2254c7901f24', brc1='035267', brc2='035260'; var z; if(s==brh1){z=brc1;} else if(s==brh2){z=brc2;} else{z='ERROR';}; z;")
... is for 2 Branches, not for 4...!, 'brh1' + 'brc1' are for Branch_1 and 'brh2' + 'brc2' are for Branch_2. I mentioned "4 Vars", not "4 Branches"...
You had only mentioned 2 Branches in your OP and in your Script(s), there is no Reason I could have come up with more than 2 Branches...
("brh" = "Branch HTML" and "brc" = "Branch Code".)
Both iMB (the Browser) and iMacros do support using a '.CSV' File as DataSource...
And don't call it an 'Excel' File, 'Excel' is just one from more than 1000 Progs that can open and save '.CSV' Files...
True is that iMB 'Trial' is fully Functional and does indeed support the '!DATASOURCE' Command, while iMacros for FF/CR v10.0.x only support that Command for the 'PE' Version, and there is no 'Trial' Version for those 2 Browsers...
But hum, using a '.CSV' as a DataSource might not be "the best" Solution for 37 or 40 Entries in that Input File...
EDIT: The Purpose of a '.CSV' as DataSource is to loop that DataSource Row by Row with 1 Row per Loop, but in your Case, you would need to loop again and again through the whole DataSource for each Loop. Cumbersome to implement in pure '.iim', you would need a '.js' Script (with iMacros for FF v8.9.7) or the 'Scripting Interface' from iMB with the 'Enterprise Edition'.
"Funny" (= a bit annoying) how so many Users on the Forum "suffer" from "
X/Y Problematic" and come to the Forum asking for a Solution for a Qt that turns out to be only the mini-visible part of a huge Iceberg, ah-ah...!
EDIT:
Even if, hum..., that "new" Parameter about the 37 Branches actually makes your Case/Scenario more Interesting than originally with "only" 2 Branches, ah-ah...!
But OK, there are several Solutions/possible Implementations for your/that Scenario, but hum..., it will be a little bit more "complicated" than until now, I'm a bit "afraid" you won't "really" understand those possible "Solutions"..., and we'll both be spending/losing a lot of time, and I won't be writing your Script, ah-ah...!, maybe you can find some Colleague with hopefully a mini-bit of Programming Experience and who speaks/understands English a bit fluently...? (No Offense of course, ah-ah...!)
OK, I'll "quickly" mention (a few of) those possible Solutions/Implementations:
(And see if and what you "understand"...
)
1- String/Array with all 37 Branches hard-coded in Script, x2 maybe for 'brh' and 'brc'.
(Works very quick, but not easy to maintain, 1 single mini-Typo in a very long Line that requires 20 Clicks/Screens for Horizontal Scrolling and the Script is broken..., and might hit some Size Limitation, but if you are on CR, then yep, CR has Size Limitations for Vars, not from iMacros but from CR itself...)
EDIT: And yep indeed applies to you, FCI not easy to find back, not mentioned in OP, but I think you are still "safe" with those 37x2 Strings...
2- Whole DataSource as '.TXT' File, can be extracted in 1 Statement, 'EVAL()' to further make the "Connection" between 'brh' and 'brc'...
(Would need some extra "Formatting" between all Cols..., + requires a 2nd Tab for the Script to run, at least once at the beginning, unless Looping..., DataSource easy to maintain...)
3- DataSource as '.html' File (from 'Excel').
(Also requires a 2nd Tab, DataSource easy to maintain..., as '.CSV' or pure 'Excel' File, but must resave the '.html' File after any Modif...)
... And there are a few other possible Solutions/Implementations, but I am afraid I'm just "talking in the Wind", ah-ah...!
EDIT:
About the 3 Options I've mentioned, I would go for Option 2 or 3, I think..., hum..., Option 3 then actually, as it doesn't need the extra Formatting... I guess that List of Branches doesn't often need to be edited... But you'll need a perfect Match between the Names on the Website and in your Local 'Excel' => '.html' File.
>>>
aytacesmebasi wrote: ↑Mon May 11, 2020 4:09 pm
The reason there are two different text
(text='ÇİĞLİ VERGİ DAİRESİ'
(text='e807d0f59c2345bea6c3737dbe05661a'
application behaves differently according to the browser as you said. This tires and forces a person who does not know even more.
anyway
i repeat Fish was very tasty
I'm sorry for being angry.
"application behaves differently according to the browser as you said."
=> Nope, I never said that, ah-ah...!
, only about 'DDLB' + 'CONTENT' with % that needs to be outside of the Var when using a Var, and this has nothing to do with the 'EXTRACT' Mechanism, ah-ah...!
The Result of 'EXTRACT' should be the same in all Browsers...
- (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...