Jump to content
Sign in to follow this  
mentosan

ErrorStdOut

Recommended Posts

mentosan

Hi ! Long time no see ! :unsure:

Hello Jos and everybody hard-coder or light-coder !

I'm building an application to get in hand with scripting again.

The syntax check went fine but when I run the script I'm receiving ErrorStdOut. :>

Figured out the part of the script which generates the error:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <Constants.au3>



GUICreate(" Detect IP's", 180, 120)
    GUICtrlCreateLabel("Enter the IP range", 10, 17)
    GUICtrlSetFont(-1, 8, 600) 
    GUICtrlCreateLabel(" .            .            .   X", 49, 57)
    GUICtrlSetFont(-1, 8, 600)
$n1=GUICtrlCreateInput("", 20, 50, 25, 20, $ES_NUMBER)
$n2=GUICtrlCreateInput("", 60, 50, 25, 20, $ES_NUMBER)
$n3=GUICtrlCreateInput("", 100, 50, 25, 20, $ES_NUMBER)
$btn = GUICtrlCreateButton("OK", 60, 80, 60, 20)

GUISetState()

$msg = 0
    While $msg <> $GUI_EVENT_CLOSE
        $msg = GUIGetMsg()
        Select
            Case $msg = $btn
                ExitLoop
        EndSelect
    WEnd
    

GUICtrlRead ($n1)
GUICtrlRead ($n2)
GUICtrlRead ($n3)

Thanks for any suggestion. ;)

Edited by mentosan

Share this post


Link to post
Share on other sites
JScript

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <Constants.au3>

GUICreate(" Detect IP's", 180, 120)
    GUICtrlCreateLabel("Enter the IP range", 10, 17)
    GUICtrlSetFont(-1, 8, 600) 
    GUICtrlCreateLabel(" .            .            .   X", 49, 57)
    GUICtrlSetFont(-1, 8, 600)
$n1=GUICtrlCreateInput("", 20, 50, 25, 20, $ES_NUMBER)
$n2=GUICtrlCreateInput("", 60, 50, 25, 20, $ES_NUMBER)
$n3=GUICtrlCreateInput("", 100, 50, 25, 20, $ES_NUMBER)
$btn = GUICtrlCreateButton("OK", 60, 80, 60, 20)

GUISetState()

$msg = 0
    While $msg <> $GUI_EVENT_CLOSE
        $msg = GUIGetMsg()
        Select
            Case $msg = $btn
                ExitLoop
        EndSelect
    WEnd

GUICtrlRead ($n1)
GUICtrlRead ($n2)
GUICtrlRead ($n3)

Thanks for any suggestion. :unsure:

I executed this script and it worked normal! Did not understand what you want...

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Share this post


Link to post
Share on other sites
mentosan

Yeah, it is all right. Sorry for that.

I'm facing another issue.

My script will open a DOS cmd window in hidden mode. I'm using for that:

Run(@ComSpec & " /c " & $command, "", @SW_HIDE)

The problem is when i want to close the script from running, the DOS cmd will remain active.

I could use AdlibRegister to define a function to check if the process of the script is being alive.

But then, If I open another DOS cmd window, and I close my application, all DOS cmd windows will be closed too (cmd.exe processes). I just want to be able to close the DOS cmd window related to my script (the hidden one).

Do you have any solution on this ?

Thanks

Share this post


Link to post
Share on other sites
smartee

Yeah, it is all right. Sorry for that.

I'm facing another issue.

My script will open a DOS cmd window in hidden mode. I'm using for that:

Run(@ComSpec & " /c " & $command, "", @SW_HIDE)

The problem is when i want to close the script from running, the DOS cmd will remain active.

I could use AdlibRegister to define a function to check if the process of the script is being alive.

But then, If I open another DOS cmd window, and I close my application, all DOS cmd windows will be closed too (cmd.exe processes). I just want to be able to close the DOS cmd window related to my script (the hidden one).

Do you have any solution on this ?

Thanks

hi mentosan,

Search the help file for OnAutoItExitRegister(). Here is an example pertinent to your question:

OnAutoItExitRegister("CloseChildProcesses")

$Notepad=Run(@WindowsDir & "\Notepad.exe", "", @SW_MAXIMIZE)
Sleep(5000) ;So you get to see that it has been opened
Exit

Func CloseChildProcesses()
    ProcessClose($Notepad)
EndFunc

Hope this helps :unsure:

-smartee

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.