Demon777 Posted December 5, 2007 Posted December 5, 2007 (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 December 5, 2007 by Demon777
DjDeep00 Posted December 5, 2007 Posted December 5, 2007 @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.
Demon777 Posted December 5, 2007 Author Posted December 5, 2007 (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 December 5, 2007 by Demon777
DjDeep00 Posted December 5, 2007 Posted December 5, 2007 @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
Demon777 Posted December 5, 2007 Author Posted December 5, 2007 (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 December 5, 2007 by Demon777
DW1 Posted December 5, 2007 Posted December 5, 2007 You will never exit your Do loop.... $o = $o + 0 will never make $o = 10 AutoIt3 Online Help
Demon777 Posted December 5, 2007 Author Posted December 5, 2007 Ups.... U are right... Thx for error.
DW1 Posted December 5, 2007 Posted December 5, 2007 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 AutoIt3 Online Help
Demon777 Posted December 5, 2007 Author Posted December 5, 2007 Plz show me what i should delete and where i should add this $frominput = GuiCtrlRead($Input1) Thank you !
DW1 Posted December 5, 2007 Posted December 5, 2007 make it the first line in the Send1 function AutoIt3 Online Help
Demon777 Posted December 5, 2007 Author Posted December 5, 2007 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now