lrstndm Posted November 10, 2010 Posted November 10, 2010 Hi all, I have an question. is it possible to write something in inputbox1 and that it will immediately be shown on an other inputbox (inputbox2) when you type it? i already tried to put an variable in the other inputbox but it doesn't work:( is this possible? Thanks in advance Here is an small script of my tool where it needs to come: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $main = GUICreate("test",200, 200, -1, -1) $Input1 = GUICtrlCreateInput("", 10, 10, 150, 21) $Input2 = GUICtrlCreateInput("", 10, 35, 150, 21) $Button = GUICtrlCreateButton("ok", 110, 60, 50, 25) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd
UEZ Posted November 10, 2010 Posted November 10, 2010 Try this:#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $main = GUICreate("test",200, 200, -1, -1) $Input1 = GUICtrlCreateInput("", 10, 10, 150, 21) $Input2 = GUICtrlCreateInput("", 10, 35, 150, 21) $Button = GUICtrlCreateButton("ok", 110, 60, 50, 25) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect GUICtrlSetData($Input2, GUICtrlRead($Input1)) WEndBr,UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
lrstndm Posted November 10, 2010 Author Posted November 10, 2010 THANK YOU VERY MUCH this is exactly what i wanted but when i want to type in the inputbox2, it doesn't work do you know how this can be solved?
UEZ Posted November 10, 2010 Posted November 10, 2010 Yes, I know it #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $main = GUICreate("test",200, 200, -1, -1) $Input1 = GUICtrlCreateInput("", 10, 10, 150, 21) $Input2 = GUICtrlCreateInput("", 10, 35, 150, 21) $Button = GUICtrlCreateButton("ok", 110, 60, 50, 25) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_COMMAND, '_WM_COMMAND') While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Func _WM_COMMAND($hWnd, $Msg, $wParam, $lParam) Local $chk $chk = BitAND($wParam, 0x0000FFFF) Switch $chk Case $Input1 GUICtrlSetData($Input2, GUICtrlRead($Input1)) EndSwitch EndFuncBr,UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
lrstndm Posted November 10, 2010 Author Posted November 10, 2010 My tool works like this: In inputbox1 i type an URL example: www.autoit.nl/Graphical In inputbox2 the text is Autoit for example Everthing what comes after the / from inputbox1 comes in inputbox2 but the text what is already in inputbox2 needs to stay there in this example it needs to be: Inputbox1: www.autoit.nl/Graphical Inputbox2: GraphicalAutoit The word Graphical will come in the inputbox2 before the word Autoit Do you Know how this will work?? Thanks you very much in advance This is the tool: #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $main = GUICreate("test",200, 200, -1, -1) $Input1 = GUICtrlCreateInput("", 10, 10, 150, 21) $Input2 = GUICtrlCreateInput("Autoit", 10, 35, 150, 21) $Button = GUICtrlCreateButton("ok", 110, 60, 50, 25) GUISetState(@SW_SHOW) GUIRegisterMsg($WM_COMMAND, '_WM_COMMAND') While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Func _WM_COMMAND($hWnd, $Msg, $wParam, $lParam) Local $chk $chk = BitAND($wParam, 0x0000FFFF) Switch $chk Case $Input1 GUICtrlSetData($Input2, GUICtrlRead($Input1)) EndSwitch EndFunc
lrstndm Posted November 10, 2010 Author Posted November 10, 2010 I try to make something of it this is what i made of it: expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $main = GUICreate("test",200, 200, -1, -1) $Input1 = GUICtrlCreateInput("", 10, 10, 150, 21) $Input2 = GUICtrlCreateInput("Studio", 10, 35, 150, 21) $Button = GUICtrlCreateButton("ok", 110, 60, 50, 25) GUISetState(@SW_SHOW) $text1 = GUICtrlRead($Input1) $Splittext1 = StringSplit($text1, "/") GUIRegisterMsg($WM_COMMAND, '_WM_COMMAND') While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Func _WM_COMMAND($hWnd, $Msg, $wParam, $lParam) Local $chk $chk = BitAND($wParam, 0x0000FFFF) Switch $chk Case $Input1 $Splittext = StringSplit(GUICtrlRead($Input1), "/") GUICtrlSetData($Input2, $Splittext[2] & "Studio") EndSwitch EndFunc But when i type something in it it goes immediately wrong what i want to do is: What i type after the / in inputbox1 Needs to come in inputbox2 that is my problem can anyone help me plz??
UEZ Posted November 10, 2010 Posted November 10, 2010 What about this version:expandcollapse popup#include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $main = GUICreate("test",200, 200, -1, -1) $Input1 = GUICtrlCreateInput("", 10, 10, 150, 21) $Input2 = GUICtrlCreateInput("", 10, 35, 150, 21) $Button = GUICtrlCreateButton("ok", 110, 60, 50, 25) GUISetState(@SW_SHOW) Local $first = 0 Local $save GUIRegisterMsg($WM_COMMAND, '_WM_COMMAND') While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Func _WM_COMMAND($hWnd, $Msg, $wParam, $lParam) Local $chk, $aString $chk = BitAND($wParam, 0x0000FFFF) Switch $chk Case $Input1 $aString = StringRegExp(GUICtrlRead($Input1), ".*/(.*)", 3) If IsArray($aString) Then GUICtrlSetData($Input2, $aString[0] & $save) $first = 1 Else $first = 0 EndIf Case $Input2 If Not $first Then $save = GUICtrlRead($Input2) EndIf EndSwitch EndFuncBr,UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
lrstndm Posted November 10, 2010 Author Posted November 10, 2010 OMG YOUR SO AMAZING:o thank you very much this is exactly what i needed(L)
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