iMacroScripter wrote: chivracq wrote:
Mini-Compliment for the "good Quality" of your OP, this is (unfortunately) quite rare on the Forum...
... Except that you could use the ]CODE[ Meta-Tags for your Script, and I couldn't load your Image, you can better upload it directly to your Thread rather than locate it on some external Server, I'm re-uploading it to your Thread...
Changes made, thanks.
=> First follow up on your previous Thread and finish it "correctly" by sharing your Solution/final Script to make it useful for other Users as well, and you can maybe bump this one in about 10 months if you are still looking for a Solution then...
OK, make it 5 months, I'll be "nice"...!
I finished my previous thread "correctly" by sharing my solution/final script to make it useful for other users; I am still looking for some help on this current issue.
OK, I might be "even nicer" after you'll have handled your previous Thread "correctly", this one is a bit "Interesting", ah-ah...!
But if you search the Forum a bit, I've already posted/explained several Solutions about your Scenario several times in different Threads, I can find 4-5-6 different Solutions in a few seconds..., most in pure '.iim' that you can easily convert to '.js' or '.vbs'...
This is very interesting as I am looking for a solution in pure ".iim". I have made some progress since last post, and can now extract the needed data to .CSV file the script progress is listed below.
I am still stuck though on how to get iMacros to take the extraction in the test.csv file, and have iMacros look it up to match that data extraction in another column (say: A-Z), and give the needed output (say: 101-126)? How would I do this?
Code: Select all
VERSION BUILD=8970419 RECORDER=FX
SET !EXTRACT_TEST_POPUP NO
TAG POS=1 TYPE=SPAN ATTR=ID:tip_0
TAG POS=1 TYPE=TD ATTR=TXT:First<SP>Ticket<SP>A*
TAG POS=1 TYPE=A ATTR=TXT:Communication2
TAG POS=1 TYPE=TD ATTR=TXT:Location:
TAG POS=R1 TYPE=TD ATTR=TXT:* EXTRACT=TXT
SAVEAS TYPE=EXTRACT FOLDER=C:\Directory\ FILE=test.csv
OK, I quote your previous Reply "in bulk", together with my own Quotes..., ah-ah...!
But OK, good-good, you've already found the best Solution indeed for extracting your Text Field next to the 'Location' Field by using Relative Positioning. Perfect... That was the "easiest" part...!
(And that Functionality is btw completely documented in the Wiki..., well..., except for "certain" cases where you need to use "Double Relative Positioning" which is not documented, but I have explained the Principle in several Threads already, if you are interested... (But you didn't need it for this one...))
Now about the 2nd part of your Scenario, about locating a specific '[1-26]/[A-Z]' Cell in Col_1 in your '.CSV' and its corresponding '[101-126]' Value in Col_2, that's a little bit more "complicated"..., but not too much, ah-ah...!, and there are several ways to implement that Functionality.
Well, you mention that "5. Included VBS sample scripts run ok." meaning you must be using or can use the Scripting Interface... (You don't mention which Version btw...?) If you can use a '.vbs' Script, then you could handle that part directly from the '.vbs' Script, you then have Full Control on Excel. I've seen Solutions for that, either on our Forum and/or maybe on SOF (Stackoverflow Forum) in the 'Excel'/'.vbs'/'.vba' Threads.
But it can be done in pure '.iim' as well, with a few Techniques that I have explained in several Threads already:
- Re: Select file from folder which is not already in CSV file
Very recent Thread, pity (for you...!) that User never bothered to follow up (hum..., sounds familiar...!?
), you would have your Script already as you both want the same Functionality actually.
Check the Thread I linked to in my Post about the last Row in a '.CSV' as I give a lot of Info (and a Script) in that Thread...
Another related Thread:
- Re: Setting a Variable Column Number to use with a Data Sour[ce]
The same Technique can be used in your Case, and the "one more" Link leads to a Post/Thread by TechSup for the latest iMacros for CR v10 Free which doesn't support FIO anymore (File Access) and how you can use an HTML Table as a DataSource, a Technique I've been using (and "advertizing" as well in some Cases on the Forum) for several years already...
And there was about 1 or 2 years ago some Thread I remember where I think the User wanted more or less the same Functionality like you want, it was about "Route+Cities" as Keywords, I'll see if I can locate that Thread, I don't remember if they had posted their final Script...
=> Yep, found it directly...!, was indeed the only Thread on the Forum with "Route+Cities" as Keywords (+ this current one as well now, of course), hum, was "only" from 6 months ago and not 1 or 2 years like I thought, ah-ah...!, that was a "perfect" Thread, with an "exemplary" User, just a few "Instructions" and they managed to write their Script, that they nicely shared...:
- IF THEN ELSE to input varying Data from .CSV list
And hum-hum-hum...!, there is probably some even simpler Solution in your Case I think, as all Threads I've referred you to until now are for Scenarios where you don't know in advance where your Data is located in your '.CSV' (and if it is even present at all...!). But I guess your '.CSV' will only contain 26 Rows (or 27 if you have a Header in it), meaning your '[1-26]' will already correspond exactly to the correct '!DATASOURCE_LINE' (or +1 if you have a Header). If that's the case, that would be the easiest Scenario/Solution...! Pretty straightforward then...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...