
Quote from joferar333 on May 30, 2022, 11:51 pm@asleycruz, @gaev,@vadim,@luishp
ESPAÑOL
Tengo un problema y no puedo encontrar la solucion.
Leo un archivo de texto que contiene un listado de nombres, lo asigno a un listado....
Cuando selecciono un nombre de ese listado toma la variable y a partir de ahi la accion es ir a buscar un archivo de texto cuyo nombre es la variable seleccionada
lee linea por linea y asigna el valor de cada linea a una variable que se usa en un formulario...
HASTA AQUI PERFECTO.....
el problema es que una vez que hace esto necesito que del listado y del archivo de origen que genera el listado se borre ese nombre
He probado con los ejemplos pero al intentar hacerlo busca eliminar un numero de linea de esa lista no el nombre...
no puedo lograr que borre y elimine el nombre del archivo. ALGUNA IDEA?
. LEE EL ARCHIVO Y ARMA LA LISTA Fileread "[pubdir]pendientes.txt" "all" "[pendientes]" .LA VARIABLE PENDIENTES arma el listado de la lista1 (LA VARIABLE DE SELECCION ES [titular] . Toma la variable de seleccion y lee el archivo en cada linea y le asigna una variable FileRead "[pubdir][titular].txt" "1" "[titular]" FileRead "[pubdir][titular].txt" "2" "[domicilio]" FileRead "[pubdir][titular].txt" "3" "[telefono]" FileRead "[pubdir][titular].txt" "4" "[email]" Ahora aca es lo que se me complico .Debo eliminar del archivo inicial pendientes.txt ---- el nombre de la lista [titular] y debo eliminar de la lista1 el elemento [titular] -------------------------------------------------------Alguna idea?
ENGLISH
I have a problem and I can't find the solution.
I read a text file that contains a list of names, I assign it to a list ...
When I select a name of that list, take the variable and from there the action is to go find a text file whose name is the selected variable
Read line by line and assign the value of each line to a variable that is used in a form ...
Until here perfect .....The problem is that once I do this I need that of the list and the archive of origin that generates the list that name is erased
I have tried the examples but when trying to do so, seek to delete a line number of that list not the name ...
I can't get to delete and delete the name of the file. ANY IDEAS?. Read the file and assemble the list
Fileread "[pubdir] pending.txt" "all" "[pending]"The pending variable assembles the list of the list1 (the selection variable is [title]
. Take the selection variable and read the file on each line and assign a variable
Fileread "[pubdir] [title] .txt" "1" "[headline]"
Fileread "[pubdir] [title] .txt" "2" "[address]"
Fileread "[pubdir] [title] .txt" "3" "[telephone]"
Fileread "[pubdir] [title] .txt" "4" "[email]"Now here is what I complicate
Do eliminate from the initial file pending.txt ---- the name of the list [title]
and I must eliminate the element [title] from the list1tHANKS!!!
@asleycruz, @gaev,@vadim,@luishp
ESPAÑOL
Tengo un problema y no puedo encontrar la solucion.
Leo un archivo de texto que contiene un listado de nombres, lo asigno a un listado....
Cuando selecciono un nombre de ese listado toma la variable y a partir de ahi la accion es ir a buscar un archivo de texto cuyo nombre es la variable seleccionada
lee linea por linea y asigna el valor de cada linea a una variable que se usa en un formulario...
HASTA AQUI PERFECTO.....
el problema es que una vez que hace esto necesito que del listado y del archivo de origen que genera el listado se borre ese nombre
He probado con los ejemplos pero al intentar hacerlo busca eliminar un numero de linea de esa lista no el nombre...
no puedo lograr que borre y elimine el nombre del archivo. ALGUNA IDEA?
. LEE EL ARCHIVO Y ARMA LA LISTA Fileread "[pubdir]pendientes.txt" "all" "[pendientes]" .LA VARIABLE PENDIENTES arma el listado de la lista1 (LA VARIABLE DE SELECCION ES [titular] . Toma la variable de seleccion y lee el archivo en cada linea y le asigna una variable FileRead "[pubdir][titular].txt" "1" "[titular]" FileRead "[pubdir][titular].txt" "2" "[domicilio]" FileRead "[pubdir][titular].txt" "3" "[telefono]" FileRead "[pubdir][titular].txt" "4" "[email]" Ahora aca es lo que se me complico .Debo eliminar del archivo inicial pendientes.txt ---- el nombre de la lista [titular] y debo eliminar de la lista1 el elemento [titular] -------------------------------------------------------
Alguna idea?
ENGLISH
I have a problem and I can't find the solution.
I read a text file that contains a list of names, I assign it to a list ...
When I select a name of that list, take the variable and from there the action is to go find a text file whose name is the selected variable
Read line by line and assign the value of each line to a variable that is used in a form ...
Until here perfect .....
The problem is that once I do this I need that of the list and the archive of origin that generates the list that name is erased
I have tried the examples but when trying to do so, seek to delete a line number of that list not the name ...
I can't get to delete and delete the name of the file. ANY IDEAS?
. Read the file and assemble the list
Fileread "[pubdir] pending.txt" "all" "[pending]"
The pending variable assembles the list of the list1 (the selection variable is [title]
. Take the selection variable and read the file on each line and assign a variable
Fileread "[pubdir] [title] .txt" "1" "[headline]"
Fileread "[pubdir] [title] .txt" "2" "[address]"
Fileread "[pubdir] [title] .txt" "3" "[telephone]"
Fileread "[pubdir] [title] .txt" "4" "[email]"
Now here is what I complicate
Do eliminate from the initial file pending.txt ---- the name of the list [title]
and I must eliminate the element [title] from the list1
tHANKS!!!
Quote from Gaev on May 31, 2022, 3:15 am@joferar333
Assuming that you have configured your ListBox such that Variable contains Item Text, take a look at these commands
ListBoxFindItem - will give you the Item Number matching the selected Item Text
ListBoxDeleteItem - will delete the item associated with the specified number... for more details, check out the Help info here ...
https://winhelp.visualneo.com/Objects.html#LISTBOXFINDITEM
Assuming that you have configured your ListBox such that Variable contains Item Text, take a look at these commands
ListBoxFindItem - will give you the Item Number matching the selected Item Text
ListBoxDeleteItem - will delete the item associated with the specified number
... for more details, check out the Help info here ...