Sign in to follow this  
Followers 0
HiNoTora

How to fuse 2 scripts into one

2 posts in this topic

How to fuse 2 scripts into one

1.

#include <GUIConstantsEx.au3>
#include <EditConstants.au3>
#include <GUIEdit.au3>
#include <ScrollBarConstants.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include <GuiMenu.au3>
#include <WinAPI.au3>
#Include <Misc.au3>
Opt("GUIOnEventMode", 1)


_IEErrorHandlerRegister()
Global $oIE1 = _IECreateEmbedded(), $oIE2 = _IECreateEmbedded(), $oIE3 = _IECreateEmbedded()
Global $hGUI = GUICreate("LIVE FOREX SIGNALS", 600, 461, -1, -1, -1, $WS_EX_TOPMOST)
GUICtrlCreateObj($oIE1, -90, 1, 740, 150)
GUICtrlCreateObj($oIE2, 1, 150, 740, 100)
GUICtrlCreateObj($oIE3, 1, 250, 740, 150)
GUISetState()
GUISetOnEvent($GUI_EVENT_CLOSE, "Terminate")
GUISetState(@SW_SHOW, $hGUI)
Global $hButton = GUICtrlCreateButton("Made BY: Dersiniar - dersiniar@gmail.com", 30, 400, 510, 60)
GUICtrlSetColor(-1, 0xFF68000)
GUICtrlSetFont(-1, 15, 800, 0, "Comic Sans Ms")




_IENavigate($oIE1, "http://fxsignals.fxmarketleaders.com/ClosedNG.aspx")
_IELoadWait($oIE1, 2000)
_IENavigate($oIE2, "http://fxsignals.fxmarketleaders.com/Longsignalsng.aspx")
_IELoadWait($oIE2, 2000)
_IENavigate($oIE3, "http://fxsignals.fxmarketleaders.com/shortsignalsng.aspx")
_IELoadWait($oIE3, 2000)

 While 1
   _IEAction($oIE1, "refresh")
   Sleep(4500)
   _IEAction($oIE2, "refresh")
    Sleep(4500)
   _IEAction($oIE3, "refresh")   
    Sleep(4500)
    
    
    
 wend
 

Func Terminate()
    Exit
 EndFunc   ;==>Terminate

2.

#include <IE.au3>

$oIE = _IECreate()
_IENavigate($oIE, "http://fxsignals.fxmarketleaders.com/shortsignalsng.aspx")

$body = _IEBodyReadHTML($oIE)

If StringInStr($body, "buy") Then
   SoundPlay(@WindowsDir & "\media\onestop.mid", 0)
    MsgBox(0, "New Signal", "New Signal was found")
      
Else
    Sleep( 100 )
EndIf

Exit

And some fixing in script2

 Script 2 opens up new IE and navigates to adress.

It shold read from script1   $oIE3

Share this post


Link to post
Share on other sites



use the second script in a fun and call it  or include it like this

#include<second script.au3>

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