Sign in to follow this  
Followers 0
Aassdd

Help using a txt file to launch websites/programs

7 posts in this topic

#1 ·  Posted (edited)

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



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

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

#4 ·  Posted (edited)

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

Anyone?

Share this post


Link to post
Share on other sites

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

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  
Followers 0