Sign in to follow this  
Followers 0
nonplayablecharacter

need help with gui>input

5 posts in this topic

#1 ·  Posted (edited)

the script i wrote is a gui with an input box....i want the input box to insert text depending on the key pressed...for example if someone press end key...it will have end in the input...i would also like it to delete old keys when new ones are entered...so if i press end, then home only home is there...this is for use in creating a gui to let someone choose thier own hotkeys

CODE

#include <GUIConstants.au3>

GUICreate("GUI",320,120)

GUICtrlCreateInput ( "", 10, 5, 300, 20)

GUISetState ()

While 1

$msg = GUIGetMsg()

Switch $msg

Case $GUI_EVENT_CLOSE

Exit

EndSwitch

Wend

anyone got any codes to help me? even if it's something small so i can start trying it by myself

im checking for it in style/exStyle

Edited by nonplayablecharacter

You can always count on me for the dumb questions ;)My Scripts:Rikku

Share this post


Link to post
Share on other sites



Unfortunately it isn't that easy, you should try rewriting one of those in the "Examples Forums", maybe this one?

i'm probably gonna just do alot of if...then.endif stuff i guess....and use _IsPressed unless anyone got a better idea


You can always count on me for the dumb questions ;)My Scripts:Rikku

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

i've got a solution going...this is it so far...it isn't fine tuned yet but...doing that is going to take me more time...most of this script i made using scripts...scripts making scripts ftw i guess >.>

CODE

#include <GUIConstants.au3>

#include <Misc.au3>

GUICreate("GUI",320,120)

$Input=GUICtrlCreateInput ( "", 10, 5, 300, 20,$ES_READONLY)

GUISetState ()

While 1

If _IsPressed("01") then

$01=_IsPressed("01")

GUICtrlSetData($input,$01)

EndIf;01=

If _IsPressed("02") then

$02=_IsPressed("02")

GUICtrlSetData($input,$02)

EndIf;02=

If _IsPressed("04") then

$04=_IsPressed("04")

GUICtrlSetData($input,$04)

EndIf;04=

If _IsPressed("05") then

$05=_IsPressed("05")

GUICtrlSetData($input,$05)

EndIf;05=

If _IsPressed("06") then

$06=_IsPressed("06")

GUICtrlSetData($input,$06)

EndIf;06=

If _IsPressed("08") then

$08=_IsPressed("08")

GUICtrlSetData($input,$08)

EndIf;08=

If _IsPressed("09") then

$09=_IsPressed("09")

GUICtrlSetData($input,$09)

EndIf;09=

If _IsPressed("0C") then

$0C=_IsPressed("0C")

GUICtrlSetData($input,$0C)

EndIf;0C=

If _IsPressed("0D") then

$0D=_IsPressed("0D")

GUICtrlSetData($input,$0D)

EndIf;0D=

If _IsPressed("10") then

$10=_IsPressed("10")

GUICtrlSetData($input,$10)

EndIf;10=

If _IsPressed("11") then

$11=_IsPressed("11")

GUICtrlSetData($input,$11)

EndIf;11=

If _IsPressed("12") then

$12=_IsPressed("12")

GUICtrlSetData($input,$12)

EndIf;12=

If _IsPressed("13") then

$13=_IsPressed("13")

GUICtrlSetData($input,$13)

EndIf;13=

If _IsPressed("14") then

$14=_IsPressed("14")

GUICtrlSetData($input,$14)

EndIf;14=

If _IsPressed("1B") then

$1B=_IsPressed("1B")

GUICtrlSetData($input,$1B)

EndIf;1B=

If _IsPressed("20") then

$20=_IsPressed("20")

GUICtrlSetData($input,$20)

EndIf;20=

If _IsPressed("21") then

$21=_IsPressed("21")

GUICtrlSetData($input,$21)

EndIf;21=

If _IsPressed("22") then

$22=_IsPressed("22")

GUICtrlSetData($input,$22)

EndIf;22=

If _IsPressed("23") then

$23=_IsPressed("23")

GUICtrlSetData($input,$23)

EndIf;23=

If _IsPressed("24") then

$24=_IsPressed("24")

GUICtrlSetData($input,$24)

EndIf;24=

If _IsPressed("25") then

$25=_IsPressed("25")

GUICtrlSetData($input,$25)

EndIf;25=

If _IsPressed("26") then

$26=_IsPressed("26")

GUICtrlSetData($input,$26)

EndIf;26=

