User User name Password  
   
Monday 11.5.2026 / 07:53
Search AfterDawn Forums:        In English   Suomeksi   På svenska
afterdawn.com > forums > general discussion > all other topics > program design help
Show topics
 
Forums
Forums
program design help
  Jump to:
 
Posted Message
bizkit101
Junior Member
_
4. June 2009 @ 17:40 _ Link to this message    Send private message to this user   
Hello everyone,
I need to know some information i want to know how to do something in VBScript (computer not internet), batch, and javascript.
I want to know how to make a program that reads from a text file that says yes or no and if it says no it will do something and if it says yes it will do something else I will update the text file to say either yes or no but I do not know how to make the program. Specifically if it says no i want it to say something along the lines of: that is not available today. If it says yes I want it to open something.

hihi
Member

8 product reviews
_
13. June 2009 @ 02:54 _ Link to this message    Send private message to this user   
What you're going to need to do is lookup a tutorial for using INI in Visaul Basic.

Once you know how to create an INI file and teach your program to acknowledge it, the rest pretty much comes down to IF commands.

For a very loose example, your code might read something like:


If INI.Line1 = "No" then label1.caption = "That isn't available right now" Else newwindow.visible = true

If INI.Line1 = "No" then label1.caption = "That isn't available right now" Else newwindow.visible = true

INI files are usually very straight forward seeing as most are made using Notepad anyway. You can make Visual Basic programs that read from basic TXT files as well, but I find that certain platforms of Visual Basic (such as .NET) can sometimes overcomplicate things by being rather picky about encoding, word wrap, special characters, ect. That's not to say these problems don't exist in INI usage as well, but so far, I've been lucky enough to avoid them.


bizkit101
Junior Member
_
29. June 2009 @ 18:15 _ Link to this message    Send private message to this user   
Okay I understand most of it but first that is an exaple of the code right and second what is the label1.caption for is that what it is going to write or alert because I want it to alert

hihi
Advertisement
_
__
 
_
Member

8 product reviews
_
29. June 2009 @ 20:17 _ Link to this message    Send private message to this user   
That's not exactly an example script because I don't remember exactly what the command in Basic is to read from an INI, but it serves the purpose of showing you your base layout.

Yes, the label captions are going to be label fields within your program that will display the alert "That isn't available right now".

In order to make the command work, however, you'll need to adjust the script to where your label field (let's say you named it "Alert") is named in the script properly (example: alert.caption = "blahblahblah")



afterdawn.com > forums > general discussion > all other topics > program design help
 

Digital video: AfterDawn.com | AfterDawn Forums
Music: MP3Lizard.com
Gaming: Blasteroids.com | Blasteroids Forums | Compare game prices
Software: Software downloads
Blogs: User profile pages
RSS feeds: AfterDawn.com News | Software updates | AfterDawn Forums
International: AfterDawn in Finnish | AfterDawn in Swedish | AfterDawn in Norwegian | download.fi
Navigate: Search | Site map
About us: About AfterDawn Ltd | Advertise on our sites | Rules, Restrictions, Legal disclaimer & Privacy policy
Contact us: Send feedback | Contact our media sales team
 
  © 1999-2026 by AfterDawn Ltd.

  IDG TechNetwork