Jump to content
Pintu

Display element of a website

Recommended Posts

Pintu

Good evening guys,

i'm having a problem, not about the code (i'm only thinking about it at the moment) but about the way i can do it.

I have a webpage (photo N.1) it has some elements in it.

I need only the table (photo N.2), looking at the code and with _IEFunctions i can easy find the table but how i can i "copy" it?

As i said it's really easy to found with a script but what should i do then? Copy the source? And how can i display it to the user?

In my head i'd like to display it inside a GUI, is that possible?
 

Thanks in advance

 

Edit: Posted 2 times same photo. Now should be OK

brtDettaglio (1).jpg

 

brtDettaglio.jpg

Edited by Pintu

Share this post


Link to post
Share on other sites
czardas

Well there are several ways. You could use _ArrayDisplay() but creating the array may be overcomplicating things at this stage. Take a look at example 4 for _IECreate(). This might give you some clues. If you have successfully extracted the html for the table, then you could simply use _IEBodyWriteHTML(): as in the example (EDIT ... can also be embeded in a GUI). More advanced methods include using a ListView control inside a GUI.

Perhaps it would help to spend a bit of time researching these methods. See what you can discover about them and ask if you don't understand something. :)

Edited by czardas

Share this post


Link to post
Share on other sites
jdelaney

_IETableWriteToArray

_ArrayDisplay to display it...or if you do want a gui for whatever reason:

GuiCreate

GUICtrlCreateListView

links to the helpfile:

_IETableWriteToArray


_ArrayDisplay

GuiCreate

GUICtrlCreateListView

Samples are provided for each.

Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites
Pintu

@czardas @jdelaney thanks guys, that was what i was looking for.

I'm pretty good with AutoIT but totally not on web related part of it.

Thanks god AutoIT has a great community.

Have a nice day guys and thanks again

  • Like 1

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

  • Similar Content

    • ur
      By ur
      I have an aws cloud machine where I kept all the build process to create some set of zip files and uploading them to OneDrive.
      Once it is completed, I have another local machine in our environment which is a acting as a local share server also.
      Is there anyway to notify this machine(without public IP) to start downloading these files.
      I have written an AutoIT exe to download these files and copy them to respective locations.But don't know how to notify this from the remote machine.
       
      Any suggestion??
       
    • Nareshm
      By Nareshm
      Its Possible To auto Login with autoit script ?
    • ur
      By ur
      I saw few UDFs related to IE and Firefox to automate tasks related to these browsers.
       
      But is it possible to automate tasks like drag and drop in the website.?
      Like in the below video.
      If not can you tell me some alternatives, as it is not possible in selenium as I heard.
      drag_and_drop.mp4
    • AnonymousX
      By AnonymousX
      Hello,
      I need to pull data from company intranet website. I created a script that I can give a list of project numbers and it will open up the the related webpage for each project, save the html comments for that project, then move on to the next. 
      However my problem comes in that each time I open up a project it locks it for other users, and if you just exit the page it keeps it locked, you have to actually press the "close" button on the page. So I'm not sure how to deal with this as I end up just locking every project in my name when I run my program as I don't understand the nature of how the website is built. I don't understand how to close with just using my automation code without manually having to press the stupid button. 
      My Function:
      Func Getscript($ProjectAddress) ;getting the page source code and storing it into text file for easy reading it $file = FileOpen(@ScriptDir & "\source.txt", 10) $IE = _IECreate($ProjectAddress & ".html", 0, 0) $source = _IEDocReadHTML($IE) FileWrite($file, $source) $target_source = _StringBetween($source, "<BODY>", "</BODY>") ; only take content between the specified tags _IEQuit($IE) FileClose($file) return $target_source[0] EndFunc ;==>Getscript  
      Source Code I got from website that I think is relevant:
      function closeForm(){ if(topButtonEnabled("closeButton")){ parent.mainFrame.closeForm(); } } <button id="closeButton" class="saveCloseButton" style="LEFT: 77px;" onclick=closeForm()>&nbsp;Close&nbsp;</button>  
      Any Ideas of how to tell website to either activate the closeform function or just give it the command to close?
       
      Thanks
×