Quote from juancarlos on May 3, 2020, 8:43 pmhola a todos , hay alguna forma de pasar cambiar el tabulador por el enter , me falla el metodo que he hecho con el keydown
en la subroutina he puesto esto y al principio me funciona pero cuando he pasado varias veces por todas las lineas empieza a saltarme de tres en tres en el focus , el focus lo almaceno en esta la variable [focused]
If [keynumber] == 13
FocusObject "[focused]"
If [focused] === "apellido"
SetVar [focused] "domicilio"
else
If [focused] === "domicilio"
setvar [focused] "localidad"
else
If [focused] === "localidad"
setvar [focused] "provincia"
else
If [focused] === "provincia"
setvar [focused] "codigopostal"
else
If [focused] === "codigopostal"
setvar [focused] "dni"
else
If [focused] === "dni"
setvar [focused] "sexo"
else
If [focused] === "sexo"
setvar [focused] "telefono"
else
If [focused] === "telefono"
setvar [focused] "movil"
else
If [focused] === "movil"
setvar [focused] "whatsapp"
else
If [focused] === "whatsapp"
setvar [focused] "profesion"
else
If [focused] === "profesion"
setvar [focused] "fnacimiento"
else
If [focused] === "fnacimiento"
setvar [focused] "email"
else
If [focused] === "email"
setvar [focused] "observaciones"
else
If [focused] === "observaciones"
setvar [focused] "nombre"
else
If [focused] === "nombre"
setvar [focused] "apellido"
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
hola a todos , hay alguna forma de pasar cambiar el tabulador por el enter , me falla el metodo que he hecho con el keydown
en la subroutina he puesto esto y al principio me funciona pero cuando he pasado varias veces por todas las lineas empieza a saltarme de tres en tres en el focus , el focus lo almaceno en esta la variable [focused]
If [keynumber] == 13
FocusObject "[focused]"
If [focused] === "apellido"
SetVar [focused] "domicilio"
else
If [focused] === "domicilio"
setvar [focused] "localidad"
else
If [focused] === "localidad"
setvar [focused] "provincia"
else
If [focused] === "provincia"
setvar [focused] "codigopostal"
else
If [focused] === "codigopostal"
setvar [focused] "dni"
else
If [focused] === "dni"
setvar [focused] "sexo"
else
If [focused] === "sexo"
setvar [focused] "telefono"
else
If [focused] === "telefono"
setvar [focused] "movil"
else
If [focused] === "movil"
setvar [focused] "whatsapp"
else
If [focused] === "whatsapp"
setvar [focused] "profesion"
else
If [focused] === "profesion"
setvar [focused] "fnacimiento"
else
If [focused] === "fnacimiento"
setvar [focused] "email"
else
If [focused] === "email"
setvar [focused] "observaciones"
else
If [focused] === "observaciones"
setvar [focused] "nombre"
else
If [focused] === "nombre"
setvar [focused] "apellido"
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
Quote from Gaev on May 3, 2020, 10:00 pm@juancarlos
Try and replace the set of nested If/EndIf commands with this ...
SetVar "[currentFocusedList]" "apellido,domicilio,localidad,provincia,codigopostal,dni" SetVar "[nextFocusedList]" "domicilio,localidad,provincia,codigopostal,dni,sexo" StrParse "[currentFocusedList]" "," "[currentFocusedArray]" StrParse "[nextFocusedList]" "," "[nextFocusedArray]" ArrayLen [currentFocusedArray] [arrayLen] Math "[arrayLen]-1" "0" "[arrayMax]" Loop 0 [arrayMax] [thisCount] If "[currentFocusedArray([thisCount])]" "=" "[focused]" SetVar "[focused]" "[nextFocusedArray([thisCount])]" ExitLoop Endif EndLoop AlertBox "Focused" "[focused]" ""... I was too lazy to setup all the object names, but you get the idea :-)
Try and replace the set of nested If/EndIf commands with this ...
SetVar "[currentFocusedList]" "apellido,domicilio,localidad,provincia,codigopostal,dni" SetVar "[nextFocusedList]" "domicilio,localidad,provincia,codigopostal,dni,sexo" StrParse "[currentFocusedList]" "," "[currentFocusedArray]" StrParse "[nextFocusedList]" "," "[nextFocusedArray]" ArrayLen [currentFocusedArray] [arrayLen] Math "[arrayLen]-1" "0" "[arrayMax]" Loop 0 [arrayMax] [thisCount] If "[currentFocusedArray([thisCount])]" "=" "[focused]" SetVar "[focused]" "[nextFocusedArray([thisCount])]" ExitLoop Endif EndLoop AlertBox "Focused" "[focused]" ""
... I was too lazy to setup all the object names, but you get the idea :-)
Quote from juancarlos on May 4, 2020, 3:10 amgracias
tambien he probado esto y funciona utilzo getobjectfocus para cuando cambio de texto los nombre del text imput tienen en mismo nombre con diferente numero , pero cuando hago click en cuarquier recuadro funciona pero me salta de dos en dos , hago otro click en otro recuedro y salta de tres en tres , es decir que el primer getobjectfocus el enter va de uno en uno el segundo click el enter de dos en dos y asi consecutivo .
If [keynumber] == 13
StrDel "[focused]" 0 8 [focu]
If [focu] >= "26"
SetVar [focu] 10
endif
Math "[focu]+1" 0 [focu]
SetVar [focuse] "clientes[focu]"
FocusObject "[focuse]"
setvar [focused] [focuse]
endif
setvar [getfocus] "activo" //para que en memoria haya solo un keydown ejecutandose
gracias
tambien he probado esto y funciona utilzo getobjectfocus para cuando cambio de texto los nombre del text imput tienen en mismo nombre con diferente numero , pero cuando hago click en cuarquier recuadro funciona pero me salta de dos en dos , hago otro click en otro recuedro y salta de tres en tres , es decir que el primer getobjectfocus el enter va de uno en uno el segundo click el enter de dos en dos y asi consecutivo .
If [keynumber] == 13
StrDel "[focused]" 0 8 [focu]
If [focu] >= "26"
SetVar [focu] 10
endif
Math "[focu]+1" 0 [focu]
SetVar [focuse] "clientes[focu]"
FocusObject "[focuse]"
setvar [focused] [focuse]
endif
setvar [getfocus] "activo" //para que en memoria haya solo un keydown ejecutandose