HiNoTora Posted September 29, 2013 Share Posted September 29, 2013 Is there a way to add another program to runn inside my gui windows? In my script, theres emty area at right side, id like to but another exe in there. can i do 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> Opt("GUICloseOnESC", 1) Opt("GUIOnEventMode", 1) Global $hGUI = GUICreate("Forex AutoTrade by HiNoTora", 650, 400, -1, -1, -1, $WS_EX_TOPMOST) Global $hEdit = GUICtrlCreateEdit("", 0, 0, 350, 350, BitOR($ES_READONLY, $ES_AUTOVSCROLL)) GUICtrlSetBkColor($hEdit, 0xFFe737) GUICtrlCreatePic('f:\Image files\Backgrounds\Untitled.jpg', 350, 0, 664, 438) Global $hButton = GUICtrlCreateButton("Start", 0, 350, 175, 50) GUICtrlSetOnEvent($hButton, "_StartProgram") Global $hButton2 = GUICtrlCreateButton("Pause", 175, 350, 175, 50) GUICtrlSetOnEvent($hButton2, "_PauseProgram") GUISetOnEvent($GUI_EVENT_CLOSE, "Terminate") GUISetState(@SW_SHOW, $hGUI) Global $start = 0, $wait = 1 _WriteToEditBox("Console") While 1 If $start = 1 Then _MainProgram() Sleep(100) wend Func _StartProgram() _WriteToEditBox("Starting program") $wait = 1 $start = 1 EndFunc ;==>_StartProgram Func _PauseProgram() _WriteToEditBox("Pausing program") $start = 0 EndFunc ;==>_Pauserogram Func _MainProgram() If $wait=1 Then _WriteToEditBox("Wait till positive position") $coord = PixelSearch(17, 753, 37, 765, 0x90F393); wait till positive position If Not @error Then $wait=1 _WriteToEditBox("Closing position") MouseClick("left", 1265, 738, 1); closing position _WriteToEditBox("Waiting for sale mark") Sleep(3000) $coord = PixelSearch(214, 124, 249, 182, 0xFF6060); waiting for sale mark If Not @error Then MouseClick("left", 306, 148, 1); opening new position _WriteToEditBox("Opening new position") EndIf Else $wait=0 Sleep(100) EndIf EndFunc ;==>_MainProgram Func _WriteToEditBox($sText) $iEnd = StringLen(GUICtrlRead($hEdit)) _GUICtrlEdit_SetSel($hEdit, $iEnd, $iEnd) _GUICtrlEdit_Scroll($hEdit, $SB_SCROLLCARET) If $iEnd = 0 Then GUICtrlSetData($hEdit, @HOUR & ":" & @MIN & ":" & @SEC & " :-: " & $sText, 1) Else GUICtrlSetData($hEdit, @CRLF & @HOUR & ":" & @MIN & ":" & @SEC & " :-: " & $sText, 1) EndIf EndFunc ;==>_WriteToEditBox Func Terminate() Exit EndFunc ;==>Terminate Link to comment Share on other sites More sharing options...
water Posted September 29, 2013 Share Posted September 29, 2013 You mean you want to display the output of the second program inside your GUI? 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...
HiNoTora Posted September 29, 2013 Author Share Posted September 29, 2013 You mean you want to display the output of the second program inside your GUI? yes, metatrader4.exe Link to comment Share on other sites More sharing options...
water Posted September 29, 2013 Share Posted September 29, 2013 I assume this program has its own GUI which you want to include in your GUI? 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...
HiNoTora Posted September 29, 2013 Author Share Posted September 29, 2013 I assume this program has its own GUI which you want to include in your GUI? yes, one more thing, can u help out with console font, i need lighter font colour and bit higher text size Link to comment Share on other sites More sharing options...
water Posted September 29, 2013 Share Posted September 29, 2013 A possible solution can be found >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...
water Posted September 29, 2013 Share Posted September 29, 2013 can u help out with console font, i need lighter font colour and bit higher text size What exactly do you mean by "console font"? Can you post an example/screenshot? 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...
HiNoTora Posted September 29, 2013 Author Share Posted September 29, 2013 A possible solution can be found >here. What exactly do you mean by "console font"? Can you post an example/screenshot? And that sample wsnt really for me, i want to make 2 programs into 1.my GUI and the another program. Link to comment Share on other sites More sharing options...
water Posted September 29, 2013 Share Posted September 29, 2013 That's exactly what the example does. It creates a GUI, runs notepad and moves the notepad window to a location in the first GUI. 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...
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