Ravage Posted October 7, 2008 Share Posted October 7, 2008 (edited) Greetings, I have created a nice GUI and 2 nice editboxes, one named 'channel' and one named 'server' Now, I know I can read an editbox(GuiCtrlCreateEdit) with the GuiCtrlRead($server) command, but then when I want to type the servers/channels in my mIRC it sends ALL the text in the serveredit box, and I only want it to pick one of the servers/channels... The Reason why I'm chosing for the GuiCtrlCreateEdit is because I want to edit/delete the channels/servers manually in my program I'll give an example, this how it is set up/what I mean Channels: Server: Chan1 irc.modified.com Chan2 irc.modified.com Chan3 irc.modified.com Now, when I say it must type the channelnames in IRC from the editbox with GuiCtrlRead($channel) it sends Chan1Chan2Chan3 and as server it sends irc.modified.comirc.modi...etc Example how it appears on my screen: /server -m irc.modified.comirc.modified1.comirc.modified2.com -j Chan1Chan2Chan3 How can I make it possible he first selects the first channel with the first server, then enter, wait and then select/send the second channel with the second server? Example of how I want it: /server -m irc.modified.com -j Chan1 [wait, + this obviously doesn't appear on the screen] /server -m irc.modified2.com -j Chan2 etc.. Thanks in advance for your help Edited October 7, 2008 by Ravage Link to comment Share on other sites More sharing options...
Monamo Posted October 8, 2008 Share Posted October 8, 2008 Greetings, I have created a nice GUI and 2 nice editboxes, one named 'channel' and one named 'server' Now, I know I can read an editbox(GuiCtrlCreateEdit) with the GuiCtrlRead($server) command, but then when I want to type the servers/channels in my mIRC it sends ALL the text in the serveredit box, and I only want it to pick one of the servers/channels... The Reason why I'm chosing for the GuiCtrlCreateEdit is because I want to edit/delete the channels/servers manually in my program I'll give an example, this how it is set up/what I mean Channels: Server: Chan1 irc.modified.com Chan2 irc.modified.com Chan3 irc.modified.com Now, when I say it must type the channelnames in IRC from the editbox with GuiCtrlRead($channel) it sends Chan1Chan2Chan3 and as server it sends irc.modified.comirc.modi...etc Example how it appears on my screen: /server -m irc.modified.comirc.modified1.comirc.modified2.com -j Chan1Chan2Chan3 How can I make it possible he first selects the first channel with the first server, then enter, wait and then select/send the second channel with the second server? Example of how I want it: /server -m irc.modified.com -j Chan1 [wait, + this obviously doesn't appear on the screen] /server -m irc.modified2.com -j Chan2 etc.. Thanks in advance for your help Just a quick 'n dirty example of splitting up your editbox entries. You can then work off of the array entries from there: #include <GUIConstants.au3> #include <Array.au3> AutoItSetOption("GUIOnEventMode", 1) $GUITitle = "Split Server Entries" $GUIWidth = 400 $GUIHeight = 150 $GUI = GUICreate($GUITitle, $GUIWidth, $GUIHeight, (@DesktopWidth - $GUIWidth) / 2, (@DesktopHeight - $GUIHeight) / 2) $editServers = GUICtrlCreateEdit("", 5, 5, $GUIWidth - 10, 120) $buttonServerDisplay = GUICtrlCreateButton("Display servers", 5, 130, $GUIWidth - 10, 20) GUISetState() #Region Events list GUISetOnEvent($GUI_EVENT_CLOSE, "_ExitIt") GUICtrlSetOnEvent($buttonServerDisplay, "_DisplayServers") #EndRegion Events list While 1 Sleep(10) WEnd Func _DisplayServers() $list = StringStripWS(GUICtrlRead($editServers),2) If $list <> "" Then $list = StringReplace($list, @LF, "") $aEntries = StringSplit($list, @CR) _ArrayDisplay($aEntries) Else MsgBox(48, "Empty List", "No entries listed - Please enter data and try again.") EndIf EndFunc Func _ExitIt() Exit EndFunc - MoChr(77)& Chr(97)& Chr(100)& Chr(101)& Chr(32)& Chr(121)& Chr(97)& Chr(32)& Chr(108)& Chr(111)& Chr(111)& Chr(107)-------I've told you 100,000 times not to exaggerate!-------Don't make me hit you with my cigarette hand...-------My scripts:Random Episode Selector, Keyboard MouseMover, CopyPath v2.1, SmartRename for XP,Window Tracer[sup]New![/sup] Link to comment Share on other sites More sharing options...
Pain Posted October 8, 2008 Share Posted October 8, 2008 Or you can do something like this. #include <Array.au3> #include <GUIConstants.au3> Global $test = "" GUICreate("My GUI") $edit = GUICtrlCreateEdit("", 10, 10, 380, 300) $button = GUICtrlCreateButton("Send", 10, 350) GUISetState (@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $button join() EndSwitch WEnd Func join() $server = StringSplit(StringStripWS(GUICtrlRead($edit), 4), Chr(13)) $split = StringSplit($server[1], " ") ConsoleWrite("/server -m " & $split[2] & " -j " & $split[1]) EndFunc Add a loop to join all servers. Link to comment Share on other sites More sharing options...
Ravage Posted October 8, 2008 Author Share Posted October 8, 2008 Thanks for the great help, now I can move on with coding it Link to comment Share on other sites More sharing options...
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