seppedelanghe

Web app control

3 posts in this topic

Hi everyone,

First of all sorry for my bad english.

I'm trying to build a automated program/autoit that controls a web app.
I created the script using mouseclick() , but i don't want the web browser to be visible.
I tried ControlClick() , but the web app uses flash and the buttons/items to be clicked do not have an ID.

I searched and visited a lott of autoit post and pages (even in german :) ) , but could not find a way or get it to work.

Any help is welcome!!!

Thanks already
Seppe

Share this post


Link to post
Share on other sites



Im inclinated to suggest FF.au3 for firefox, as for the rest idk.


Spoiler

Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Share this post


Link to post
Share on other sites

Ok thanks, ill give it a try.

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

    • zenocon
      By zenocon
      Hi, After scouring the forums for many hours, I'm trying to compile the most up to date / recent information on the options available for integrating with JavaScript / DOM -- as it relates to scraping + automation of web pages.
      It's my understanding there is IE.au3 script for automation of IE through a COM interface.  But I believe this only works with IE and won't work with Edge, correct?  Is there a COM interface that works with Edge, or any other options for integrating with Edge (other than IUIAuatomation?)
      I know there was also a FF.au3 UDF, but Mozilla abandoned the support for their mozrepl in favor of Web Extensions, and my understanding is that the FF.au3 UDF no longer works, is that correct?
      There was also a Chrome.au3 UDF, but my read on the forums indicate that this also broke many Chrome releases past.
      Which leaves IUIAutomation which I have been using to automate / scrape Windows apps, but when I am trying it on a website, it is not as useful.  For example, if I know the exact DOM id / class, I can get at it and do whatever I need to in JavaScript very simply.  With IUIAutomation, the DOM properties are not available, and most tags / elements in DOM have no useful defining characteristics to be able to get at them reliably (if they are targetable at all).  Some things might be able to be done with IUIAutomation, but I see it's value in targeting website automation / scraping as fairly limited.
      At this point, it seems like my best option is to use IE.au3, but that forces users on IE, which is probably a showstopper.
      Is there another way to bridge into the DOM?  I have written Web Extensions for Chrome and Firefox before.  They can communicate with external processes via AJAX or messaging.  I'm wondering if I can build what I need in a WebExtension and then trigger it from AutoIT Script, and gather up the results somewhere.
      I know there was the ISimpleDOM.au3 and some Microsoft Accessability scripts, but they seem to only be partially supported in browsers, and I didn't have a lot of luck getting those examples to run correctly.
    • DavidLago
      By DavidLago
      Hello.

      I'd like to ask some help with IE interaction.
      Basically, My script opens a webpage, then checks for an expected form named login and passwd:
      ; Collects info from the opened page $oForms = _IEFormGetCollection($oIE) Local $iNumForms = @extended If $iNumForms = 1 Then $oForm = _IEFormGetCollection($oIE, 0) $oObjs = _IEFormElementGetCollection($oForm) Local $iNumObj = @extended Else ; insert error treatment here Exit EndIf If $iNumObj = 3 Then ; Check if there are 3 objects in the page (login / pass / submit) Sleep(1000) ; Emulating a user typing infos $oObj = _IEFormElementGetObjByName($oForm, "login") _IEFormElementSetValue($oObj, "barackobama") Sleep(1000) ; Emulating the user $oObj = _IEFormElementGetObjByName($oForm, "passwd") _IEFormElementSetValue($oObj, "UncleSam2015") Sleep(1000) ; Emulating the user _IEFormSubmit($oForm) Else ; insert error treatment here Exit EndIf It goes to a loading screen, it usually takes 2-10 seconds. Then, it goes to a main screen dashboard.
      The ElementGetObjByName gets this info from the page:
      <input class="CTXMSAM_ContentFont" type="Password" title="Enter password" name="passwd" size="30" maxlength="127" style="width:100%;"> I need to verify if it really logs in (kinda worked around this), and how long it takes to load the main screen (that classic loading spinning ball).
      I was trying to do it by counting the forms or objects, but it's not possible, since there is no forms on the main screen, and both the loading screen and the main screen has 1 object. The main screen though, has an object already identifier (searchbox), but it also doesn't have a name. The code of the searchbox is as below:
      <input class="searchbox-textbox lighttext" type="text" autocomplete="off" title="Search"> Is there any way for me to track/identify this page with or without IE.au3?
      Thanks.
       
    • ViciousXUSMC
      By ViciousXUSMC
      I sort of get a break from "things I have to do" and can do a bit of "things I want to do" for scripting for a bit
      One thing that would be infinitely useful that I really need to get under my belt is internet/website automation.
      I used to use this heavily years ago when working helpdesk before I converted over to AutoIT (was using the "other guys" stuff back then)
      IE being the easiest to work with I would assume (even though its not a browser I use)
      I google/search and poke in and out of various threads to learn some of it, but I had to ask do we have like a be all end all thread or resource that really shows how to figure this stuff out?  An example would be opening a page and then finding all the links/buttons/forms to interact with.  I am currently doing that with a For loop using one of the GetCollection type of functions, but it could be easier to look at the page source or maybe even have a tool like the Autoit Window Info tool that can simply mouse over things but I have not found the information to point to these techniques/tools. 
      Any tips/tricks, links, etc I can get would be a good help to start me in the right direction.
       
      Regards,
    • guestscripter
      By guestscripter
      Hi, I've been tinkering and tinkering and I really hope someone can give me some advice.
      I've used the IE.au3 UDF successfully with some different scripts, just I'm not even sure I'm going in the right direction on this one.
      A bunch of text input fields on a secure site are to be updated with data in the script (which the script gets from an excel file), and submitted. Not too hard, right?
      The input fields html looks like this: (in this case current value is 777.00)
      <input id="pt1:r1:1:pt1:ghostText:i10:0:lvl2:0:lvl3:0:lvl3PrcHdr:i15:0:lvl3Prc:ot21::content" name="pt1:r1:1:pt1:ghostText:i10:0:lvl2:0:lvl3:0:lvl3PrcHdr:i15:0:lvl3Prc:ot21" class="x25" type="text" value="777.00" title="777.00"> I've tried
      _IEFormElementSetValue($oObj, $sInput, 0) _IEFormElementSetValue($oObj, $sInput, 1) $oObj.setAttribute("value", $sInput) $oObj.setAttribute("title", $sInput) _IEAction($oObj, "focus") $oObj.fireEvent("onfocus") in various combinations and orders, and the trouble is always that some fields are "skipped" or revert back to their previous value a few seconds later.
      Even though not actually submitting ie. clicking the "Save Changes" button on the page, some kind of processing is already going when anything is changed/focused etc., as far as I can see.
      What else I have tried:
      Using ControlSend($g_oIEHandle, "", "[CLASSNN:Internet Explorer_Server8]", $sInput) in combination with a lot of MouseGetCursor() I have a more simple script roughly "working" (doesn't use any IE objects). It works by waiting for a normal mousecursor for the page to be "ready" again in between inputfields... ...and this ends up being very slow and not much faster than human entry, and "only" fails sometimes (which is why there is a checking function as well, though this also adds to the time taken).
       
      So what can I do?
      From some research I've done, I understand there may be some way to cancel events (I know as much as that events have a propery "cancelable"). Maybe we can stop any javascript function from being called while filling all the input fields somehow, so that none of the input gets lost.Could this help? How to do this?
      One other idea is with POST and GET, so that the data that is usually submitted to the site on "Save Changes" can be sent without interface interaction... would this probably be very difficult to attempt? Where to start? (https...)
      Please, any thoughts, guidance on the above, or ideas/approaches I haven't thought of?
    • shaggy89
      By shaggy89
      Hi all,
      Ive made a script that scrapes an xml off the web code below
      -<availability> -<members date="2015-07-18" daytag="Today" count="11" day="8" night="9" ooa="0" s44="" na="0"> <qualification abbrev="2YR" name="2 Years Experience" category="Ability" count="4" day="3" night="3" ooa="0" s44="0"na="0"/> <qualification abbrev="BA" name="Breathing Apparatus Operator" category="Operator" count="4" day="3" night="4" ooa="0"s44="0" na="0"/> </members> -<members date="2015-07-19" daytag="Tomorrow" count="11" day="8" night="11" ooa="0" s44="0" na="0"> <qualification abbrev="2YR" name="2 Years Experience" category="Ability" count="4" day="4" night="4" ooa="0" s44="0"na="0"/> <qualification abbrev="BA" name="Breathing Apparatus Operator" category="Operator" count="6" day="6" night="4" ooa="0"s44="0" na="0"/> </members> <availability>  
      My script is meant to scrape the "today" section. The first part of my script works and picks up the correct "day" count but when its comes to the "breathing Apparatus Operator" it collects the number from "tomorrow" how can I fix this? My code below
       
       
      $sXML = BinaryToString(InetRead($Site)) $day = StringRegExpReplace($sXML, '(?is).*<availability.*?day="([^"]+).*</availability.*', '$1') $BA = StringRegExpReplace($sXML, '(?is).*<members.*? name="Breathing Apparatus Operator".*?day="([^"]+).*</members.*', '$1');this gets the info we need