If _IsPressed("27") then

$27=_IsPressed("27")

GUICtrlSetData($input,$27)

EndIf;27=

If _IsPressed("28") then

$28=_IsPressed("28")

GUICtrlSetData($input,$28)

EndIf;28=

If _IsPressed("29") then

$29=_IsPressed("29")

GUICtrlSetData($input,$29)

EndIf;29=

If _IsPressed("2A") then

$2A=_IsPressed("2A")

GUICtrlSetData($input,$2A)

EndIf;2A=

If _IsPressed("2B") then

$2B=_IsPressed("2B")

GUICtrlSetData($input,$2B)

EndIf;2B=

If _IsPressed("2C") then

$2C=_IsPressed("2C")

GUICtrlSetData($input,$2C)

EndIf;2C=

If _IsPressed("2D") then

$2D=_IsPressed("2D")

GUICtrlSetData($input,$2D)

EndIf;2D=

If _IsPressed("2E") then

$2E=_IsPressed("2E")

GUICtrlSetData($input,$2E)

EndIf;2E=

If _IsPressed("30") then

$30=_IsPressed("30")

GUICtrlSetData($input,$30)

EndIf;30=

If _IsPressed("31") then

$31=_IsPressed("31")

GUICtrlSetData($input,$31)

EndIf;31=

If _IsPressed("32") then

$32=_IsPressed("32")

GUICtrlSetData($input,$32)

EndIf;32=

If _IsPressed("33") then

$33=_IsPressed("33")

GUICtrlSetData($input,$33)

EndIf;33=

If _IsPressed("34") then

$34=_IsPressed("34")

GUICtrlSetData($input,$34)

EndIf;34=

If _IsPressed("35") then

$35=_IsPressed("35")

GUICtrlSetData($input,$35)

EndIf;35=

If _IsPressed("36") then

$36=_IsPressed("36")

GUICtrlSetData($input,$36)

EndIf;36=

If _IsPressed("37") then

$37=_IsPressed("37")

GUICtrlSetData($input,$37)

EndIf;37=

If _IsPressed("38") then

$38=_IsPressed("38")

GUICtrlSetData($input,$38)

EndIf;38=

If _IsPressed("39") then

$39=_IsPressed("39")

GUICtrlSetData($input,$39)

EndIf;39=

If _IsPressed("41") then

$41=_IsPressed("41")

GUICtrlSetData($input,$41)

EndIf;41=

If _IsPressed("42") then

$42=_IsPressed("42")

GUICtrlSetData($input,$42)

EndIf;42=

If _IsPressed("43") then

$43=_IsPressed("43")

GUICtrlSetData($input,$43)

EndIf;43=

If _IsPressed("44") then

$44=_IsPressed("44")

GUICtrlSetData($input,$44)

EndIf;44=

If _IsPressed("45") then

$45=_IsPressed("45")

GUICtrlSetData($input,$45)

EndIf;45=

If _IsPressed("46") then

$46=_IsPressed("46")

GUICtrlSetData($input,$46)

EndIf;46=

If _IsPressed("47") then

$47=_IsPressed("47")

GUICtrlSetData($input,$47)

EndIf;47=

If _IsPressed("48") then

$48=_IsPressed("48")

GUICtrlSetData($input,$48)

EndIf;48=

If _IsPressed("49") then

$49=_IsPressed("49")

GUICtrlSetData($input,$49)

EndIf;49=

If _IsPressed("4A") then

$4A=_IsPressed("4A")

GUICtrlSetData($input,$4A)

EndIf;4A=

If _IsPressed("4B") then

$4B=_IsPressed("4B")

GUICtrlSetData($input,$4B)

EndIf;4B=

If _IsPressed("4C") then

$4C=_IsPressed("4C")

GUICtrlSetData($input,$4C)

EndIf;4C=

If _IsPressed("4D") then

$4D=_IsPressed("4D")

GUICtrlSetData($input,$4D)

EndIf;4D=

If _IsPressed("4E") then

$4E=_IsPressed("4E")

GUICtrlSetData($input,$4E)

EndIf;4E=

If _IsPressed("4F") then

$4F=_IsPressed("4F")

GUICtrlSetData($input,$4F)

EndIf;4F=

If _IsPressed("50") then

$50=_IsPressed("50")

GUICtrlSetData($input,$50)

EndIf;50=

If _IsPressed("51") then

$51=_IsPressed("51")

GUICtrlSetData($input,$51)

EndIf;51=

