Sign in to follow this  
Followers 0
Demon777

How to ?

12 posts in this topic

#1 ·  Posted (edited)

Hello there.

So, i need help. :) Can some one say me how to make this : I wanna make program that will read what i wrote in input (in GUI) and will send it if i push *Send*

Button. So it should always send what it can found in Input. How to create this ??? Help please.

Thank you.

Edited by Demon777

Share this post


Link to post
Share on other sites



@Demon777...Creating a GUI with an input and a button should be easy...just take a look at the help file for examples...I am not sure what u want to "send" and where do u want to send it to.

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

so... i founded it in help file but i dont understand how it can Send something what i wrote in Input !!! Thats the prob.

here is Code :

#include <GUIConstants.au3>

>>>>No Gui posted<<<<

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button3
            Exit
        Case $Button4
            MsgBox(64, "Info", "This program was made just for test. ")
        Case $Button1
                Send()
        Case $Checkbox1
            Check1()
        Case $Checkbox2
                    Check2()
        Case $Checkbox3
            Check3()
        Case $Input1
            Input()
EndSwitch
WEnd

Func Start()
    If ProcessExists("Freelancer.exe") Then
        >>>>>Here should be code for it....

I wanna do it so : I have 2 Buttons, 1 Input, 3 Check Boxes. Buttons are : Send message and Close Programm, Input is Input1, and boxes should change channel where i wanna send what i wrote. So.... If i writing text in input, this text should be sent when i pushing button *Send* in any of this 3 Channels. (How to know in what channel ??? I ll active 1 of this check boxes and it ll send messages there)

But i dont know how to do it... So i need help with it.

Edited by Demon777

Share this post


Link to post
Share on other sites

@Demon777...To get the text that you have entered in the input box...use Guictlread() function...As far as channels and sending information..I am bit confused with that....It would be easier to help you...if you post your entire script

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

There u go : All my script

#include <GUIConstants.au3>

HotKeySet("{UP}", "send1")

HotKeySet("{ESC}", "close")

HotKeySet("{DOWN}", "pause")

#Region ### START Koda GUI section ###

$Form1_1 = GUICreate("Freelancer Sender", 365, 205, 193, 125)

GUISetIcon("*:\*******\Microsoft Games\Freelancer\EXE\Freelancer.exe")

$Pic1 = GUICtrlCreatePic("*:\********\Microsoft Games\Freelancer\EXE\backgroundpattern.bmp", 0, 0, 364, 204, $WS_CLIPSIBLINGS)

$Button2 = GUICtrlCreateButton("Stop Send", 24, 56, 99, 25, 0)

$Button3 = GUICtrlCreateButton("Exit", 24, 160, 99, 25, 0)

$Checkbox1 = GUICtrlCreateCheckbox("System", 232, 64, 97, 17)

GUICtrlSetBkColor(-1, 0x0000FF)

$Checkbox2 = GUICtrlCreateCheckbox("Group", 232, 40, 97, 17)

GUICtrlSetBkColor(-1, 0xFF00FF)

$Checkbox3 = GUICtrlCreateCheckbox("Console", 232, 16, 97, 17)

GUICtrlSetBkColor(-1, 0xFFFFFF)

$Button1 = GUICtrlCreateButton("Start Send", 24, 16, 99, 25, 0)

$Input1 = GUICtrlCreateInput("Send Text", 24, 104, 305, 21)

$Button4 = GUICtrlCreateButton("Sender Info", 232, 160, 99, 25, 0)

GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

Secret :)

Edited by Demon777

Share this post


Link to post
Share on other sites

You will never exit your Do loop.... $o = $o + 0 will never make $o = 10

Share this post


Link to post
Share on other sites

Ups.... U are right... Thx for error. :)

Share this post


Link to post
Share on other sites

how can i put what i wrote in input to send1 Function ????

you can just add the line:

$frominput = GuiCtrlRead($Input1)

to the function, and now you have a variable called $frominput, that = whatever is in input1

Share this post


Link to post
Share on other sites

Plz show me what i should delete and where i should add this $frominput = GuiCtrlRead($Input1)

Thank you !

Share this post


Link to post
Share on other sites

Like This ??"

Func send1()
    If ProcessExists("Freelancer.exe") Then
        $frominput = GuiCtrlRead($Input1)
        $o = 1
        Do
        Send("{ENTER}")
        Send("{$frominput}")
        Send("{ENTER}")
        Send("{$frominput}")
        Send("{ENTER}")
        Send("{$frominput}")
        Send("{ENTER}")
        Send("{$frominput}")
        Send("{ENTER}")
        Send("{$frominput}")
        Send("{ENTER}")
        Send("{$frominput}")
        Send("{ENTER}")
        Send("{$frominput}")
        Send("{ENTER}")
        Send("{$frominput}")
        $o = $o + 1
    Until $o = 10
Else
    If ProcessExists("Freelancer.exe") = 0 Then
        MsgBox(16, "Error", "Run Freelancer first")
    EndIf
EndIf
EndFunc

Share this post


Link to post
Share on other sites

Dont need to reply :) i know it now ^_^

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