Jump to content

reading the SciTe Console output


Bert
 Share

Recommended Posts

I'm working on a script, and I need to read the output pane in SciTe when AutoIt3Wrapper is started. I tried this, and got nowhere.

if ProcessExists("AutoIt3Wrapper.exe") then 
        $list = ProcessList("AutoIt3Wrapper.exe")
            for $i = 1 to $list[0][0]
                $conr = StdoutRead($list[$i][1])
            next
        sleep(300)
        $str1 = StringInStr($conr, "Exit code:")
        sleep(500)
        MsgBox(0, $str1, $conr)
    EndIf

I need to know when the "Exit code:" is produced in output.

:)

Link to comment
Share on other sites

  • Developers

I'm working on a script, and I need to read the output pane in SciTe when AutoIt3Wrapper is started. I tried this, and got nowhere.

I need to know when the "Exit code:" is produced in output.

:)

Volly, could explain what you exactly want?

Are you asking to:Run a seperate compiled script that reads the SciTE output pane and checks for "Exit code".

Maybe you can explain the purpose for this?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I got the impression @Volly wants something similar to tee on unix. The ability to monitor/redirect the IOstream in several places.

I think there are 3(4) solutions.

1: A wrapper application between scite and au3wrapper. It would just monitor the iostream and react to it or pass the info on to scite.

2: Attache to the iostream through some dllcalls. Some thing similar to @Valiks stub.exe code (C++)

3: Poll the content of the output pan constantly and monitor for the information wanted. (CTRL+C and clipget works in the worst case scenario)

4: ? Could it be done through a LUA script in SciTE

Witch solution to chose is a matter of how important the functionality is.

Oh, well thats mu 0.02$ anyway.:)

Link to comment
Share on other sites

Danny34 and I are working on a new version of the SciTe toolbar. It is working well, but I discovered a problem. We have it coded so when you press the go icon, or the beta go icon, the toolbar will change so it reflects what controls is available in SciTe. The bug I found is when a error shows up in the AU3Check. If a error shows up, and you press stop, I need the toolbar to switch back. (Just like the controls do in SciTe) I was hoping to read the output in the console to get what I needed.

Link to comment
Share on other sites

  • Developers

Danny34 and I are working on a new version of the SciTe toolbar. It is working well, but I discovered a problem. We have it coded so when you press the go icon, or the beta go icon, the toolbar will change so it reflects what controls is available in SciTe. The bug I found is when a error shows up in the AU3Check. If a error shows up, and you press stop, I need the toolbar to switch back. (Just like the controls do in SciTe) I was hoping to read the output in the console to get what I needed.

Does somethng like this work for you ?

Opt("WinTitleMatchMode",4)
While 1
    $outputPane = StringRight(ControlGetText("classname=SciTEWindow", "", "Scintilla2"),30)
    TrayTip("", $outputPane ,5)
    If StringInStr($outputPane, "Exit code:") Then ExitLoop
    Sleep(500)
WEnd
MsgBox(262144, 'Debug line ~' & @ScriptLineNumber, 'Selection:' & @LF & '$outputPane' & @LF & @LF & 'Return:' & @LF & $outputPane & @LF & @LF & '@Error:' & @LF & @error) ;### Debug MSGBOX
Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Tried the code, and it causes the script to exit. In looking at the code, It will read what is in the output window. (which is what I asked for in the first place :"> ) This won't work for if a script has ran once, it will have the exit string already in the window) I'm going to need to read what comes out of Au3Check to keep it stable. I tried to use that, but I couldn't get it to work.

Link to comment
Share on other sites

I came up with this, and I think this will solve my problem. I tested it, and I'm getting the results as expected.

If WinExists("Au3Check errors","Do you want to stop the Run?") then 
        WinWaitClose("Au3Check errors","Do you want to stop the Run?")
        if ProcessExists("Autoit3.exe") then 
            ProcessWaitClose("Autoit3.exe")
            StopEx()
        Else
            StopEx()
        EndIf
Link to comment
Share on other sites

  • Developers

I came up with this, and I think this will solve my problem. I tested it, and I'm getting the results as expected.

If WinExists("Au3Check errors","Do you want to stop the Run?") then 
        WinWaitClose("Au3Check errors","Do you want to stop the Run?")
        if ProcessExists("Autoit3.exe") then 
            ProcessWaitClose("Autoit3.exe")
            StopEx()
        Else
            StopEx()
        EndIf
Did you try the solution I PMed ?

:)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...