Jump to content
Sign in to follow this  
Aassdd

Help using a txt file to launch websites/programs

Recommended Posts

Aassdd

Here is my source:

$input = InputBox("", "website:")
If $input = ("google") Then ShellExecute("http://www.google.com/")
If $input = ("yahoo") Then ShellExecute("http://www.yahoo.com/")
If $input = ("autoit") Then ShellExecute("http://www.autoitscript.com/")

How can I have a text file like:

google=www.google.com
yahoo=www.yahoo.com
autoit=www.autoitscript.com

and search if a string exists in the text file and then ShellExecute the text/variable after "="?

Edited by Aassdd

Share this post


Link to post
Share on other sites
Swift

Why exactly do you need a txt file? I dont see a problem...? Elaborate More.

Share this post


Link to post
Share on other sites
Kerros

an ini file is in that format


Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

Share this post


Link to post
Share on other sites
Aassdd

Why exactly do you need a txt file? I dont see a problem...? Elaborate More.

Because I want to sort websites/programs/files in different txt files (or ini, whatever) so they are not included in my source.

EDIT: Plus, I can add shortcuts easy and without editing the script.

Edited by Aassdd

Share this post


Link to post
Share on other sites
botanic

read the ini help file commands

I would say use the IniReadSectionNames command but thats just a personal preference

Share this post


Link to post
Share on other sites
LIMITER

Take a look at (in the help-file):

IniWriteSection

IniReadSection

or

IniWrite

IniRead

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.