Jump to content

GUI Create Input information help needed


xxfxx
 Share

Recommended Posts

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 by xxfxx
Link to comment
Share on other sites

  • Moderators

xxfxx,

script will send the #1 key infnt untill i press stop

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". :)

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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

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 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...