Page Index Toggle Pages: [1] 2  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) Programming the "Image Viewer" (Read 15664 times)
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Programming the "Image Viewer"
Feb 20th, 2005 at 9:07pm
Print Post Print Post  
Is it possible to use programming to 'guide' the user to a specific folder when using the internal "Image Viewer" (image selector).

By default, the image viewer always starts the user in the default global path, but most of our photos are buried several sub-folder deep and it's time consuming to have to keep starting at the root folder for each record.

Macro's seemed to help a little, but only if going to the same set of folders each time.

Any thoughts?

Steve
  
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Programming the "Image Viewer"
Reply #1 - Feb 20th, 2005 at 10:20pm
Print Post Print Post  
Does it help to set the Image Path in the Application Property Manager Dialog box to the sub-directory you are trying to get to?
  

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


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Programming the "Image Viewer"
Reply #2 - Feb 20th, 2005 at 10:32pm
Print Post Print Post  
I don't think so. We bounce around too much among the various folders.

Our photos are stored in folder names based on data from LE's, such as Manufacturer name, so if we could pull that data from the MFGR LE and have the image viewer "jump" to that folder, it would be great.

Even, at least, if the image viewer could remember the last folder that is had open, it would be a big time saver.

However, we LOVE the fact that we can "drag" a photo from ACDSee into Sesame and use programming to 'auto-insert' the photo....VERY HANDY FEATURE! Smiley

Any other thoughts?

Steve
  
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Programming the "Image Viewer"
Reply #3 - Feb 20th, 2005 at 10:33pm
Print Post Print Post  
Maybe we should consider using programming to open ACDSee to the proper folder, then just drag the photo into Sesame.

Sounds a bit complex, but once we figure it out, it may be great!

Steve
  
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Programming the "Image Viewer"
Reply #4 - Jan 11th, 2006 at 12:53am
Print Post Print Post  
Steve -

I have been reviewing old forum messages to see what I could "pick up" and I was intrigued by this topic.  I have a few questions for you.

First, I am most interested in how you finally resolved this matter.   Did you come up with a solution you are happy with?

Second, you spoke about ACDSee and, since I don't have a clue what that is, I was wondering whether you could elaborate in general and, more specifically, with how you have integrated it with Sesame.

Quote:
However, we LOVE the fact that we can "drag" a photo from ACDSee into Sesame and use programming to 'auto-insert' the photo....VERY HANDY FEATURE! 


This too is intriquing.  I didn't know anything could be "dragged" into Sesame let alone that you could "auto-insert" the photo (although I am assuming you mean the path to the photo).  I am very eager to hear more about this.

I can tell you that I have been concerned about the path to pictures for some time.  Presently I am using separate folders for each application, so that each picture path takes me to the correct folder. 

If I want to see a picture that is not in the path I have used @ASynchShell to view the picture and alt/tab back and forth (if necessary) to Sesame.

For example I've used:
Code
Select All
var n as int

n=@asynchshell("C:\sesame\pics\middle villagers\" + Mail Name + ".jpg") 



When I click on the element containing the code, it just automatically goes to the correct path (different than the one in my application default) and shows me the picture (of the appropriate person) in Windows Picture and Fax Viewer.

Given what I think you are saying I was wondering whether I could combine this type of programming with the "drag/insert" capabilities of ACDSee, for pictures that I want to "more permanently" capture in my Sesame application.

Thanks!
  

- Spencer

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


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Programming the "Image Viewer"
Reply #5 - Jan 11th, 2006 at 1:10am
Print Post Print Post  
Spencer,

A tip I learned is to create a TEXT LE under your IMAGE LE and 'bind' the 2 LE's to the same field. This way, you can see your image, and image FILENAME directly below it. Changing either one, will change them both.

ACDsee is strictly an image viewing program with a nice "windows explorer" looking file browser. The browser has a resizable 'image preview' and once you get the program setup the way you like, you can browse your images with ease.

When I'm adding photos to Sesame (hundreds at a time) I put Sesame and Acdsee side by side in  'window mode' and drag the image from Acdsee into the Text LE in Sesame. The image then pops into the IMAGE LE in sesame and I move on to the next one. SUPER EASY Smiley

This technique is necessary for us because we don't know what the photo filenames are when we plug them into Sesame....we have to hunt for them by using the preview and file browser in Acdsee (Sesame preview is just not as efficient...but then again, Sesame was not created for this sort of thing.). If you know what your photo filenames are for each record, then you will have easier options at your disposal.

(I prefer the old, classic versions of ACDSEE becuase it is small, compact,  and fast. However, it does not seem to support .tiff images.)


Steve

ps. you can drag almost anything into sesame from an outside program. Also, get familiar with Control-C and Control-V to copy and paste from an outside program into Sesame....if your not already. Big time saver.

  
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Programming the "Image Viewer"
Reply #6 - Jan 11th, 2006 at 1:19am
Print Post Print Post  
One more thing....we use the same image path for ALL our images, however, we have hundreds of subfolders 'beneath' our image path.

If you have a good idea of the filename you want to plug in or you know roughly which folder it is in, you can use programming similar to the example here:

http://www.lantica.com/Forum2/cgi-bin/yabb/YaBB.pl?board=program;action=display;...

In my case, it 'popups' a list of all the files stored in a particular folder so the user can just click on the want they want to plug in (no preview, unfortunately.) Once the user plugs in an image, you can have the image name removed from that list so the user doesnt have to browse past it again, if you want.

Steve
  
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Programming the "Image Viewer"
Reply #7 - Jan 11th, 2006 at 1:39am
Print Post Print Post  
Steve -

That text LE bound to the Image LE is really neat.  I just tried it.

I was right about dragging though.  You can't drap a picture into an image element but you CAN (as I now see) drag the picture into the text element and it will give you the path.  As you said the path then shows the correct picture.  Thanks!  That's a neat thing to know.

Unfortunately, a "full" path will not "override" the default path so the path to your picture and the default path set for your application still have to be in synch.  I guess that's the issue you were raising in the first place and it would certainly be nice if that could be changed ... so that you could have either/or.

  

- Spencer

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



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Programming the "Image Viewer"
Reply #8 - Jan 11th, 2006 at 3:30am
Print Post Print Post  
Quote:
...drag the image from Acdsee into the Text LE in Sesame.

Very cool. 8)

