HiNoTora Posted February 6, 2014 Posted February 6, 2014 Hi guys, I have made Forex live signals script with help from autoit forum. Now id like to improve my program. My script looks like this expandcollapse popup#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 now if you open this script, youll see Comments section in my GUI, Now id like to add sound alert there. For example if there appears text New Signal, then Gui makes sound alert. And sound will stop only if i press OK button. maybe its possible to use ie search for text New Signal, and if it finds it, then sound starts to play.
HiNoTora Posted February 6, 2014 Author Posted February 6, 2014 (edited) I have found and modified one script, it does work, but SOUND wont stop until its finished, and if sound is finished then msg box appears. Id want to msg box and sound starts at same and if msg box is closed by pressing OK button then sound is closed to. And how to add it into my Main Script and read TEXT from there not open new page. Figured out it my own. Alert Works good. But main question stands, How to fuse it into my script and so it wont open up new IE page but uses IE page inside my script. #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 Edited February 6, 2014 by HiNoTora
Solution HiNoTora Posted February 6, 2014 Author Solution Posted February 6, 2014 Ok, i got sound alarm thing to work, so its done.
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