zero57 Posted July 18, 2009 Share Posted July 18, 2009 Hey, I am wondering how do u link programs together? I mean if u make an inputbox, how do u keep what they have putted in? E.G.: I entered Hi into the input box and then when i click ok it transfers the Hi into a label. Picture using text.: _____________________ Input Box------------| _____________________| Please type something| ---------------------| _____________________| |Hi------------------| |____________________| |--------------------| ---------Ok----------| _____________________| Please forget the -'s they r just to organize the pic... so when u put in ur desired word / sentence, u press ok. and then the word / sentence gets into a label in the next input box. Please help us. [font="Arial Black"][u]zero57[/u][/font] Link to comment Share on other sites More sharing options...
Neutro Posted July 18, 2009 Share Posted July 18, 2009 dim $sometext $sometext = "Script Start!" While 1 = 1 $sometext = InputBox($sometext, "InputBoxDescription", "DefaultInputText") Wend Each time you press OK it will put the text you wrote as the next inputbox name. Is this what you wanted? Identify active network connections and change DNS server - Easily export Windows network settings Clean temporary files from Windows users profiles directories - List Active Directory Groups members Export content of an Outlook mailbox to a PST file - File patch manager - IRC chat connect example Thanks again for your help Water! Link to comment Share on other sites More sharing options...
dantay9 Posted July 18, 2009 Share Posted July 18, 2009 The return value of the inputbox is whatever was typed in unless there is an error. Something like this. $Return = InputBox("Test", "Input sentence") If Not @error Then GUICtrlSetData($Label, $Return) Link to comment Share on other sites More sharing options...
zero57 Posted July 18, 2009 Author Share Posted July 18, 2009 (edited) dim $sometext $sometext = "Script Start!" While 1 = 1 $sometext = InputBox($sometext, "InputBoxDescription", "DefaultInputText") Wend Each time you press OK it will put the text you wrote as the next inputbox name. Is this what you wanted? Somewhat like this. Just not so repetetitive, but i can fix that by removing the command "While" and i wanted it to put the text in a label. U know when u make GUI's, u can add labels.... But I guess we can accept this, but first i have to wait for Simolokid's approval. Oh and thx. I learned something about this. Before i forget, posts can still be posted. While waiting for Simolokid's approval, We can still have more effective codes/scripts on linking programs. The return value of the inputbox is whatever was typed in unless there is an error. Something like this. $Return = InputBox("Test", "Input sentence") If Not @error Then GUICtrlSetData($Label, $Return) There is an error... it said to declare the variable called: $Label Mind telling me what is it suppose to declare? Or Can u Fix that for me? Edited July 18, 2009 by zero57 [font="Arial Black"][u]zero57[/u][/font] Link to comment Share on other sites More sharing options...
dantay9 Posted July 18, 2009 Share Posted July 18, 2009 $Label is the handle to the label. Here is a full example. I moved the inputbox out of the way of the first gui. Hope this helps. $GUI = GUICreate("GUI", 200, 200) $Label = GUICtrlCreateLabel("", 10, 10, 150, 20) GUISetState() Sleep(2000) $Return = InputBox("Test", "Input sentence", "", "", Default, Default, @DesktopWidth / 2 + 100, @DesktopHeight / 2) If Not @error Then GUICtrlSetData($Label, $Return) While 1 If GUIGetMsg() = -3 Then Exit Sleep(10) WEnd Link to comment Share on other sites More sharing options...
zero57 Posted July 18, 2009 Author Share Posted July 18, 2009 $Label is the handle to the label. Here is a full example. I moved the inputbox out of the way of the first gui. Hope this helps. $GUI = GUICreate("GUI", 200, 200) $Label = GUICtrlCreateLabel("", 10, 10, 150, 20) GUISetState() Sleep(2000) $Return = InputBox("Test", "Input sentence", "", "", Default, Default, @DesktopWidth / 2 + 100, @DesktopHeight / 2) If Not @error Then GUICtrlSetData($Label, $Return) While 1 If GUIGetMsg() = -3 Then Exit Sleep(10) WEnd Woah! Exactly what we need. Thx dantay9 and Neutro. Now waiting till he comes online and approves the script. But thx man. [font="Arial Black"][u]zero57[/u][/font] Link to comment Share on other sites More sharing options...
dantay9 Posted July 19, 2009 Share Posted July 19, 2009 Your welcome. Link to comment Share on other sites More sharing options...
zero57 Posted July 19, 2009 Author Share Posted July 19, 2009 yeah this is getting close but more answers to come when we finished the plan too. Oh ya, if u can, please check ur mail. (On autoit forum messenger) [font="Arial Black"][u]zero57[/u][/font] 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