Help with Script Task List
Someone could help me with this script i try to open a exist file text a display text in my rollup. this script i trying to create for a made a tasklist for management all work to do in any proyect please help
this code that i have right now
rollout edittext "Notas de Proyecto"
(
edittext txt "Notas :" fieldWidth:280 Height: 120 labelOnTop:true
button B " Abrir " pos:[190,150]
on B pressed do
(
file = getOpenFileName types:"Text File (*.txt)|*.txt|All Files (*.*)|*.*|"
if file != undefined then (
openFile file
format "%\n" txt.text to:file)
)
)
createDialog edittext 300 180
Attachment | Size |
---|---|
cuadro_abrir.ms | 427 bytes |
Comments
Thanks a lot both...hey
Thanks a lot both...hey le1setreter thanks man...is really usefull in a cupple days i post the final script...for someone who wants to...but if someone want now ...well this the final code:
thanks...again
rollout edittext "Notas de Proyecto"
(
edittext txt "Notas :" fieldWidth:280 Height: 120 labelOnTop:true
button A "Guardar" pos:[190,150]
on A pressed do
(
if txt.text == "" then MessageBox "Ingresar Notas" title:"Error"
else
file_out = GetSaveFileName types:"Text File (*.txt)|*.txt|All Files (*.*)|*.*|"
if file_out != undefined then
(file_out = createfile file_out
(format " %\n" txt.text to:file_out))
)
button B "Abrir" pos:[250,150]
on B pressed do(
local fileName = getOpenFileName types:"Text File (*.txt)|*.txt|All Files (*.*)|*.*|"
if fileName != undefined AND doesFileExist fileName do
(
local File = openfile fileName mode:"r+"
seek File #eof
local maxlen=filepos File
seek File 0
local loadedTxt = readChars File maxlen errorAtEOF:false -- changed local var to "loadedTxt " to not conflict with name of textbox name
txt.text = loadedTxt -- display loaded text into textbox
)
)
)
createDialog edittext 300 180 \
style:#(#style_titlebar, #style_border, #style_sysmenu, #style_minimizebox)
you have to display the
you have to display the parsed text into the textbox:
thanks...Insanto but i still
thanks...Insanto but i still dont see text in my rollup, try to open the text file and nothings happen...what is the problem? i dont understand what happend...
readOnly: ( local
readOnly:
if you wanna format stuff to the file use mode "r+"
Raphael Steves