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.

 

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

    • 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  
    • Jefrey
      By Jefrey
      Hey
      I made this to convert data to PHP's serialize() function return format.
      This is for those who, somewhy [?], can't use JSON, for example.
      Just two simple functions: Serialize() and Unserialize(). Data may be all accepted types in PHP (array, float, int, string), except objects.
      Examples (included in package):
       
      #include 'serialize.au3' Dim $otherArray[4] = ["hai", "halo", "apa", "kabar"] Dim $aArray[7] = ['test', 'lol', 'cool', 'amazing', 123, $otherArray, 2.50] $sSerialized = Serialize($aArray) MsgBox(0, "", $sSerialized) It will show:
      a:7:{i:0;s:4:"test";i:1;s:3:"lol";i:2;s:4:"cool";i:3;s:7:"amazing";i:4;i:123;i:5;a:4:{i:0;s:3:"hai";i:1;s:4:"halo";i:2;s:3:"apa";i:3;s:5:"kabar";}i:6;d:2.5;} Now, if we want to do the contrary, which is, converting from serialized string back to original data:
      #include 'serialize.au3' #include <Array.au3> ; Needed only to use _ArrayDisplay. Not required to use serialize. $aUnserialized = Unserialize('a:7:{i:0;s:4:"test";i:1;s:3:"lol";i:2;s:4:"cool";i:3;s:7:"amazing";i:4;i:123;i:5;a:4:{i:0;s:3:"hai";i:1;s:4:"halo";i:2;s:3:"apa";i:3;s:5:"kabar";}i:6;d:2.5;}') _ArrayDisplay($aUnserialized) _ArrayDisplay($aUnserialized[6]) As _ArrayDisplay doesn't support multidimensional array (and, in the previous example, we converted a multidimensional array to serialized data), we must use it twice. So we will see:

      Please notice the differences between AutoIt and PHP's approach of arrays. It is different. Be careful, mainly when getting arrays from PHP and putting into AutoIt. I really recommend using only integer array keys, or switching to JSON.
      License: CC BY 4.0
      Download: https://www.autoitscript.com/forum/files/file/348-unserialize-in-autoit-php-compatible/