eKolin Posted June 3, 2016 Share Posted June 3, 2016 (edited) Hello! I want to create a simple GUI that would be something like this (created with paint, good enough lol): Basicly I should be able to edit the black text to whatever i want in the code, the little blue boxes are to put in already existing (that have values of 0) $variable and $variable2 values, if blank then 0. This GUI Would have to pop up only on script start, OK to change the $variable $variable2 and "start" the script. Would like that some1 would write this little script and i could learn out of it Edited June 3, 2016 by eKolin Typo Link to comment Share on other sites More sharing options...
Synapsee Posted June 3, 2016 Share Posted June 3, 2016 Hi, you should try the sample here : https://www.autoitscript.com/autoit3/docs/functions/GUICtrlCreateInput.htm Link to comment Share on other sites More sharing options...
Trong Posted June 3, 2016 Share Posted June 3, 2016 (edited) learn quickly from example: #include <GUIConstantsEx.au3> Global $hGUI = GUICreate("AutoIt Input", 573, 94, -1, -1) GUICtrlCreateLabel("Text, change $variable value to: ", 16, 16, 188, 17) Global $iVariable = GUICtrlCreateInput("", 208, 16, 105, 21) Global $Label2 = GUICtrlCreateLabel("Text", 320, 16, 116, 17) GUICtrlCreateLabel("Text, change $variable2 value to:", 17, 52, 188, 17) Global $iVariable2 = GUICtrlCreateInput("", 209, 52, 105, 21) Global $Label4 = GUICtrlCreateLabel("TeXt", 321, 52, 108, 17) Global $bChange = GUICtrlCreateButton("Button1", 440, 16, 113, 57) GUISetState(@SW_SHOW) Global $variable, $variable2 While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $bChange $variable = GUICtrlRead($iVariable) ; Read/get data of a Input1. $variable2 = GUICtrlRead($iVariable2) ; Read/get data of a Input2. MsgBox(0, "Value Now", "$variable value= " & $variable & @CRLF & "$variable2 value= " & $variable2) EndSwitch Sleep(10) WEnd Edited June 3, 2016 by Trong Regards, Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 3, 2016 Moderators Share Posted June 3, 2016 (edited) @eKolin all of your posts thus far have been something to the effect of "this should be simple, write it for me". This forum operates on the "teach a man to fish" motto; it is not a place where you put in a demand and someone barfs up code for you. You need to put in some effort if you want to learn. Below is a GUI template to get you started, as was suggested above you need to do some reading in the help file to figure out the rest of it. #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 300, 300) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edit: Or just wait long enough and someone will spoon-feed it to you I guess. Edited June 3, 2016 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
eKolin Posted June 3, 2016 Author Share Posted June 3, 2016 (edited) 9 minutes ago, JLogan3o13 said: @eKolin all of your posts thus far have been something to the effect of "this should be simple, write it for me". This forum operates on the "teach a man to fish" motto; it is not a place where you put in a demand and someone barfs up code for you. You need to put in some effort if you want to learn. Below is a GUI template to get you started, as was suggested above you need to do some reading in the help file to figure out the rest of it. #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 300, 300) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd @JLogan3o13 Well, sorry then. Sometimes it seems pointless to me when i spend like 2-8 hours to do a basic function when i need A TON of them, already spent like 50 hours learning AU3 past 2 weeks + school, so don't think that i'm asking for everything done for me. I'm asking only for stuff that imo don't have clear enough tutorials for 0 skill people or just i'm getting tilted because i can't make one function work, instead i ask for another function to save some time doing my project. I find copy/paste helping me to learn aswell. Edited June 3, 2016 by eKolin Included @ Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 3, 2016 Moderators Share Posted June 3, 2016 @eKolin, everyone on this forum was a "0 skill person" at some point. But the longer you rely on someone to spoon feed it to you the longer you will stay a "0 skill person". If you run into issues with a function, or how to complete a task after trying it yourself, then post what you have. You'll find people a lot more willing to help if you show some level of effort rather than "this should be easy for you, do it for me". As to your point about clear enough tutorials, you're asking to create a gui. The example I provided you is almost word for word out of the help file. If you find something that is not clear in the help file - ask. It at least shows you are putting forth some effort. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Trong Posted June 3, 2016 Share Posted June 3, 2016 "this should be easy for you, do it for me" Regards, Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 3, 2016 Moderators Share Posted June 3, 2016 @Trong exactly what did that add to the discussion, aside from inflating your post count? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Trong Posted June 3, 2016 Share Posted June 3, 2016 @JLogan3o13 I'm not interested in the post coun! If possible I want to remove 90% of my posts. Anyway I will not spam the same content again! it's just a reaction to having a saying with the impact. Regards, 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