DareDev1l Posted August 1, 2012 Share Posted August 1, 2012 (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 August 1, 2012 by DareDev1l Link to comment Share on other sites More sharing options...
water Posted August 1, 2012 Share Posted August 1, 2012 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 - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
DareDev1l Posted August 1, 2012 Author Share Posted August 1, 2012 (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 August 1, 2012 by DareDev1l Link to comment Share on other sites More sharing options...
water Posted August 1, 2012 Share Posted August 1, 2012 What kind of website do you try to automate?The original code you posted looks a bit suspicious to me 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 - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
DareDev1l Posted August 1, 2012 Author Share Posted August 1, 2012 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 More sharing options...
EmptySpace Posted August 1, 2012 Share Posted August 1, 2012 So you want to read something from website and put it to var? use _iebodyreadhtml, _stringbetween and put it to var Link to comment Share on other sites More sharing options...
DareDev1l Posted August 1, 2012 Author Share Posted August 1, 2012 (edited) Does it look like something like this ? #include <IE.au3> Local $var = _IE_Example("basic") Local $sHTML = _IEBodyReadHTML($var) $sHTML = $sHTML & "<p><font color=#B0FFFD>0.783</font>" _IEBodyWriteHTML($var, $sHTML) #include <String.au3> _stringbetween ( $var, $sHTML ) or it is totally wrong ? Edited August 1, 2012 by DareDev1l Link to comment Share on other sites More sharing options...
EmptySpace Posted August 1, 2012 Share Posted August 1, 2012 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now