Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 2:57 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Script for adding pictures
PostPosted: November 20th, 2010, 8:18 pm 
Offline
User avatar

Joined: March 12th, 2005, 10:31 pm
Posts: 140
Location: U.S.A. - Deep South
Opus: ver 7.06 - Opus Pro - Build 15130
OS: Windows XP Build 2600 Service Pack 3
System: (2) 3.2 CPUs Intel - (2) gigs ram - 3.2 tb HD
I developed a recipe book a couple of years ago, and decided it's time to add a new feature The recipe book uses an msaccess database for the information it holds. In fact there are 14 databases covering the 14 different categories it has. I want to add a way where the person using it can add a picture to it. I have searched online and found out that adding a picture (an ole object) to the database itself is not a good thing, so what I would like to do is add the picture on the page they are at, but actually have the picture kept in a separate folder and pulled up as needed by adding a script connected to a button. It would need to pull the picture and add it to the page according to the database and the record. For example: If they were in the deserts section and had just added the recipe for a Chocolate Pecan Pie, they could click on a button to add a picture of their pie by clicking on a button on that page. The picture would be stored in a sub-folder. When someone accessed that page the picture should show on that page. But it also needs to be a vector object so it can be resized to the alloted box it will be stored in, like a thumbnail (1.5 x 1.5 inches). Then when clicked on open up full sized in a new window. If someone has the ability, the time and will write the script, I will give you credit in the software, plus give you a personlized copy of the software showing your name or whoever you would give the program to such as a gift. I realize that most of you can create your own program, but I've already invested over a hundred and thirty hours in it. If you would like to see it, here's a couple of screenshots.

Image

Image

and here is a link to download it. http://planet-denn.com/cgi-bin/download ... -Setup.exe

Thanks...
Dennis

_________________
PlanetDenn.com
Lots of Fun Freeware
Image


For this message Denn has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Script for adding pictures
PostPosted: November 20th, 2010, 11:29 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Denn,

Neat Pub (from the screenshots). Curious whether this is for folks to enter and submit recipes, or is it for their own use/collection? A solution for the latter is simpler than for the first.

Quote:
But it also needs to be a vector object so it can be resized to the alloted box it will be stored in
Vector object? Doesn't sound right.

I would give users instructions to get their image sized to approx. a certain size as a first step. Or even two images, one for thumbs and one for display. However, if that's expecting too much of the target audience, then just let Opus do the work of resizing.
-- just use 'scale to fit' option for Image Object properties.
-- create one image object for thumbnail, and Opus will scale down to it.
-- create another image object for viewing size, and let it scale too. (ideally, Users will conform to basic aspect ratios)

Use could use Browse Folder (Directory?) action to let the User 'find' their image. I think at that point you can capture the path and filename. (I think it would be beneficial to have them copy their image first to a specified folder... e.g. in ProgramData or My Documents path -- you vaguely said 'a separate folder', so maybe you're planning that)

Quote:
the ability, the time and will write the script
You can do it easily.
Look-up the SetImage() function for Image Objects, or alternatively the GetAppearance() function when used as a backdrop image on Graphic objects. You will need to experiment with single '\' or double '\\' in the stored values for path to the sub-folder you mentioned. I would label that Button 'Change' to allow either adding-new or changing-an-existing-image. (a more sophisticated way would be to have the Button Label be a variable -- if filename IS NULL in DB (i.e., "" in Opus), var = "Add" else "Change").

Sidenote: curious keyboard layout.

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Script for adding pictures
PostPosted: November 20th, 2010, 11:58 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
More from searching forum a bit:

viewtopic.php?f=4&t=4207]&hilit=user+file
Sandyn:
Quote:
if you display an image in Opus, the image name can be a variable, so rather than entering the absolute file reference, you can enter a variable by enclosing the variable name in LT/GT brackets e.g. <TheVariable>, then it is relatively easy to pull in the file reference from the access database and save it to 'TheVariable'


viewtopic.php?f=6&t=2549]&hilit=user+image
Opuslover:
Quote:
Is it possible to insert image into a database like access and display them ?


viewtopic.php?f=6&t=2727&hilit=user+image
Opuslover:
Quote:
Is there a way to copyFile from D1 to D2 and put D2 in a variable?
May be something of value here.

search for others...

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : Denn, mackavi


