forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


read a txt file

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
michaelmcstay
Newbie


Joined: 16 Oct 2005
Posts: 6
Location: UT

PostPosted: Sun Oct 16, 2005 4:57 pm    Post subject: read a txt file Reply with quote

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
View user's profile Send private message Visit poster's website
SnarlingSheep
Professional Member
Professional Member


Joined: 13 Mar 2001
Posts: 759
Location: Michigan

PostPosted: Sun Oct 16, 2005 5:20 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
michaelmcstay
Newbie


Joined: 16 Oct 2005
Posts: 6
Location: UT

PostPosted: Sun Oct 16, 2005 5:35 pm    Post subject: Reply with quote

thank you very much that is what i was trying to do Very Happy
Back to top
View user's profile Send private message Visit poster's website
vtol
Valued Contributor
Valued Contributor


Joined: 05 Feb 2004
Posts: 656
Location: Eastern Indiana

PostPosted: Mon Oct 17, 2005 9:33 am    Post subject: Reply with quote

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 Wink I'm gonna fix that someday Laughing
But everything else is ok..
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group