Jump to content

How to declare var with value from browser


Recommended Posts

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
Link to comment
Share on other sites

Which browser do you use?

What have you coded so far?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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
Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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 ...

Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...