Top
 Profile  
 
 Post subject: Re: Script for adding pictures
PostPosted: November 21st, 2010, 5:03 pm 
Offline
User avatar

Joined: March 12th, 2005, 10:31 pm
Posts: 140
Location: U.S.A. - Deep South
Opus: ver 7.06 - Opus Pro - Build 15130
OS: Windows XP Build 2600 Service Pack 3
System: (2) 3.2 CPUs Intel - (2) gigs ram - 3.2 tb HD
Lar_123 wrote:
Denn,

Neat Pub (from the screenshots). Curious whether this is for folks to enter and submit recipes, or is it for their own use/collection? A solution for the latter is simpler than for the first.

Thanks for your comments Lar,
It comes with many recipes and the person who gets it can add as many recipes as they want. It's intended to be their recipe book from now on.


Quote:
But it also needs to be a vector object so it can be resized to the alloted box it will be stored in
Vector object? Doesn't sound right.

I would give users instructions to get their image sized to approx. a certain size as a first step. Or even two images, one for thumbs and one for display. However, if that's expecting too much of the target audience, then just let Opus do the work of resizing.
-- just use 'scale to fit' option for Image Object properties.
-- create one image object for thumbnail, and Opus will scale down to it.
-- create another image object for viewing size, and let it scale too. (ideally, Users will conform to basic aspect ratios)

Use could use Browse Folder (Directory?) action to let the User 'find' their image. I think at that point you can capture the path and filename. (I think it would be beneficial to have them copy their image first to a specified folder... e.g. in ProgramData or My Documents path -- you vaguely said 'a separate folder', so maybe you're planning that)

I am hoping that it can be done in the simplest way for the user. It's for cookers and bakers. I'm expecting that many who use it will not be real savvy using computers. I try to make things as simple as possible for the users of my creations, and always give them a button to take care of something.

Quote:
the ability, the time and will write the script
You can do it easily.
Look-up the SetImage() function for Image Objects, or alternatively the GetAppearance() function when used as a backdrop image on Graphic objects. You will need to experiment with single '\' or double '\\' in the stored values for path to the sub-folder you mentioned. I would label that Button 'Change' to allow either adding-new or changing-an-existing-image. (a more sophisticated way would be to have the Button Label be a variable -- if filename IS NULL in DB (i.e., "" in Opus), var = "Add" else "Change").

My forte is graphic art. It has been a challenge to learn all that I now know with Opus, which is why I asked if someone could quickly do it for being noted in the software. I give most of my software away, so I don't make any money off it. However, I could be wrong and find out that the scripting would take a long time. Not knowing, I presume it would be a very quick thing. I have a problem keeping up with what I already know. I'm an IT manager, graphic artist, multimedia designer, website designer, webmaster, user interface specification analyst, video editor, and writer. I'm also 62 and don't see myself learning a new computer language such as scripting. I'm retired and living off SS and working part time. If I had the money I would certainly offer to pay for the script.

Sidenote: curious keyboard layout.

Not sure what you mean by that question. I should have also put a link to this screenshot. A recipe book should be able to either print out a recipe or be able to easly read it from the screen... http://planet-denn.com/art/ScreenShots/ ... -Print.jpg



BTW: If I wind up doing this on my own, I do appreciate the use of your knowledge and pointing me in the right direction with your suggestions above. Thank you!

_________________
PlanetDenn.com
Lots of Fun Freeware
Image


For this message Denn has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Script for adding pictures
PostPosted: November 21st, 2010, 5:23 pm 
Offline
User avatar

Joined: March 12th, 2005, 10:31 pm
Posts: 140
Location: U.S.A. - Deep South
Opus: ver 7.06 - Opus Pro - Build 15130
OS: Windows XP Build 2600 Service Pack 3
System: (2) 3.2 CPUs Intel - (2) gigs ram - 3.2 tb HD
Lar_123,

Once again thanks for your help. I went to the links you provided and saw where Mackavi had an .imp helping with this. I don't know if you, Mackavi and others really know how much you are appreciated, but you really are. I can actually do a lot with opus, but would not be where I am today without the support of people like you and Mackavi. However, I still don't see me ever learning to be efficient in scripting. I'll let you know how it comes out.

Thanks
Dennis

_________________
PlanetDenn.com
Lots of Fun Freeware
Image


For this message Denn has been thanked by : mackavi


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 42 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group