Sign in to follow this  
Followers 0
DareDev1l

How to declare var with value from browser

8 posts in this topic

#1 ·  Posted (edited)

Hi guys , I don't know if I explain properly but I'd like you to help me with one little thing. I want to declare a variable that is changing every time the browser refreshes ( yes , I want to declare a var from the web) so I can continue my script with something like

if ($var > 400)

Then ...

I mean that everytime my browser refreshes , a value is being incremented and when it gets more than 300 or 400 for example , the script will have to perform a task . I hope you understood me :)

Edited by DareDev1l

Share this post


Link to post
Share on other sites



Which browser do you use?

What have you coded so far?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I am using Mozilla Firefox , but I think I can change it if I have to.

Here's the code

ShellExecute("www.site.com")
sleep( 8000 )

$var = (here I want to be the value from the site)

Select
Case ( $var < 400)
here is my code to execute

Case ( $var > 400 )
and the other code

If you can give me an example from other application for example I will be glad too :)

Edited by DareDev1l

Share this post


Link to post
Share on other sites

What kind of website do you try to automate?

The original code you posted looks a bit suspicious to me :unsure:

ShellExecute("www.bgmafia.com")

Google tells me that this is an online gangster game.

If this is correct then please read the forum rules and you will understand that we do not support game automation here.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Yes , it is an online gangster game and I know that automation is not allowed here but I just had that code to give , it was my first project so I gave you that code and it was for example and I realised that after I posted it :) Sorry for that though . I just wanted to make so autoit checks one site ( torrent site ) for my coeficent and when it goes over and lower than a specified number to start bitcomet and start uploading :) If you want to check the site I will give it to you , and it don't forbid automating anything , especially that simple stuff ...

Share this post


Link to post
Share on other sites

So you want to read something from website and put it to var? use _iebodyreadhtml, _stringbetween and put it to var

Share this post


Link to post
Share on other sites

Yeah its wrong. Always put includes in first lines. And i said _IeBodyREADhtml() not _IeBodyWRITEhtml()

+ _Stringbetween( here goes code from which you need to find something, start, end) So for example your string is "Read help file !" when you put start "Read", end "!" then I should return array "help file" and if you want string not array then also use _arraytostring() func

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