Sign in to follow this  
Followers 0
hlmindustries

Need help making a GUI

3 posts in this topic

I know what needs done, im using koda to make my form, but I dont know how to insert what I need... I will past my code hoping that someone understands what im aiming for...

#RequireAdmin
$send = "vnc_bypauth.exe -i " & $ip".0.0.0-" & $ip".255.255.255 -p 5900 -vnc -vv -T" & $thread"
ShellExecute("cmd.exe", "", "@SystemDir")
WinWait("cmd.exe")
Send("$send", 1)

and ofcourse I fail on an epic scale :-\

but I want a simple gui that will allow me to define $ip and $thread, then run cmd and send $send...

something like that

Share this post


Link to post
Share on other sites



if you want a GUI all you have to do (i bet you know this) is go

#Include<guiconstants.au3>

#Include<Windowsconstants.au3>

global $M, $GUI

$Gui = guicreate("Example",400,400)

guisetstate()

while 1

$M = guigetmsg()

if $M = $Gui_event_close then

exit

endif

wend

thats all you need to base your program on

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$frmMain = GUICreate("Name of Program.", 302, 102, 457, 337)
$inptIP = GUICtrlCreateInput("IP Default Value", 64, 26, 233, 21)
$inptThread = GUICtrlCreateInput("Thread Default Value", 64, 50, 233, 21)
$lblTitle = GUICtrlCreateLabel("Name of Program / what it does etc.", 4, 4, 175, 17)
$lblIP = GUICtrlCreateLabel("IP Address:", 4, 28, 58, 17)
$lblThread = GUICtrlCreateLabel("Thread:", 20, 52, 41, 17)
$btnExecute = GUICtrlCreateButton("Execute", 4, 72, 293, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

#RequireAdmin

Opt("WinTitleMatchMode", 2)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $btnExecute
            $IP = GUICtrlRead($inptIP)
            $Thread = GUICtrlRead($inptThread)
            $Send = "vnc_bypauth.exe -i " & $IP & ".0.0.0-" & $IP & ".255.255.255 -p 5900 -vnc -vv -T " & $Thread
            ShellExecute("cmd.exe", "", @SystemDir)
            WinWaitActive("cmd.exe")
            Send($Send, 1)
            Send("{ENTER}")
            MsgBox(0, "Information", "Process Executed")
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Your welcome, have a happy new year.

Edited by FaT3oYCG

Interpreters have great power!Although they live in the shadow of compiled programming languages an interpreter can do anything that a compiled language can do, you just have to code it right.

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  
Followers 0