I did not know that either.

Something I found though, is I don't need another program to preview the images. I simply have my folder options to display "Thumbnails", and drag the thumbnail into a Sesame text LE.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Programming the "Image Viewer"
Reply #9 - Jan 11th, 2006 at 3:41am
Print Post Print Post  
Quote:
Unfortunately, a "full" path will not "override" the default path so the path to your picture and the default path set for your application still have to be in synch.  I guess that's the issue you were raising in the first place and it would certainly be nice if that could be changed ... so that you could have either/or.

Spencer,

You should be able to use programming in the On Element Exit event, to remove the path that is carried into the text LE when you drag a file in from another program (or thumbnail).

In other words "C:\Sesame\Pics\PICT0157.JPG" should be able to be parsed down by locating the last backslash, leaving just the filename, or inserting some other partial path in front of the filename.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Programming the "Image Viewer"
Reply #10 - Jan 11th, 2006 at 3:49am
Print Post Print Post  
Hi Carl -

I appreciate the input and I realize that; however, that is not my concern.  

My concern is when a picture is in a path OTHER THAN the default path.  I would like the ability to "over-ride" the default path, by entering the FULL path to where the picture is.

Hope that's clear.

  

- Spencer

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


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: Programming the "Image Viewer"
Reply #11 - Jan 11th, 2006 at 3:58am
Print Post Print Post  
Spencer,

Have you tried using NO default path and let form programming supply a path when necessary? This, combined with Carl's suggestion would give you complete freedom to pull photos from anywhere.....but would require more programming on your part.

Steve
  
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Programming the "Image Viewer"
Reply #12 - Jan 11th, 2006 at 4:03am
Print Post Print Post  
Quote:
Hope that's clear.

Oh, yes, I see what you mean.

Well, in case anyone else that is following this thread, wants to drag thumbnails into a Sesame app that has the default image path set to the location where the images actually are located, here is the code to strip the path, leaving just the filename.

Code
Select All
var vStr as string = ThisElement
var vPos as int

if @Instr(vStr, "\") > 0
      {
      vStr = @Repllas(vStr, "\", "^")
      vPos = @Instr(vStr, "^")
      vStr = @Mid(vStr, vPos + 1, 100)
      ThisElement = vStr
      }
 

  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Programming the "Image Viewer"
Reply #13 - Jan 11th, 2006 at 7:04am
Print Post Print Post  
Steve

I haven't tried omitting the default path and - when I finish with @sendmail, I will probably give it a shot.

I've gotten accustomed to having the path to a specific folder for each application and for the main part - for my purposes - that works pretty well.  Nevertheless I do have pics in other places and would like to use them when I desire without having to move them to a specific folder.

As I said, I shall play with it at some point and see what happens.

Thanks for all the feedback guys; I love the "discussion" and hope it continues.    Cheesy
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
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: Programming the "Image Viewer"
Reply #14 - Jan 11th, 2006 at 3:28pm
Print Post Print Post  
Spencer,

You can use those images, that are in a directory other than your default image path, in the current version of Sesame. All you need to do is give Sesame the path from your default image path to that image. Let me explain. Let's assume you are using the deafult image path of C:\Sesame\Pics but you want to display an image that is on your C drive which is C:\MyPicture.jpg. What you need to have in your image field is ..\..\MyPicture.jpg

The first ..\ tells Sesame to look in the C:\Sesame directory and the second ..\ tells Sesame to look in C:\

With a little bit of programming you can have Sesame parse the complete path of C:\MyPicture.jpg into the relative path of ..\..\MyPicture.jpg  I'll give you a hint @ImagePath() on page 179 can tell you what your default image path is and how far down you have to go to get a relative path.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send Topic Send Topic Print Print