Sign in to follow this  
Followers 0

Working in Hidden Browser Windows

5 posts in this topic

I'm trying to create a pretty simple program that checks for a specific string of text on a website every couple of minutes, but I've never worked with hidden browsers before and I'm not sure how to go about doing it.

My script's going to follow this basic programming:

  1. Open website.
  2. Scan for text.
  3. If text is found, open alert window.
  4. If text isn't found, wait five minutes and scan again.

I just want this to actively monitor a website in the background, but up to this point all of my experience is working with visually active, directly engaged windows. I want this program to essentially be invisible until it detects that string of text without interfering with anything else I'm doing.

Can someone point me in the right direction?

Share this post

Link to post
Share on other sites

#3 ·  Posted (edited)

Ugh I'm almost embarrassed to post this script, but here's what I'm working with so far using the InetRead page you mentioned.. I'm not sure if my script is actually doing what I think it's doing. Right now it should download the website in binary, convert it into a string (which is essentially viewing the site code), and then search for "$3." - if it finds that string, it alerts me that something has been found at $3, and if it doesn't find that string, it just keeps checking the page until that string appears.

I also have a concern that this script is essentially DDOSing the page because it's constantly downloading it (not something I want), so I'll add a Sleep line in there once someone tells me that I'm headed in the right direction.

I know this is probably a painfully sloppy way to go about doing what I'm trying to do, so I would love more input. :(


#include <IE.au3>
#include <MsgBoxConstants.au3>

Func Market()
   Global $dData = InetRead("")
   Global $sData = BinaryToString($dData)
   Global $iPosition = StringInStr($sData, "&#36;3.") ;&#36; is "$" in code-jargon.

Func Brain()
   Until $iPosition <> "0"
   MsgBox(1, "Alert", "Something is cheaper than $4!")

Edited by 4b0082

Share this post

Link to post
Share on other sites

#5 ·  Posted (edited)

What you have so far should do the trick, just add a Sleep when nothing is found.

#include <IE.au3>


Func Market()
    While 1
        $dData = InetRead("")
        If StringInStr($dData, "$3") Then
            MsgBox(1, "Alert", "Something is cheaper than $4!")
EndFunc   ;==>Market
Edited by Palestinian

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

  • Similar Content

    • BlazerV60
      By BlazerV60
      Hello all,
      I've been trying to figure out how to launch Google Chrome in the background (hidden) but it doesn't seem possible. I've tried the following methods:
      ShellExecute("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", "", "", "", @SW_HIDE) Also I've tried:
      ShellExecute(@ComSpec, "/c start chrome.exe","","",@SW_HIDE) Lastly I tried:
      RunWait('"'&@ProgramFilesDir&'\Google\Chrome\Application\chrome.exe" --silent-launch',@ScriptDir)  
      But all of them launch my chrome browser without hiding it. Does anyone know a workaround for this or if AutoIT just can't Chrome? 
      Bonus points if you know how to make it launch chrome hidden and make it go to
      Thank you,
      By BOUNCER
      I'm trying to get the output data from but it uses a web app that generates that output on the fly and this doesn't show up in the page source.
      Only in web inspector of each browser does this data show up. How do I read this data in autoit (equivalent to the web inspector)
      thank you
    • ur
      By ur
      We can select elements in IE using their IDs as below.
      Local $oDiv = _IEGetObjById($oIE, "x-auto-16-input") But to one button in the webpage, there is no ID to it.
      In selenium we have option to select this element using the CssSelector and clicked the button using below code in c# selenium.
      driver.FindElement(By.CssSelector("button.x-btn-text")).Click(); What is the alternative for this in AUtoIT?
    • whiskas
      By whiskas
      Hi all,
      I just upgraded to windows 10 and am using Edge as my browser now. Updated my scripts, but I can not unhide a minimized Edge window with the script anymore.
      WinSetState ( "titlle","", @SW_MAXIMIZE ) works fine, but not if it is minimized. Tried same with SW_SHOW, doesn't work.
      WinExists("title","") -> returns 1, so it is finding my window.
              If Not WinActive($title,$text) Then WinActivate($title,$text)
      Doesn't work also, so I think I tried all but cant get the window back
      Any help would be appreciated