xxfxx Posted August 4, 2012 Share Posted August 4, 2012 (edited) ok simply put its been years since I used autoit lots has changed. simply starting out basic again this scrip if I put the #1 key in gui input fild box and whatever pause I wish in box 2 and then eather chkd or not to use. start stop.. so script will send the #1 key infnt untill i press stop. im little lost with new gui Toss old Dog a bone. ]#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.8.1 Author: XxFxX Script Function: Send any key that you have in numberkey box to any application untill stoped. #ce ---------------------------------------------------------------------------- #include #include #include #include #include #Region ### START Koda GUI section ### Form=C:UsersxxfxxDesktoptestau3forum_form.kxf $Form1 = GUICreate("Form1", 153, 282, 192, 124) $Input1 = GUICtrlCreateInput("NumberKey", 72, 40, 73, 21) $Input2 = GUICtrlCreateInput("Pause", 8, 104, 65, 21) $Lkey = GUICtrlCreateLabel("Key you wish to send", 8, 16, 104, 17) $LPauseTimer = GUICtrlCreateLabel("Pause time", 8, 80, 56, 17) $UseKey = GUICtrlCreateCheckbox("Use Key", 80, 104, 65, 25) $BTStart = GUICtrlCreateButton("Start", 16, 208, 49, 25) $BTStop = GUICtrlCreateButton("Stop", 80, 208, 51, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edited August 4, 2012 by xxfxx Link to comment Share on other sites More sharing options...
NicePerson Posted August 4, 2012 Share Posted August 4, 2012 You can use GUICtrlRead() function to get the values from input box and same for checking check box... Link to comment Share on other sites More sharing options...
xxfxx Posted August 5, 2012 Author Share Posted August 5, 2012 Can you please put example in my code. as I created $Input1 = GUICtrlRead ($Input1) after my [$Input1 = GUICtrlCreateInput("NumberKey", 72, 40, 73, 21) but still wont read that input field. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 5, 2012 Moderators Share Posted August 5, 2012 xxfxx,script will send the #1 key infnt untill i press stopAs it so long since you used AutoIt you might like to take a look at the current Forum Rules. You will notice that we are not keen on, amongst other things, "spammers". But as "a bone to an old Dog" - in those 2 snippets you posted you are using the same variable to store the ControlID of the input and its content which may cause problems. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
xxfxx Posted August 5, 2012 Author Share Posted August 5, 2012 As it so long since you used AutoIt you might like to take a look at the current Forum Rules. You will notice that we are not keen on, amongst other things, "spammers".I totaly undestand and did check up on the rules, and that is why this is not a spamer or game woowho. just a simple whay for me to accomplish other task that i will not discuss hear muttley so now i think i understand what you said tho on my issue and that i am useing the same variable to store the ControlID of the input that would mean just changing the input ect. so would be more on this line i take it $Input3 = GUICtrlRead ($Input1) Link to comment Share on other sites More sharing options...
GEOSoft Posted August 5, 2012 Share Posted August 5, 2012 (edited) You should actually use something other than that as well. Better would be$Input1 = GUICtrlCreateInput("NumberKey", 72, 40, 73, 21) $s_Input1 = GUICtrlRead($Input1);; Where $s_ indicates that is the string contained in $Input_1 Edited August 5, 2012 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" 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