55 posts in this topic
Hello Guys this is my gui and i need the numeric value typed in the highlighted inputbox. if this value is greater than 1 i need to perform some operations
Here is the summary about that field which i got from wininfo tool
i tried writing the code as shown below.. but the msgbox is popping up empty value..when the same code is pasted under some button action i am able to access the value present in the field..but when placed alone as written in the attached script i am unable to fetch it...
here i am using the valu present in the field
can you guys tell me what's wrong??? or how can i get that value?
in need the path/text present int above shown input box to be copied or retrieved into a variable .. how can i do that?
i would like to set a value into an INPUT field.
Checked the _IEFormElementSetValue function but that does require _IEFormGetObjByName and this is where the problem comes in. The input field I want to write to is not a part of a form tag. It is part of a table.
<input type="text" class="w2" id="nabidka_vozidel_formular_tach_od" name="nabidka_vozidel_formular_tach_od" onchange="GLOBAL.pocetInzerceNZ("nabidka_vozidel_formular","tach_od","");" autocomplete="off"> I tried this but that didn't work:
$oDownloadSamples = _IEGetObjById($oIE, "nabidka_vozidel_formular_tach_od") _IEFormElementSetValue($oDownloadSamples, "123") If you want to try the site I'm working with is https://www.tipcars.cz/. There is a menu on the top left hand side and if you click the "vyhledat" button the input fields will show up.
I have read the Tutorial. Used the Help File and used an example script by @Melba23. I am still struggling.
To use GUIRegisterMsg one needs the following
a control in the GUI a GUIRegisterMsg instruction in the GUI to link the control to the WM_COMMAND function a Case statement in the Switch loop to run it a WM_COMMAND function and a processor function... Mine looks like this
;~ ; QuickSearch combo box $g_cbQwkSrch = GUICtrlCreateCombo("", 8, 26, 180, 17) ; start blank GUICtrlSetTip($g_cbQwkSrch, "Type to search", "QuickSearch") GUIRegisterMsg($WM_COMMAND, "__WM_COMMAND_QWKSEARCH_CMB") ;------------------------------------ ; use in Switch Loop ;~ ; QuickSearch Case $g_cbQwkSrch ConsoleWrite("221 Case $g_cbQwkSrch" & @CRLF) ;-------------------------------------- Func _QwkSrch_Edit_Changed() ConsoleWrite("41 _QwkSrch_Edit_Changed" & @CRLF) ; Autocomplete the edit _GUICtrlComboBox_AutoComplete($g_cbQwkSrch) ; Change the label to match the autocompleted edit entry EndFunc ;==>_QwkSrch_Edit_Changed Func __WM_COMMAND_QWKSEARCH_CMB($hWnd, $iMsg, $wParam, $lParam) ; GUIRegisterMsg($WM_COMMAND, "__WM_COMMAND_QWKSEARCH_CMB") ConsoleWrite("50 _WM_COMMAND_QWKSEARCH_CMB fired " & @CRLF) Local $Found = '' #forceref $hWnd, $iMsg If $lParam = GUICtrlGetHandle($g_cbQwkSrch) And BitShift($wParam, 16) = $CBN_EDITCHANGE Then ; Our combo edit content has changed ; get data from source ---------------------------- Local $datafromsource = fFindFilesForQuickSearch($stringtofind) ; datafromsource convert to Combo friendly format ; Add data to combo _GUICtrlComboBox_BeginUpdate($g_cbQwkSrch) GUICtrlSetData($g_cbQwkSrch, $Found) _GUICtrlComboBox_EndUpdate($g_cbQwkSrch) EndIf _QwkSrch_Edit_Changed() ; Action this function EndIf EndFunc ;==>_WM_COMMAND_QWKSEARCH_CMB Func fFindFilesForQuickSearch($stringtofind) ; helper function for QuickSearch ; get data here Return $aResult EndFunc ;==>fFindFilesForQuickSearch Now the following:
Can I declare the variable $g_cbQwkSrch in Global, then use in multiple functions - reassigning different combo's to it as I go along? Should GUIRegisterMsg be expressly de-registered, or does that happen automatically at GuiDelete()? Where is the best/correct place to call GUIRegisterMsg? With the creation of its control, before the GUISetState, or before the start of the loop? The Help File contains this entry, what is the intent? Must this always be called with four args, or a max of four... !!! To make the user function workable you have to define it with maximum 4 function parameters otherwise the function won't be called !!!