Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently October 19th, 2024, 5:21 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Example for Getting Images from a Folder
PostPosted: June 20th, 2015, 12:52 am 
Offline

Joined: May 15th, 2015, 8:30 am
Posts: 59
Opus: 9.0
OS: Win 7
System: Icore 7
Hi Guys
.....well I have just wasted over 6 hours of my life looking for a solution to a simple procedure.
Hard to believe but I went thru all 41 pages of the Basic Section in this forum, searched thru the Opus Script Help file and downloaded anything that remotely looked useful...I got zilch

Can Anybody Show Me How To Do This?
1. User clicks on a Browse button to display the "Browse folder" dialog box
2. User selects a folder that contains an unknown number of images
2. User selects 1 or more images from the selected folder
3. The selected images are copied to a specific project folder.
4. The selected images are displayed as thumbnails on an Opus page

If this functionality is too complex...then
5. How can I just grab 6-8 images from a folder and display these images on a page.

A step-by-step set of instructions with sample code would be very helpful.
Be gentle, I dont know how to code, but I can modify exisitng scripts to suit my needs.

I am using Opus Version 9 (..or to be more accurate "trying to use Opus9")
Thanks
Pakapaka


For this message pakapaka has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Example for Getting Images from a Folder
PostPosted: June 20th, 2015, 5:05 am 
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
pakapaka wrote:
2. User selects 1 or more images from the selected folder

How do you think this should be done?
for example, to do this in Windows Explorer one would have to Ctrl+click on each image file.
...is that an acceptable step for your Users?

and then, once all those files are selected, Shift+Right_Click allows selecting the option to Copy Path.
...is that an acceptable User action here?

I suspect what you want done can be done, but it is not trivial. I've been able to bring up and view a list of files for a folder in DocView, but it shows the filenames by default. I have not figured out how to show Icons without manually changing the View options. So I think there are some hurdles here.

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


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


Top
 Profile  
 
 Post subject: Re: Example for Getting Images from a Folder
PostPosted: June 20th, 2015, 11:31 am 
Offline

Joined: August 21st, 2012, 5:36 pm
Posts: 20
Location: Portugal
Opus: OPUS PRO v9.6
OS: Windows 8 x64
I think the attached file you can help


You do not have the required permissions to view the files attached to this post.


For this message JATBorges has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Example for Getting Images from a Folder
PostPosted: June 20th, 2015, 12:06 pm 
Offline

Joined: May 15th, 2015, 8:30 am
Posts: 59
Opus: 9.0
OS: Win 7
System: Icore 7
hi JATBorges
The file you sent is very helpful..many thanks for this

However the image placeholder remains BLACK and does not update to show the "<stringDIR>" file.
I assume I need to use the SetImage function so I added a script after your CopyFile function.
The script I added is:

Code:
IntroGraph.SetImage(<SYSTEM_PUBLICATION_DIR>\images\stringDIR)


I got his script from the Opus Script Help file.
It was dissapointing to learn that this attempt did not work.
Can you tell me what I am doing wrong?
Thanks
Pakapaka


For this message pakapaka has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Example for Getting Images from a Folder
PostPosted: June 20th, 2015, 6:38 pm 
Offline

Joined: May 15th, 2015, 8:30 am
Posts: 59
Opus: 9.0
OS: Win 7
System: Icore 7
Hi
I used the example you sent and created a very simple example porject of what I want to do.
Click the UPDATE IMAGES button...it is pretty straight forward what I am trying to do.

Any help is apprciated.
Yours
Pakapaka


You do not have the required permissions to view the files attached to this post.


For this message pakapaka has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Example for Getting Images from a Folder
PostPosted: June 21st, 2015, 8:53 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Change the function in the example to:

Code:
function newPIC(){
tmpArray = file.split("\\");
stringDIR = tmpArray[tmpArray.length-1];
}


</mack>

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: Example for Getting Images from a Folder
PostPosted: June 21st, 2015, 10:23 am 
Offline

Joined: May 15th, 2015, 8:30 am
Posts: 59
Opus: 9.0
OS: Win 7
System: Icore 7
Hi Mack
Works like a dream on the example sent by JATBorges.
,,,I will now try to implement this on the Slideshow example I posted and let you know how I do.
Many thanks, I really appreciate your time
Yours
Martin


For this message pakapaka has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Example for Getting Images from a Folder
PostPosted: June 21st, 2015, 4:22 pm 
Offline

Joined: May 15th, 2015, 8:30 am
Posts: 59
Opus: 9.0
OS: Win 7
System: Icore 7
Hi Guys
Updated the project file...the "Copy Button" so it now gets updated with the selected image.
This is exactly the functionality I needed...so many thanks for the help.

See attached project file


Two questions
1. How can I create "multiple instances" so that I can place different images/buttons on the same page.
2. Can I set a "DEFAULT" image for the button (instead of the boring gray) when the page is displayed (before I run the CopyImage action)

Thanks
Pakapaka


You do not have the required permissions to view the files attached to this post.


For this message pakapaka has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Example for Getting Images from a Folder
PostPosted: June 21st, 2015, 5:34 pm 
Offline

Joined: August 21st, 2012, 5:36 pm
Posts: 20
Location: Portugal
Opus: OPUS PRO v9.6
OS: Windows 8 x64
I think this helps


You do not have the required permissions to view the files attached to this post.


For this message JATBorges has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Example for Getting Images from a Folder
PostPosted: June 21st, 2015, 7:34 pm 
Offline

Joined: May 15th, 2015, 8:30 am
Posts: 59
Opus: 9.0
OS: Win 7
System: Icore 7
I am speechless
I uploaded 5 images named "default1....default5" to the images directory and it works great!!
Does this mean I passed your little test for non-programmers :wink:

THANK YOU JATBorges and MACK for your invaluable help.
I know you guys are probablly very busy so I really do appreciate your time.



One yukki issue
When the Browse dialog is displayed and the user Clicks "CANCEL" an error message is displayed.
Can you get rid of it

Yours
Pakapaka


For this message pakapaka has been thanked by : mackavi


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 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