Jump to content
Sign in to follow this  
kcd-clan

A program im working on dono what i need to do.

Recommended Posts

kcd-clan

Ok this is a console if you send command it will execute

Well this is waht i want ti to do.

What dose it need to look like?

#include <GuiConstants.au3>

Opt ("GUIOnEventMode", 1)

Dim $outlog

GuiCreate("G-V Console", 800, 150,(@DesktopWidth-800)/2, (@DesktopHeight-150)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents")

GUISetOnEvent($GUI_EVENT_MINIMIZE, "SpecialEvents")

GUISetOnEvent($GUI_EVENT_RESTORE, "SpecialEvents")

$Input = GuiCtrlCreateInput("", 0, 130, 730, 20)

$log = GuiCtrlCreateEdit($outlog, 0, 0, 800, 130)

$Button = GuiCtrlCreateButton("Send", 730, 130, 70, 20)

GUICtrlSetOnEvent($Button, "sendcns")

Func hello()

MsgBox(1,"Hello","Welcome")

EndFunc

Func sendcns()

$e=$Input

$outlog=++$Input&@CRLF

EndFunc

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Wend

Func SpecialEvents()

Select

Case @GUI_CtrlId = $GUI_EVENT_CLOSE

Exit

Case @GUI_CtrlId = $GUI_EVENT_MINIMIZE

Case @GUI_CtrlId = $GUI_EVENT_RESTORE

EndSelect

EndFunc


Visit mEMy programs made.Iul - IulG-V Console - G-V Console_RandomLetter - _RandomLetter()Saftey Kill - Saftey Killcolorzone() = colorzone()

Share this post


Link to post
Share on other sites
Valuater

WHEN YOU POST CODE USE...

[ CODE ] ; NO SPACES

; PASTE YOUR CODE

[/ CODE ] ; NO SPACES

#include <GuiConstants.au3>
Opt ("GUIOnEventMode", 1)

Dim $outlog

GuiCreate("G-V Console", 800, 150,(@DesktopWidth-800)/2, (@DesktopHeight-150)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "SpecialEvents")
GUISetOnEvent($GUI_EVENT_RESTORE, "SpecialEvents")
$log = GuiCtrlCreateEdit($outlog, 0, 0, 800, 130)
$Input = GuiCtrlCreateInput("", 0, 130, 730, 20)
GUICtrlSetState( -1, $GUI_FOCUS); SO WHEN YOU TYPE ITS IN THE RIGHT SPOT
$Button = GuiCtrlCreateButton("Send", 730, 130, 70, 20)
GUICtrlSetState( -1, $GUI_DEFBUTTON); SO YOU CAN JUST PRESS ENTER
GUICtrlSetOnEvent($Button, "sendcns")

GUISetState()



While 1
$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

; -----------------------  Functions -----------------------

Func SpecialEvents()


Select
Case @GUI_CtrlId = $GUI_EVENT_CLOSE
Exit

Case @GUI_CtrlId = $GUI_EVENT_MINIMIZE

Case @GUI_CtrlId = $GUI_EVENT_RESTORE

EndSelect

EndFunc

Func sendcns()
$e= GUICtrlRead($Input)
$outlog= $e & @CRLF
GUICtrlSetData( $log, $outlog, 1)
EndFunc

Func hello()
MsgBox(1,"Hello","Welcome")
EndFunc

hope that helps

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
Valuater

1st i need it to clear input after enter.

2nd i need to to execute the function sent.

what do you mean by #2

???

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
Valuater

like this

#include <GuiConstants.au3>
Opt ("GUIOnEventMode", 1)

Dim $outlog

GuiCreate("G-V Console", 800, 150,(@DesktopWidth-800)/2, (@DesktopHeight-150)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "SpecialEvents")
GUISetOnEvent($GUI_EVENT_RESTORE, "SpecialEvents")
$log = GuiCtrlCreateEdit($outlog, 0, 0, 800, 130)
$Input = GuiCtrlCreateInput("", 0, 130, 730, 20)
GUICtrlSetState( -1, $GUI_FOCUS); SO WHEN YOU TYPE ITS IN THE RIGHT SPOT
$Button = GuiCtrlCreateButton("Send", 730, 130, 70, 20)
GUICtrlSetState( -1, $GUI_DEFBUTTON); SO YOU CAN JUST PRESS ENTER
GUICtrlSetOnEvent($Button, "sendcns")

GUISetState()



While 1
$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

; -----------------------  Functions -----------------------

Func SpecialEvents()


Select
Case @GUI_CtrlId = $GUI_EVENT_CLOSE
Exit

Case @GUI_CtrlId = $GUI_EVENT_MINIMIZE

Case @GUI_CtrlId = $GUI_EVENT_RESTORE

EndSelect

EndFunc

Func sendcns()
GUICtrlSetData( $log, $outlog, 1)   
$e= GUICtrlRead($Input)
$outlog= $e & @CRLF
GUICtrlSetData( $log, $outlog, 1)
GUICtrlSetData( $Input, "") 
hello()
EndFunc

Func hello()
MsgBox(1,"Hello","Welcome")
EndFunc

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites
Valuater

#include <GuiConstants.au3>
Opt ("GUIOnEventMode", 1)

Dim $outlog

GuiCreate("G-V Console", 800, 150,(@DesktopWidth-800)/2, (@DesktopHeight-150)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)
GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "SpecialEvents")
GUISetOnEvent($GUI_EVENT_RESTORE, "SpecialEvents")
$log = GuiCtrlCreateEdit($outlog, 0, 0, 800, 130)
$Input = GuiCtrlCreateInput("", 0, 130, 730, 20)
GUICtrlSetState( -1, $GUI_FOCUS); SO WHEN YOU TYPE ITS IN THE RIGHT SPOT
$Button = GuiCtrlCreateButton("Send", 730, 130, 70, 20)
GUICtrlSetState( -1, $GUI_DEFBUTTON); SO YOU CAN JUST PRESS ENTER
GUICtrlSetOnEvent($Button, "sendcns")

GUISetState()



While 1
$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

; -----------------------  Functions -----------------------

Func SpecialEvents()


Select
Case @GUI_CtrlId = $GUI_EVENT_CLOSE
Exit

Case @GUI_CtrlId = $GUI_EVENT_MINIMIZE

Case @GUI_CtrlId = $GUI_EVENT_RESTORE

EndSelect

EndFunc

Func sendcns()
GUICtrlSetData( $log, $outlog, 1)   
$e= GUICtrlRead($Input)
$outlog= $e & @CRLF
GUICtrlSetData( $log, $outlog, 1)
GUICtrlSetData( $Input, "") 
Call($e)
EndFunc

Func hello()
MsgBox(1,"Hello","Welcome")
EndFunc

8)


NEWHeader1.png

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.