| View previous topic :: View next topic |
| Author |
Message |
michaelmcstay Newbie
Joined: 16 Oct 2005 Posts: 6 Location: UT
|
Posted: Sun Oct 16, 2005 4:57 pm Post subject: read a txt file |
|
|
Hi all
i'm trying to read a txt file and put the results into a msgbox
not having very much luck can this be done ?
thank you
Michael |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Sun Oct 16, 2005 5:20 pm Post subject: |
|
|
Here's a quick, easy way to get you started:
| Code: |
REM Change this to the file you want to load:
%%file = C:\file.txt
REM Load a file's contents into list 1
list create,1
list loadfile,1,%%file
REM Show the file's contents in a message box
info @text(1)
exit
|
_________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
michaelmcstay Newbie
Joined: 16 Oct 2005 Posts: 6 Location: UT
|
Posted: Sun Oct 16, 2005 5:35 pm Post subject: |
|
|
thank you very much that is what i was trying to do  |
|
| Back to top |
|
 |
vtol Valued Contributor


Joined: 05 Feb 2004 Posts: 656 Location: Eastern Indiana
|
Posted: Mon Oct 17, 2005 9:33 am Post subject: |
|
|
Heres another way too using part of sheeps code:
| Code: | rem Change this to the file you want to load:
%%file = C:\file.txt
rem Load a file's contents into list 1
list create,1
list loadfile,1,%%file
rem Show the file's contents in a message box
IF @EQUAL(@MSGBOX(File Contents":"@CR()@TEXT(1),File Text Contents,$000),1)
END |
Heres a link of a thing I drew up for MSGBOX help:
http://www.vtol.wtcsites.com/VDS5/forum-pics/Messagebox.gif
http://www.vdsworld.com/forum/viewtopic.php?t=3153
The ICON section has a numbering error, the 1 should be 0 - etc.. no biggy I'm gonna fix that someday
But everything else is ok.. |
|
| Back to top |
|
 |
|