Page Index Toggle Pages: 1 [2]  Send Topic Send Topic Print Print
Very Hot Topic (More than 25 Replies) Hyperlink Fields? (Read 49472 times)
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Hyperlink Fields?
Reply #15 - Feb 2nd, 2005 at 5:20pm
Print Post Print Post  
Good solution Ray......

I like the idea of calling the document and using the built in "Open With" tools.  Makes it shorter.

(Spencer: I told you I was missing some "s) Grin
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Hyperlink Fields?
Reply #16 - Feb 2nd, 2005 at 5:40pm
Print Post Print Post  
Another untested thought....
Make this into a generic Hyperlink by adding vDestination ?
Make this into a SubRoutine: Hyperlink(vDestination)
SubRoutine results in something like:

Code
Select All
var vDestination as String
var vAppfailure as Int

vAppfailure = @asynchshell(@chr(34) + vDestination + @chr(34))

If vAppfailure <> 0 Then
{
 @Msg("Couldn't open application")
} 



Anwhere you want a hyperlink just enter the destination as on field exit programming:
Code
Select All
vDestination = value in current field.
GoSub Hyperlink() 



By using the system's "Open With", you should be able to make vDestination any file name, like C:\MyPath\myfile.doc to open up that document in Word. 

Sorry , no time now for correct, clean code.  Just an instant idea.  Busy working on real stuff right now.  Just another untested concept for Ray to clean up with correct punctuation, sub routine header/end, etc. 



  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Hyperlink Fields?
Reply #17 - Feb 2nd, 2005 at 6:01pm
Print Post Print Post  
Hello Bob,

You mean something like this

In Global Code
Code
Select All
Subroutine OpenFile(vFilename as String)
var vFailure as Int

vFailure = @asynchshell(vFilename)

If vFailure <> 0 Then
{
	@MsgBox("Warning Could Not Open File: " + vFilename, "","")
}
End Subroutine 



In another event
Code
Select All
OpenFile("http://zip4.usps.com/zip4/welcome.jsp") 



-Ray

Note: GoSub should never be used to do something like this. There are better, safer, more predictable, and easier ways to do this such as declaring a Subroutine or a Function. Information on these two items can be found on pages 64-68 of the Sesame Programming Manual.
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Hyperlink Fields?
Reply #18 - Feb 2nd, 2005 at 6:30pm
Print Post Print Post  
Almost there Ray.

I did use "GoSub" but I did mean make a SubRoutine....

Only difference I see is this version of OpenFile(....) is hardcoded.

What I envisioned was enter a value into a LE.  On LE enter (mouse click), call OpenFile() inserting the value of the LE into OpenFile(),    but did not want the user to bother entering " marks,  just common text for path and filename with extension.

Code at LE would be enhanced to only work if LE value is prefixed or suffixed with special character like * so that OpenFile() would only be triggered with * in LE.  Part of programming would be to remove * so it does not trigger every time field is entered.  User trained (Help tag?) to add * to front or back of string in LE to trigger OpenFile()



  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Hyperlink Fields?
Reply #19 - Feb 2nd, 2005 at 6:34pm
Print Post Print Post  
Bob,

Then you would just have to call it as
Code
Select All
OpenFile(ThisElement) 

instead of hardcoding in the value. I wrote it that way so that people could follow how it was working.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Alec
Lanticans
*****
Offline



Posts: 200
Location: Ascot, England, UK
Joined: Nov 22nd, 2002
Re: Hyperlink Fields?
Reply #20 - Feb 3rd, 2005 at 6:36pm
Print Post Print Post  
Hi Spencer --

Good to see you active on the forum. Pleased to see that Ray managed to assist you to find a good solution. He's a canny lad !

Alec
  

Alec
Back to top
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Hyperlink Fields?
Reply #21 - Feb 4th, 2005 at 3:27am
Print Post Print Post  
Quote:
He's a canny lad !

Alec


In some neighborhoods those are fighting words. Wink

  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Hyperlink Fields?
Reply #22 - Feb 6th, 2005 at 4:04pm
Print Post Print Post  
Something tells me that this problem requires the help of RAY THE REAPER. 

I received information from Incredimail on the command line parameters to use to hyperlink to e-mail.  Here's what resulted from that.

The command line parameters they provided me are getting me closer to a solution; however, I still have a problem.   At least now, I get "something" in the "to" block of the message but it has been truncated.  I have a "clue" what is probably going on.  Let me see if  I can explain it well enough to get the solution I need.

First, here is the actual programming I am using:

var n as Int 
var vRecipient as String

vRecipient = EMail Address 
n = @SHELL(@CHR(34) + "C:\Program Files\IncrediMail\bin\IncMail.exe" + @CHR(34) + " /c /n /mailto:" + vRecipient)

EMail Address is the field in my form that contains the address.  For example my record contains:  SWulwick@tampabay.rr.com

The address ("To:" block on my new e-mail) was completed as k@tampabay.rr.com

I noticed that 7 characters had been removed ... so I tried something (but not something I am happy with as a solution).  In my database I changed the address to read:  mailto:SWulwick@tampabay.rr.com 

Sure enough, the same program executed perfectly .... BUT ..... I do not like to have the "mailto:" portion appear in my e-mail address in my database.

Apparently the command line parameters they provided me is EXPECTING the e-mail address to start with "Mailto:" and is automatically "stripping the first 7 characters from the address.

Any solution?
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Hyperlink Fields?
Reply #23 - Feb 6th, 2005 at 4:14pm
Print Post Print Post  
GOOD GRIEF!

I missed a whole lot of this dialogue (even though I requested that I be notified of replies to the topic).

IN ANY EVENT, now that I see it I am most interested in the comment from Alec!!!

Alec - I had sent you an e-mail but asked that you respond because I wasn't sure I still had your correct e-mail address.  The e-mail was NOT returned but NEITHER did I get a reply from you.

I would very much appreciate your e-mailing me because there are several questions I would like to ask you ... and, in any event, I would like to "keep in touch."

PLEASE send me an e-mail (so I will have your current address) to: 

              SWULWICK@TAMPABAY.RR.COM.   

Hopefully, when I reply to you, I'll be doing it by a single click on my e-mail address hyperlink field in my Sesame database.  lol
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Hyperlink Fields?
Reply #24 - Feb 6th, 2005 at 4:15pm
Print Post Print Post  
Just out of curiosity, did you try the SendMail command that is built into SBasic?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Hyperlink Fields?
Reply #25 - Feb 6th, 2005 at 4:27pm
Print Post Print Post  
AHA!!!!!

I just learned why I missed so much of the discussion.  I neglected to notice that there was a Page 2.

Just shows to go you that you are never too old to learn (and never too old to continue making stupid oversights).  lol

And "no" (I believe it was Mark who asked):  I have NOT tried using the built in SendMail command.  The reason is that I prefer to use my Incredimail program which has a variety of backgrounds, including sound etc. etc.   I am absolutely certain that I will get this to work.

While waiting here I do have one thought that might work (as a stop-gap till, perhaps something better comes along).  I'm going to try it now and, if successful, will post the results here.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Hyperlink Fields?
Reply #26 - Feb 6th, 2005 at 4:57pm
Print Post Print Post  
BY GEORGE, I THINK I'VE GOT IT!!!!

In any event, it "woiks"

Here is my my "final" programming statement:


var n as Int 
var vRecipient as String

vRecipient = EMail Address 
n = @SHELL(@CHR(34) + "C:\Program Files\IncrediMail\bin\IncMail.exe" + @CHR(34) + " /c /n /mailto:" + "mailto:" + vRecipient)

It was my "belief" (right, wrong or otherwise) that "mailto:" was needed as a command parameter; HOWEVER, it was also being EXPECTED as the first 7 characters of the email address .... so I put it in there both ways ... and WALLA!!!!!

My logic may or may not be right, but at least it works!!!  Yippee!!

Once, again, thanks ALL for providing such incredible support.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Hyperlink Fields?
Reply #27 - Feb 6th, 2005 at 9:12pm
Print Post Print Post  
Hello Spencer (nice FL tan):

For reference, can you post the command line switches that you received for Incredimail? 

Or a link to where they can be located?

Thanks.....
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Hyperlink Fields?
Reply #28 - Feb 6th, 2005 at 10:57pm
Print Post Print Post  
Hi Bob -

The only command line switches I received from IncrediMail are the ones that I incorporated in my programming.

Actually - to be truthful - I don't even know what they mean ... but I do know that they work and that's all that mattered to me.

If you need something specific let me know, and I'll be happy to try to find out for you.

Speaking of the hyperlink field, I discovered a little "bug" in my programming.  It works flawlessly when there is an e-mail address in the "hyperlink" field.  If, however, the field is blank and I click on (or tab to) it, the @shell is still executed, leaving me at a new (To box blank) e-mail message which I don't want at all. 

To fix that, I added a "condition" to my programming.  Once again, here's the "final"  (as of now - lol) programming I am using.

var n as Int 
var vRecipient as String

If not @isblank(EMail Address) then {
vRecipient = EMail Address 
n = @SHELL(@CHR(34) + "C:\Program Files\IncrediMail\bin\IncMail.exe" + @CHR(34) + " /c /n /mailto:" + "mailto:" + vRecipient)
}
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send Topic Send Topic Print Print