Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

how to transform a text in code?

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-30-2008, 12:25 AM
Newbie
 
Join Date: Sep 2008
Posts: 5
Default how to transform a text in code?

-----( this application writes the name of the directory that should be done to find)-----------------------

Table2.AddCol(cString,"Column1",145)
Table2.Cell("Column1",1) = "AppPath&"&Chr(34)&"\sysdata\"&Chr(34)
Table2.SaveCSV ("c:\mytable.csv", "," ,False)

________________________________

------(another application that reads the directory that should be done to find and list the files.)-------------

Table2.LoadCSV ("c:\mytable.csv", ",", false, true)
myvaluedir = Table2.Cell ("Column1",1)
FileSearch ( mylist , myvaluedir , "*.*")
_______________________________________________


The problem is that the variable "myvaluedir" is read as text, not in code.
myvaluedir is : AppPath&"\sysdata\"

the error message is:-> illegal characters in path in FileSearch

__________________________________

if I write manually
FileSearch ( mylist , AppPath&"\sysdata\" , "*.*")
at the end it displays correctly
Reply With Quote
  #2 (permalink)  
Old 09-30-2008, 01:03 AM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,463
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

You should use

Table2.Cell("Column1",1) = AppPath&"\sysdata\"

instead of

Table2.Cell("Column1",1) = "AppPath&"&Chr(34)&"\sysdata\"&Chr(34)

Best regards.
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
  #3 (permalink)  
Old 10-01-2008, 12:09 AM
Newbie
 
Join Date: Sep 2008
Posts: 5
Default Please help me

the first application this ok , he must write exactly AppPath to know that the other application is to view their own location.
if I write AppPath&"\sysdata\" he will write the directory location of the first application.
1 - the first application saves a document with information on which folder the files are. (Local or c: \ xxx)
2 - The second application is taken to another folder along with the text(CSV)
3 - the second application is open and read the text(CSV) whether it is to do a search in this folder that he, or in c: \ xxx
----------------------------------------------
the script error in the second application, which does not read the text received with code(script), he gets it right and writing:

AppPath & "\ sysData \", the more he does not run as code.
-------------
how to convert the text AppPath & "\ sysData \" from a text loaded by LoadCSV, in script executed by basic4ppc ?
Reply With Quote
  #4 (permalink)  
Old 10-02-2008, 07:39 AM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,463
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Sorry, I don't really understand the problem you still have.
So I just made a small example with the code lines of your first post that saves the csv file, reloads it and makes a Filesearch.

If this is not what you need please can you upload your code so we can see what your problem is.

Best regards.
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
  #5 (permalink)  
Old 10-02-2008, 05:12 PM
Newbie
 
Join Date: Sep 2008
Posts: 5
Default already appreciate your effort.

already appreciate your effort.

I received the file you sent, plus the only problem is:

-in file mytable.csv, can not be written -> c:\local\TableFileName\sysData\

-should be written only-> AppPath &"\sysData\"

Because I will take your application to another folder with the information already recorded.
as I explained, will always get the same folder, even if I trasporti to another location.
Reply With Quote
  #6 (permalink)  
Old 10-02-2008, 05:30 PM
Newbie
 
Join Date: Sep 2008
Posts: 5
Default files...

Config.exe Is The Application 1
Atualizar.ex Is The Application 2
Configatualiza.msc Is The (table Cvs)
Reply With Quote
  #7 (permalink)  
Old 10-03-2008, 11:17 AM
klaus's Avatar
Basic4ppc Expert
 
Join Date: Oct 2007
Location: Fully, Switzerland
Posts: 4,463
Awards Showcase
Forum Contributer Beta Tester Competition Winner 
Total Awards: 3
Default

Here you have 3 possibilities:
1) the program doesn't save the AppPath and doesn't show it either
2) the program doesn't save the AppPAth but shows it
2) you can enter for example "AppPath\system\" and the program tests if the beginning of the text is AppPath it replaces AppPath by it's value otherwise it keeps the cell content.

Best regards.
__________________
Klaus
Switzerland

Beginner's Guide / User's Guide
Reply With Quote
  #8 (permalink)  
Old 10-04-2008, 01:43 PM
Newbie
 
Join Date: Sep 2008
Posts: 5
Default Obrigado

Thank you
Obrigado
Gracias
Merci
Grazie
Danke
Спасибо
謝謝您
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to insert the generated text into code ? mozaharul Questions (Windows Mobile) 3 10-06-2008 06:42 AM
Clearing a combobox's text area in code Ricky D Questions (Windows Mobile) 6 10-02-2008 09:31 AM
Coverting text files with binary file page code functionality kolbe Code Samples & Tips 1 06-21-2008 05:06 PM
Label/Text Control text centering TWELVE Basic4ppc Wishlist 1 06-04-2008 03:20 PM
Dividing the code into text files... Cableguy Questions (Windows Mobile) 5 05-21-2007 03:21 PM


All times are GMT. The time now is 02:34 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0