-
Recently Browsing 0 members
No registered users viewing this page.
-
Similar Content
-
By CiaronJohn
Hi,
I would like to read the output of my cygwin terminal if it is already up and running.
I searched the forum, but I think, the samples were cmd/cygwin needs to be re-run or not yet running.
The purpose of the script is to check if compiling is done.
Func _JAE_Rebuild_Software ($sSoftwarePath)
Local $iMinty = 0
; Open cygwin process and check one instance only
if ProcessExists("mintty.exe") Then
$iMinty = ProcessExists("mintty.exe")
Else
; Run cygwin if not yet running
$iMinty = Run("C:\cygwin\bin\mintty.exe -i /Cygwin-Terminal.ico -", "", @SW_SHOW, $STDIN_CHILD + $STDOUT_CHILD)
endif
; Loop to check if cygwin terminal is ready
While 1
; if -sh is not error cygwin is still opening
Local $hWnd = WinGetHandle("-sh")
If @error Then
$hWnd = WinGetHandle("~")
Else
$hWnd = 0
EndIf
; If true cygwin is ready to be written
if $hWnd <> '0x00000000' Then
ExitLoop
EndIf
WEnd
; Change Directory
$sSoftwarePath = StringReplace($sSoftwarePath,"\", "/")
ClipPut($sSoftwarePath)
Send('cd ' & $sSoftwarePath & "{ENTER}" )
; Get New Class after Change Directory
Local $sNewClass = WinGetTitle("[ACTIVE]")
; Sleep for 3 seconds.
Sleep(3000)
; Change software path to access the makeFile
$sSoftwarePath = StringReplace($sSoftwarePath,"/", "\")
; Open Makefile
Local $hFileOpen = FileOpen($sSoftwarePath & "\makefile", $FO_READ)
If $hFileOpen = -1 Then
Return False
EndIf
Local $sFileRead = FileReadLine($hFileOpen, 12)
Local $sSetSource = _StringBetween($sFileRead, "(", ")", $STR_ENDNOTSTART)
Local $message
Send('source ' & $sSetSource[0] & '.sh' & "{ENTER}")
Send('make clean' & "{ENTER}")
WinActivate($sNewClass, "")
$hWnd = WinWait($sNewClass,"",1)
Local $iPID = WinGetProcess($hWnd)
While $iMinty
$message &= StderrRead($iPID)
If @error Then
MsgBox(0,"","error")
ExitLoop
EndIf
WEnd
; I only get blank output here since the while condition produces an error
MsgBox(0, "Stdout Read:", $message)
EndFunc ;==>_JAE_Rebuild_Software
-
By Command3r
Hello, is there anyway to make a gui with autoit and put it in another programming language??
I want make a program with visual basic but in the same time i want to get some functions and GUIs from autoit.
All helps and ideas are appreciated.
-