If _IsPressed("52") then

$52=_IsPressed("52")

GUICtrlSetData($input,$52)

EndIf;52=

If _IsPressed("53") then

$53=_IsPressed("53")

GUICtrlSetData($input,$53)

EndIf;53=

If _IsPressed("54") then

$54=_IsPressed("54")

GUICtrlSetData($input,$54)

EndIf;54=

If _IsPressed("55") then

$55=_IsPressed("55")

GUICtrlSetData($input,$55)

EndIf;55=

If _IsPressed("56") then

$56=_IsPressed("56")

GUICtrlSetData($input,$56)

EndIf;56=

If _IsPressed("57") then

$57=_IsPressed("57")

GUICtrlSetData($input,$57)

EndIf;57=

If _IsPressed("58") then

$58=_IsPressed("58")

GUICtrlSetData($input,$58)

EndIf;58=

If _IsPressed("59") then

$59=_IsPressed("59")

GUICtrlSetData($input,$59)

EndIf;59=

If _IsPressed("5A") then

$5A=_IsPressed("5A")

GUICtrlSetData($input,$5A)

EndIf;5A=

If _IsPressed("5B") then

$5B=_IsPressed("5B")

GUICtrlSetData($input,$5B)

EndIf;5B=

If _IsPressed("5C") then

$5C=_IsPressed("5C")

GUICtrlSetData($input,$5C)

EndIf;5C=

If _IsPressed("60") then

$60=_IsPressed("60")

GUICtrlSetData($input,$60)

EndIf;60=

If _IsPressed("61") then

$61=_IsPressed("61")

GUICtrlSetData($input,$61)

EndIf;61=

If _IsPressed("62") then

$62=_IsPressed("62")

GUICtrlSetData($input,$62)

EndIf;62=

If _IsPressed("63") then

$63=_IsPressed("63")

GUICtrlSetData($input,$63)

EndIf;63=

If _IsPressed("64") then

$64=_IsPressed("64")

GUICtrlSetData($input,$64)

EndIf;64=

If _IsPressed("65") then

$65=_IsPressed("65")

GUICtrlSetData($input,$65)

EndIf;65=

If _IsPressed("66") then

$66=_IsPressed("66")

GUICtrlSetData($input,$66)

EndIf;66=

If _IsPressed("67") then

$67=_IsPressed("67")

GUICtrlSetData($input,$67)

EndIf;67=

If _IsPressed("68") then

$68=_IsPressed("68")

GUICtrlSetData($input,$68)

EndIf;68=

If _IsPressed("69") then

$69=_IsPressed("69")

GUICtrlSetData($input,$69)

EndIf;69=

If _IsPressed("6A") then

$6A=_IsPressed("6A")

GUICtrlSetData($input,$6A)

EndIf;6A=

If _IsPressed("6B") then

$6B=_IsPressed("6B")

GUICtrlSetData($input,$6B)

EndIf;6B=

If _IsPressed("6C") then

$6C=_IsPressed("6C")

GUICtrlSetData($input,$6C)

EndIf;6C=

If _IsPressed("6D") then

$6D=_IsPressed("6D")

GUICtrlSetData($input,$6D)

EndIf;6D=

If _IsPressed("6E") then

$6E=_IsPressed("6E")

GUICtrlSetData($input,$6E)

EndIf;6E=

If _IsPressed("6F") then

$6F=_IsPressed("6F")

GUICtrlSetData($input,$6F)

EndIf;6F=

If _IsPressed("70") then

$70=_IsPressed("70")

GUICtrlSetData($input,$70)

EndIf;70=

If _IsPressed("71") then

$71=_IsPressed("71")

GUICtrlSetData($input,$71)

EndIf;71=

If _IsPressed("72") then

$72=_IsPressed("72")

GUICtrlSetData($input,$72)

EndIf;72=

If _IsPressed("73") then

$73=_IsPressed("73")

GUICtrlSetData($input,$73)

EndIf;73=

If _IsPressed("74") then

$74=_IsPressed("74")

GUICtrlSetData($input,$74)

EndIf;74=

If _IsPressed("75") then

$75=_IsPressed("75")

GUICtrlSetData($input,$75)

EndIf;75=

If _IsPressed("76") then

$76=_IsPressed("76")

GUICtrlSetData($input,$76)

EndIf;76=

If _IsPressed("77") then

$77=_IsPressed("77")

GUICtrlSetData($input,$77)

EndIf;77=

If _IsPressed("78") then

