Sign in to follow this  
Followers 0
joe2pro

Serching in HTML page source

5 posts in this topic

Hi I am new to AutoIT and I am looking for specific functionality.

In past I've played with Automate 6 and now I found Djuggler and this program offers great funcionality which I am looking for.

Let me describe steps of process

• After starting task in Djuggler it pops up a window asking you to browse to input spreadsheet (filename.xlsx}

• Then it pops up window asking you for number of records in spreadsheet

• After that it loads all the information from spreadsheet to Djuggler’s temporary grid and start loading values from columns to variables

• First it loads URL of intranet SharePoint site with list of Members group and rest of columns except URL to Visitors group and uses its internal browser to load page from URL to Members group

• Application start searching in html source of loaded site and looking for specific html tags account=”something” and email=”something” and stores something into variable, than store new row into another grid with all details Account, Email, REGION, Site/Sub-site URL, Site Name, Sub-site Name, Site owner and loops through whole html source, than it jump in loop to another URL to Members group and loops again trough html source and this continue, till loop trough URL to Members group will run for x times, where x is number of rows submitted in second step

• After this loop jump to second column with URL to Visitors group and whole process with loops is repeated.

• At the end application store temporary grid with results from loops into spreadsheet and opens this spreadsheet.

So my question is if this will be possible with AutoIT v3

Thanks,

Michal

Share this post


Link to post
Share on other sites



So you want it to go to a webpage (or just load the source) and look for stuff like "account='name'"? That's fairly simple... either get the page source some way, or use InetGetSource() then use _StringBetween() to get between "account=' " and " ' " or something, and that should work (that'll return with all the "account='name'"s in the source within an array). Same thing for email and the others. Then just use some magic script stuff to clean up your results and organize... Go to next page... Meh.

But if I'm an idiot and that doesn't make sense/doesn't work, yeah, it's possible for AutoIt to do it.


RAWR! I'm hungry :( Feed the panda squirrle

Share this post


Link to post
Share on other sites

So you want it to go to a webpage (or just load the source) and look for stuff like "account='name'"? That's fairly simple... either get the page source some way, or use InetGetSource() then use _StringBetween() to get between "account=' " and " ' " or something, and that should work (that'll return with all the "account='name'"s in the source within an array). Same thing for email and the others. Then just use some magic script stuff to clean up your results and organize... Go to next page... Meh.

But if I'm an idiot and that doesn't make sense/doesn't work, yeah, it's possible for AutoIt to do it.

Thanks for fast respond.

Some more questions. When using InetGetSource() function is it possible to pass login parameters?

There is various number of account/email occurrences so need to search till end op page source. Need to store data in grid/table with additional information and at end store this in spreadsheet. Is there anything like temporary grid/table?

And is there any good source of information on internet like to build scripts in AutoIT (tutorials, manuals)?

Thanks

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Thanks for fast respond.

Some more questions. When using InetGetSource() function is it possible to pass login parameters?

There is various number of account/email occurrences so need to search till end op page source. Need to store data in grid/table with additional information and at end store this in spreadsheet. Is there anything like temporary grid/table?

And is there any good source of information on internet like to build scripts in AutoIT (tutorials, manuals)?

Thanks

To simplfy:

Step 1: use InetGetSource("Website address")

Inetgetsource will save the data as a string so sentax will be $stringname= Inetgetsource("http://www.google.com/")

Step 2: Use $resultarray=Stringbetween($stringname , First substring, second substring)

Stringbetween will search $stringname and return any data that is found between an instance of first substring and second substring

Step 3: use _Arraydisplay( $resultarray)

Arraydisplay will display the results you find with the search.

You will need to use #include <Array.au3> #include <String.au3> and #include <Inet.au3> to use the above functions

As for your second question the help file included with autoit is the best source for information and tutorials.

Cheers

-1

Edited by Negative1

What are we going to do tonight Brain?Same thing we do every night Pinky try to automate the world.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

To simplfy:

Step 1: use InetGetSource("Website address")

Inetgetsource will save the data as a string so sentax will be $stringname= Inetgetsource("http://www.google.com/")

Step 2: Use $resultarray=Stringbetween($stringname , First substring, second substring)

Stringbetween will search $stringname and return any data that is found between an instance of first substring and second substring

Step 3: use _Arraydisplay( $resultarray)

Arraydisplay will display the results you find with the search.

You will need to use #include <Array.au3> #include <String.au3> and #include <Inet.au3> to use the above functions

As for your second question the help file included with autoit is the best source for information and tutorials.

Cheers

-1

About passing passwords and such, I don't know... I think I've read somewhere about doing it, but I've never had a need, so I don't know, sorry.

And -1 is right, the help file is where you'll learn everything you need to know (Browse the AutoIt start menu dir. to get to the help file, or press F1 in SciTE). Basically these forums are to give people are idea, or get the unstuck on what to do next for something. Point them in the right direction. But again, I don't know about passing passwords/usernames.

Edit: spelling fix :mellow:

Edited by mistersquirrle

RAWR! I'm hungry :( Feed the panda squirrle

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0