James Posted December 12, 2006 Share Posted December 12, 2006 I'm making an updated version of my Auto MSN Message away. Its got the GUI all made with Koda. Anyways, I need to know, how I can make a box which you can type (I know how) save whats been typed in, into a .ini Thanks Secure Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Xenobiologist Posted December 12, 2006 Share Posted December 12, 2006 Hi, GUICtrlCreateInput, GuiCtrlRead and IniWrite should do the trick. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
James Posted December 12, 2006 Author Share Posted December 12, 2006 (edited) Thanks. What could I do if the ini doesn't exist? Or does IniWrite do the trick? Edit: Yes, it does, just worked it out. Edited December 12, 2006 by Secure_ICT Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
James Posted December 12, 2006 Author Share Posted December 12, 2006 And yet again I'm stuck. I have done what you said, but now I get the box appearing in the GUI window. Could someone help me to get the text read and saved in a .ini? I can make it read what is in it. Here is my code so far, try it, and you will see whats wrong with it. #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form=C:\Documents and Settings\James\My Documents\Codes\Koda_1.6.0.2\Forms\msn msg.kxf $window = GUICreate("MSN Auto-Reply", 339, 417, -1, -1) $start = GUICtrlCreateButton("Start MSN Message", 8, 152, 121, 57, 0) $stop = GUICtrlCreateButton("Stop MSN Message", 8, 224, 121, 57, 0) $setText = GUICtrlCreateButton("Set text to send", 8, 80, 121, 57, 0) $set1 = GUICtrlCreateEdit("", 144, 96, 185, 25, BitOR($ES_CENTER,$ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN)) GUICtrlSetData(-1, "Enter the text that you wish to send.") $start1 = GUICtrlCreateInput("Start the Message Replier", 144, 168, 185, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL)) $stop1 = GUICtrlCreateInput("Stop the Message Replier", 144, 240, 185, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL)) $help = GUICtrlCreateButton("Help me!!!!", 8, 296, 321, 81, 0) $welcome = GUICtrlCreateEdit("", 9, 8, 322, 57, BitOR($ES_CENTER,$ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN)) GUICtrlSetData(-1, StringFormat("Welcome to the MSN Auto Replier by Secure_ICT. To start press \r\nSet Text and enter the text you wish to be entered when someone \r\ntalks to you.\r\n")) $disclaimer = GUICtrlCreateEdit("", 8, 384, 321, 25, BitOR($ES_CENTER,$ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN)) GUICtrlSetData(-1, StringFormat("This is a free script. Edit it to suit your needs.\r\n")) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $help SplashTextOn ( "Help me", "" & @CRLF & """Welcome to the MSN Auto Message Help."& @CRLF &"It's simple to make this run. All you need to do, is click the Set Text "& @CRLF &"button and "& @CRLF &"enter the text that you wish to be displayed when someone speaks to "& @CRLF &"you."& @CRLF &"You only have to set the text once as it saves the text as a .ini"& @CRLF &" "& @CRLF &"Then just press start and it will enter the message to any open MSN "& @CRLF &"conversation "& @CRLF &"window."& @CRLF &"Need more help? Just ask me on the topic."& @CRLF &""& @CRLF &"Secure_ICT") Sleep(10000) SplashOff() Case $setText GUICtrlCreateInput("Set the text", "Type here the text that you would like to have sent. This text will be sent each time the program is run, and there is a MSN conversation window.", "", "") EndSwitch WEnd Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
mikehunt114 Posted December 12, 2006 Share Posted December 12, 2006 #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form=C:\Documents and Settings\James\My Documents\Codes\Koda_1.6.0.2\Forms\msn msg.kxf $window = GUICreate("MSN Auto-Reply", 339, 417, -1, -1) $start = GUICtrlCreateButton("Start MSN Message", 8, 152, 121, 57, 0) $stop = GUICtrlCreateButton("Stop MSN Message", 8, 224, 121, 57, 0) $setText = GUICtrlCreateButton("Set text to send", 8, 80, 121, 57, 0) $set1 = GUICtrlCreateEdit("", 144, 96, 185, 25, BitOR($ES_CENTER,$ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN)) GUICtrlSetData(-1, "Enter the text that you wish to send.") $start1 = GUICtrlCreateInput("Start the Message Replier", 144, 168, 185, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL)) $stop1 = GUICtrlCreateInput("Stop the Message Replier", 144, 240, 185, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL)) $help = GUICtrlCreateButton("Help me!!!!", 8, 296, 321, 81, 0) $welcome = GUICtrlCreateEdit("", 9, 8, 322, 57, BitOR($ES_CENTER,$ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN)) GUICtrlSetData(-1, StringFormat("Welcome to the MSN Auto Replier by Secure_ICT. To start press \r\nSet Text and enter the text you wish to be entered when someone \r\ntalks to you.\r\n")) $disclaimer = GUICtrlCreateEdit("", 8, 384, 321, 25, BitOR($ES_CENTER,$ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN)) GUICtrlSetData(-1, StringFormat("This is a free script. Edit it to suit your needs.\r\n")) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $help SplashTextOn ( "Help me", "" & @CRLF & """Welcome to the MSN Auto Message Help."& @CRLF &"It's simple to make this run. All you need to do, is click the Set Text "& @CRLF &"button and "& @CRLF &"enter the text that you wish to be displayed when someone speaks to "& @CRLF &"you."& @CRLF &"You only have to set the text once as it saves the text as a .ini"& @CRLF &" "& @CRLF &"Then just press start and it will enter the message to any open MSN "& @CRLF &"conversation "& @CRLF &"window."& @CRLF &"Need more help? Just ask me on the topic."& @CRLF &""& @CRLF &"Secure_ICT") Sleep(10000) SplashOff() Case $setText $text = GUICtrlRead($setText) IniWrite("Text.ini", "MSN Text", "text1", $text) EndSwitch WEnd I'm not sure why you were creating an input when you clicked on the set text button....I think you want to take the text in the input already there and save it to an .ini file? IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
James Posted December 12, 2006 Author Share Posted December 12, 2006 You got it. When the setText button is pressed, an input box is made so you input your text that will be displayed and is saved to a .ini Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
mikehunt114 Posted December 12, 2006 Share Posted December 12, 2006 I changed what happened when you clicked Set Text......is the result what you desired? Case $setText $text = GUICtrlRead($setText) IniWrite("Text.ini", "MSN Text", "text1", $text) IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
James Posted December 12, 2006 Author Share Posted December 12, 2006 (edited) No, there is no input box. All you did was make it click the button continuously, you removed the inputbox. Edited December 12, 2006 by Secure_ICT Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
mikehunt114 Posted December 12, 2006 Share Posted December 12, 2006 (edited) I obviously don't understand what you are trying to do. What is wrong with using the input box you have already created there?Edit: Sorry, I meant to read $set1, not $setText.Case $setText $text = GUICtrlRead($set1) IniWrite("Text.ini", "MSN Text", "text1", $text)Does that help? It's not clicking the button, it's reading the edit beside it. Edited December 12, 2006 by mikehunt114 IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
Xenobiologist Posted December 12, 2006 Share Posted December 12, 2006 Hi, or just SplashOff() Case $setText IniWrite("Text.ini", "MSN Text", "text1", GUICtrlRead($set1)) EndSwitch So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
James Posted December 12, 2006 Author Share Posted December 12, 2006 mikehunt: you removed the inputbox th.meger: what would that do? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
mikehunt114 Posted December 12, 2006 Share Posted December 12, 2006 (edited) I know I removed the input box...what I'm trying to tell you is that it is unnecessary. The person types in the edit box, you read the edit box. Does that not accomplish your goal? My apologies if I called an edit an input. Edited December 12, 2006 by mikehunt114 IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
James Posted December 12, 2006 Author Share Posted December 12, 2006 But I dont need it to type in the box next to it. All that box is for is to explain what its for. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
mikehunt114 Posted December 12, 2006 Share Posted December 12, 2006 *shrugs* Ok, but when I read it, I think I need to type in that box. If that's not what you want, you should put that text in a label and not an edit. If I see an edit, I assume you want me to edit it. If you want an input to come up, use a MsgBox? Creating an input in addition to that edit is redundant. IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font] Link to comment Share on other sites More sharing options...
Xenobiologist Posted December 12, 2006 Share Posted December 12, 2006 Hi, I agree. I thought totally the same. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
James Posted December 12, 2006 Author Share Posted December 12, 2006 So what am I doing? This is what I need doing: * User clicks Set Text button * Input box appears * User types in text they wish to set * User presses OK and the text is written to a .ini file Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Xenobiologist Posted December 12, 2006 Share Posted December 12, 2006 Hi, SplashOff() Case $setText IniWrite("Text.ini", "MSN Text", "text1", InputBox("save to ini", "Type : ", "", "", 200, 50) ) EndSwitch So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
James Posted December 12, 2006 Author Share Posted December 12, 2006 For Mike: #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form=c:\documents and settings\james\my documents\codes\koda_1.6.0.2\forms\msn msg.kxf $window = GUICreate("MSN Auto-Reply", 339, 417, -1, -1) $start = GUICtrlCreateButton("Start MSN Message", 8, 152, 121, 57, 0) $Button2 = GUICtrlCreateButton("Stop MSN Message", 8, 224, 121, 57, 0) $setText = GUICtrlCreateButton("Set text to send", 8, 80, 121, 57, 0) $start1 = GUICtrlCreateLabel("Start the Message Replier", 144, 168, 185, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL)) $stop1 = GUICtrlCreateLabel("Stop the Message Replier", 144, 240, 185, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL)) $help = GUICtrlCreateButton("Help me!!!!", 8, 296, 321, 81, 0) $welcome = GUICtrlCreateEdit("", 9, 8, 322, 57, BitOR($ES_CENTER,$ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN)) GUICtrlSetData(-1, StringFormat("Welcome to the MSN Auto Replier by Secure_ICT. To start press \r\nSet Text and enter the text you wish to be entered when someone \r\ntalks to you.\r\n")) $disclaimer = GUICtrlCreateEdit("", 8, 384, 321, 25, BitOR($ES_CENTER,$ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_WANTRETURN)) GUICtrlSetData(-1, StringFormat("This is a free script. Edit it to suit your needs.\r\n")) $setlabel = GUICtrlCreateLabel("Set the text you wish to be sent", 144, 96, 177, 21, BitOR($ES_CENTER,$ES_AUTOHSCROLL)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $help SplashTextOn ( "Help me", "" & @CRLF & """Welcome to the MSN Auto Message Help."& @CRLF &"It's simple to make this run. All you need to do, is click the Set Text "& @CRLF &"button and "& @CRLF &"enter the text that you wish to be displayed when someone speaks to "& @CRLF &"you."& @CRLF &"You only have to set the text once as it saves the text as a .ini"& @CRLF &" "& @CRLF &"Then just press start and it will enter the message to any open MSN "& @CRLF &"conversation "& @CRLF &"window."& @CRLF &"Need more help? Just ask me on the topic."& @CRLF &""& @CRLF &"Secure_ICT") Sleep(10000) SplashOff() Case $setText $text = GUICtrlRead($set1) IniWrite("Text.ini", "MSN Text", "text1", $text) EndSwitch WEnd Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
James Posted December 12, 2006 Author Share Posted December 12, 2006 Ahh th.meger. It works. Thanks so much mate. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
James Posted December 12, 2006 Author Share Posted December 12, 2006 (edited) Hmm... I'm having a problem sending the msg. It works on my old version. While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $help SplashTextOn ( "Help me", "" & @CRLF & """Welcome to the MSN Auto Message Help."& @CRLF &"It's simple to make this run. All you need to do, is click the Set Text "& @CRLF &"button and "& @CRLF &"enter the text that you wish to be displayed when someone speaks to "& @CRLF &"you."& @CRLF &"You only have to set the text once as it saves the text as a .ini"& @CRLF &" "& @CRLF &"Then just press start and it will enter the message to any open MSN "& @CRLF &"conversation "& @CRLF &"window."& @CRLF &"Need more help? Just ask me on the topic."& @CRLF &""& @CRLF &"Secure_ICT") Sleep(10000) SplashOff() Case $setText IniWrite("Text.ini", "MSN Text", "TXT", InputBox("save to ini", "Type : ", "", "", 200, 50) ) Case $start IniRead("Text.ini", "TXT") If WinExists("- Conversation") Then WinActivate("- Conversation") Send($msn & "{enter}") WinClose("- Conversation") EndIf EndSwitch WEnd Edited December 12, 2006 by Secure_ICT Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ 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