$78=_IsPressed("78")

GUICtrlSetData($input,$78)

EndIf;78=

If _IsPressed("79") then

$79=_IsPressed("79")

GUICtrlSetData($input,$79)

EndIf;79=

If _IsPressed("7A") then

$7A=_IsPressed("7A")

GUICtrlSetData($input,$7A)

EndIf;7A=

If _IsPressed("7B") then

$7B=_IsPressed("7B")

GUICtrlSetData($input,$7B)

EndIf;7B=

If _IsPressed("7C") then

$7C=_IsPressed("7C")

GUICtrlSetData($input,$7C)

EndIf;7C=

If _IsPressed("80") then

$80=_IsPressed("80")

GUICtrlSetData($input,$80)

EndIf;80=

If _IsPressed("90") then

$90=_IsPressed("90")

GUICtrlSetData($input,$90)

EndIf;90=

If _IsPressed("91") then

$91=_IsPressed("91")

GUICtrlSetData($input,$91)

EndIf;91=

If _IsPressed("A0") then

$A0=_IsPressed("A0")

GUICtrlSetData($input,$A0)

EndIf;A0=

If _IsPressed("A1") then

$A1=_IsPressed("A1")

GUICtrlSetData($input,$A1)

EndIf;A1=

If _IsPressed("A2") then

$A2=_IsPressed("A2")

GUICtrlSetData($input,$A2)

EndIf;A2=

If _IsPressed("A3") then

$A3=_IsPressed("A3")

GUICtrlSetData($input,$A3)

EndIf;A3=

If _IsPressed("A4") then

$A4=_IsPressed("A4")

GUICtrlSetData($input,$A4)

EndIf;A4=

If _IsPressed("A5") then

$A5=_IsPressed("A5")

GUICtrlSetData($input,$A5)

EndIf;A5=

$msg = GUIGetMsg()

Switch $msg

Case $GUI_EVENT_CLOSE

Exit

EndSwitch

Wend

it's returning success status which is good all that's left is to change how GUICtrlSetData is done ;)

Edited by nonplayablecharacter

You can always count on me for the dumb questions ;)My Scripts:Rikku

Share this post


Link to post
Share on other sites

the script i wrote is a gui with an input box....i want the input box to insert text depending on the key pressed...for example if someone press end key...it will have end in the input...i would also like it to delete old keys when new ones are entered...so if i press end, then home only home is there...this is for use in creating a gui to let someone choose thier own hotkeys

CODE

#include <GUIConstants.au3>

GUICreate("GUI",320,120)

GUICtrlCreateInput ( "", 10, 5, 300, 20)

GUISetState ()

While 1

$msg = GUIGetMsg()

Switch $msg

Case $GUI_EVENT_CLOSE

Exit

EndSwitch

Wend

anyone got any codes to help me? even if it's something small so i can start trying it by myself

im checking for it in style/exStyle

You might like to play with this:

CODE
#include <GUIConstants.au3> ;Windows Interface

#include <Misc.au3> ;Alt + Key

Global $defaultInput

While 1

$dll = DllOpen("user32.dll")

;//Alt + A

If _IsPressed('12', $dll) And _IsPressed('41', $dll) Then

DllClose($dll)

$defaultInput = "Test1"

_UserInterface()

EndIf

;//Alt + B

If _IsPressed('12', $dll) And _IsPressed('42', $dll) Then

DllClose($dll)

$defaultInput = "Test2"

_UserInterface()

EndIf

WEnd

Func _UserInterface()

While 1

GUICreate("GUI",320,120)

GUISetState(@SW_SHOW)

$TestInput = GUICtrlCreateInput($defaultInput, 10, 5, 300, 20)

GUICtrlSetLimit(-1, 24)

GUICtrlSetState(-1, $GUI_FOCUS)

$Process = GUICtrlCreateButton("Process", 10, 35, 110, 25)

While 1

$msg = GUIGetMsg()

$Input = GUICtrlRead($TestInput)

Select

Case $msg = $GUI_EVENT_CLOSE

GUIDelete()

Exit

Case $msg = $Process

GUIDelete()

If $Input = "Test1" Then Msgbox(0,"","You Pressed Alt + A",5)

If $Input = "Test2" Then Msgbox(0,"","You Pressed Alt + B",5)

Exit

EndSelect

WEnd

WEnd

EndFunc

Cheers Ant.. ;)

Share this post


Link to post
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
Sign in to follow this  
Followers 0