faqts : Computers : Programming : Languages : Tse : Mouse

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 4 people (50%) answered Yes
Recently 2 of 4 people (50%) answered Yes

Entry

TSE: Mouse: Macro: Link: Click: How to possibly create hyperlinks in any text document?

May 31st, 2004 15:40
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 31 May 2004 - 06:03 pm ------------------------

TSE: Mouse: Macro: Link: Click: How to possibly create hyperlinks in 
any text document?

---

This will allow you to use any of your ASCII text files similar to a
html page in your browser, that is, you can click once with your mouse
on that text links, after which some possible actions follow.

---

Steps: Overview:

 1. -Download and unpack the zip file at

      http://www.knud.info/linkclic.zip

 2. -Compile the following macros from it:

     1. gotogfmo.s

     2. runempde.s

     3. runbrpdf.s

     4. runmaclu.s

 3. -Then run the main macro
     (put it e.g. in your autoload list)

      gotogfmo.mac

 4. -If you then click with your mouse on anything like the following:

       http:// -> will start the browser with this URL

       news:// -> will start Microsoft Outlook Express as your
                  newsreader

       myemail@myprovider.com -> will start Microsoft Outlook Express
                                 with that e-mail address

       \\myserver -> will show that UNC path in your browser

       file:/// -> will load that file in your browser

       ftp:// -> will start the browser with this ftp directory

       .mac -> will start that TSE macro


---
---

For example: address database

---

Suppose you have an address database in an ASCII text file, containing
lines like the following:

---

mygirlfriend1 - mygirlfriend1@provider1.com - 
http://www.mygirlfriend1.com - met her at the Ritz 11 May 2004

mygirlfriend2 - mygirlfriend2@provider2.com - 
http://www.mygirlfriend2.com - met her at the beach 21 May 2004

...

mygirlfriendN - mygirlfriendN@providerN.com - 
http://www.mygirlfriendN.com - met her at the restaurant 23 May 2004

---

then clicking once with your mouse on e.g.
the e-mail address will open Microsoft Outlook Express to create an e-
mail
with this e-mail address,
clicking on the url will start the Internet Explorer browser with that 
url.

---
---

For example: support database

---

Suppose you have a support database in an ASCII text file, containing
information like the following, you can then (like a wizard) follow
the steps by e.g. clicking with your mouse once on the links
successively, which will execute it.

This will allow you to quickly, with a minimum effort from your side
(just one mouse click) to do such actions.

---

Steps: Overview:

      (Note: current restriction, no spaces in the filenames)

 1. -Download the latest version of program 'myproduct' at:

      http://www.mycompany.com/download/myproduct.zip

      or otherwise at

      ftp://ftp.mycompany.com/myproduct.zip

 2. -Install the program by running it from your local computer:

      file:///c:\progra~1\myproduct\myproduct.exe

     or otherwise at the local server:

      \\myserver\mydirectory\myproduct.exe

 3. -Check the latest information in the newsgroups

      news://news.myproduct.com

 4. -If you want to receive more information, send
     an e-mail to:

      mydivision@mycompany.com

 5. -You can otherwise also run the following TSE macro

      c:\temp\myproduct.mac

---
---

The idea of the program is that you determine the type of the current
word using regular expressions (e.g. for url, e-mail, UNC, news:, 
ftp:...)
in a case statement (using ELSEIF).

and if found that you get that current word at the cursor position.

You use then that word as a parameter for your application
(e.g. Internet Explorer, Outlook Express), which you launch using
StartPgm() or ShellExecute.

That you can click on it using the mouse you do by using a hook,
which reacts on events, and instructs here to go after each command to
my case procedure.

---
---

Tested successfully in TSE v4.2

(as I am using the newly defined procedure 'StartPgm()' which is 
present
from TSE v4.2 on, but
I have now also added a dll ShellExecute for earlier TSE windows 
versions,
that should possibly do the job also).

----------------------------------------------------------------------