Jump to content
WnSoft Forums

Any way to read input from a text file?


deia

Recommended Posts

Just found the program and it rocks- absolutely love it. Being the lazy sort that I am, I'd like to find a way to automate the process of image selection for my clients. Is there any easy way to let the client click a button/link and capture a list of images from the slideshow to purchase?

I can't be sure that they'll be online, so anything like a button action that opens my web page won't cover all the bases. Even something "klugey" like dumping the file name to a text file that they have to send to me would be fine. It's not too much effort to write down a file name, but others are lazy too and the easier it is to order, the more they do. I usually send out hundreds of proofs per slideshow. I have some programming experience, but am not a Windows programmer (Oracle, some PHP, Perl...).

Any ideas on this one would be most welcome.

-d

Link to comment
Share on other sites

Your question raises another one, deia. One thing that has given me problems with this sort of task is that I can't figure out any valid parameter passing syntax to put in an object editor action for "Run application or open file". Does anyone at Wnsoft or the forum know of a valid syntax for parameters after the application name in clickable object "open" actions?

If you could pass parameters in "open" actions you could use an external utility to build your photo list, where there is a button in each picture that has a unique parameter, the picture name:

Run app or open file action defined as "Buildlist.exe photo1234"

In the example, "buildlist.exe" is a utility that you place in the same folder as the show. It creates and appends to a listing file somewhere. This idea may lead to a solution if parameters can be passed.

Igor - is there a way? Thanks!

Link to comment
Share on other sites

well you can open the pte file with a text editor and copy the picture names out -- then put them on the cd as a text file or send it to them

or

project options/comments/

enable the set commnets for all slides to "picture name"

is this what you are looking for??

ken

Link to comment
Share on other sites

Hi Ken - I think deia is looking for something that customers can do with a click while watching show. I have found something that many may find useful, but it doesn't solve deia's need (unless she likes making tons of custom .EXEs, one per pic!):

To all who may want to pass parameters through P2E "Run or open" actions - I have found an alternative! It is not by having a special syntax in PTE. Instead it is by additional custom .EXE files created by a fantastic freeware application called AutoIt (that's the word Auto and the word It, no spaces). This opens the door to utility calls and even coding utilities themselves. For anyone not afraid of scripts, even if you don't already know any scripting language, go to this link:

Click for freeware "AutoIt" web page

Here is a sample (.AUT) input file that is converted into a .EXE by AutoIt to do an application call with parameter passed. This is something I wanted to try when Granot and I were working on his volume control utility:

; Script - Increase volume

Run,C:\setvol.exe +5

AutoIt turns this into a custom standalone .EXE file, essentially a small application that I just wrote. What it does is to run the application "setvol.exe" from drive C:\, with parameter "+5" to increase sound volume by +5%.

Unfortunately this doesn't solve deia's need, but it is very useful and worth sharing :)

Link to comment
Share on other sites

Hmmm - I see the Invision forum software is sensitive to the character sequence "backslash-backslash"! It wiped out the second, consecutive backslash character in my sample script. The script example I gave should have two backslash characters, not one. I will put spaces between the backslash characters to see if it displays correctly in this forum reply retried:

; Script - Increase volume

Run,C: \ \ setvol.exe +5

Link to comment
Share on other sites

Thanks for the replies and making sense out of my post. Seems I started in one spot (text input) and ended up in another- automating the "keeper list". This happens to me sometimes in convesation, so it's not surprising to find it leaking into text as well...

This is exactlywhat I'm looking for- a button to click that adds the picture to a "save" or "order" list. The AutoIt utility will work great, less the volume aspect- how does one copy and paste info for a 432 picture show into Object Editor windows in a timely fashion? I can easily spit out a text file with 432 lines of "photo_id, image name, app-to-run-name, etc" but need some type of mapping mechanism to the photos in the show. In the database world, all vendors specifies a control file that spells out the mapping from text column to database table and allows loading of csv or other delimitted text. I guess what I'm asking is there an API for this program?

I realize that this is a more commerical oriented request and likely misses the sweet spot of your target demographic, in other words, I'm not holding my breath 'til this functionality arrives and understand if it's not feasible. You've already helped generate more business for me with virtually no effort- a thousand thanks. People will tolerate terrbile quality, so long as it's free- my scaled down, intentionally-nearly distorted images, were being "web proofed" and some people were printing instead of ordering, which also had the lovely side effect of other people seeing my work in 17k JPEG Inkjet (cringe). Thanks for the clipboard blocking.

Hope this helps clarify things a bit and thanks so much for the quick response.

Link to comment
Share on other sites

Deia, it looks like the forum is on the right track. I don't know if there is an API for PTE. Igor will have to answer that question.

In the absence of an API, and since you clearly have the skills to create a custom production process, you could try the following (long description with lots of ideas - looks viable to me):

Create a max-sized show that is a template, with e.g. 500 pictures that each have unique button(s) such as "save" and "order". These buttons can be created in just one slide and designed to look nice with transparent GIF or whatever you please. Then in PTE's GUI copy the master slide and paste it 499 times. Now you will have 500 identical slides, each with object editor action=open buttons already created and placed. You can save the .PTE file and use it as a template starting point for post-processing. I suggest doing a one-time script or macro edit to replace identical button def's and identical photo image file name with sequentially numbered .EXE targets and photo name placeholders, resp. The .EXE applets can be in a folder on your CD as this mechanism is used. You make them only once, as well. The path and target name can be filled in by the one-time edit that refers to CD folders without drive letter - this works.

To use the template for a new show just process the correspondence file with a one-time custom app that replaces placeholder image names with actual table image names. Write out the unique .PTE file and create the unique show in PTE. This is modestly simple for volume production.

As for how the .EXE applets create output data for your post-processing, I suggest .INI file format. You can use standard windows .INI format and have the buttons code "Save" and "Order" sections and keys added by customer click actions. AutoIt has all the .INI file support you need to make this a breeze. You simply have to post-process the [.INI or file type of your choice] file to make an order confirmation for the customer. You could also give the customer a way to see the order at any time as they are viewing the proofs by giving them an app called from PTE show.

I'm sure you can fill in the full details of this process definition and make it work. Here are some items to understand before making a very large commitment:

I have pushed PTE object and image counts sufficiently to know that PTE will not break with 500 photos, each having two buttons. But if you were to attempt a thousand or more pictures with object buttons I would test PTE first. I have broken PTE object editor and P2E show playback software internal structure limits by using very large numbers of clickable objects, especially with very many per picture. The PTE object editor failure happens on just one slide with 400-500 objects. The P2E show software crash happens after viewing a certain number of very high object count slides (e.g. 200-400 per slide will crash in less than 10 slides viewed). I have found that the limit is cumulative though, so the total object count that exists in "viewed" (only) slides breaks the software (if a slide is not viewed it doesn't count toward a crash). The raw image file count is not as touchy, as I have made shows with 14,000 photos that play fine on the wimpiest of systems.

I offer those findings because it is wise to understand the limitations of tools used.

Also you may need to do some tests for the CD-based part of the process w.r.t. drive letter and paths. I know you can make this work since I have done it many times, but there is some learning to do. And by the way, AutoIt has sufficiently powerful script commands that you can identify the CD-ROM drive letter with ease. You may not even need it though.

OK - so is this within reach, or is this too much for what you're trying to do? I hope you find the ideas helpful. Good luck! :)

Link to comment
Share on other sites

Bill,

Along your idea of using a Script/exe program to pass the necessary commands and parameters :

A relatively a simple alternative is to RUN "IrfanView" (preset all configurations - Capture keys -folder destination- etc) and have it run minimized in the background while the PTEShow is running.

Have either a button on each slide that sends the HotKeys to caputure the picture to file ... or have the User just manually press the HotKeys. All this happens unseen and silently and saves each of the pictures in a separate filename

Basic Requirements :

Copy IrfanView to CD ( premake all settings)

Launch Both PTE Show and IrfanView thru Script/Exe

Sample Script (partial):

*** Launches IrfanView in capture mode and then PTE Show

Run, i_view32.exe

WinWaitActive,IrfanView

Send, c

WinWaitActive, Capture Setup

Send, {ENTER}

Run, PTE.exe

*** User now presses HotKeys as you desiginated during setup

*** Or just Script the HotKeys to a PTE Button for User to press.

I have made a demo trying this and it seems to work fine ... and very simple)

Link to comment
Share on other sites

That's interesting Stu, thanks! If I understand correctly this method relies on the PTE show image having name or numeric ID displayed by P2E with each picture, coupled with a screen capture by Irfanview of desired photos. The screen captures have all of the ID needed for the seller to know for sure what the customer has selected. It appears that the customer can select with ease. Is there any issue with allowing image files to become available through capture? For sure they can be low-res and can have copyright and watermarks in the picture.

The show has to be unsynchronized to allow extended viewing and navigating, for any sheme.

I like your scheme especially because of the reduced cataloging effort.

Deia, it looks like you have more than one way to solve the problem. Is there anything else to be considered?

Link to comment
Share on other sites

Bill,

I would naturally expect that a photographer showing proofs to be purchased would use the file name or whatever ID they have displayed in PTE for the buyer to see ... :rolleyes:

In Irfanview capture option settings ... just save as .jpg using whatever quality level you like.

I prefer just using the HotKey from the keyboard to avoid the extra work of adding object buttons and setting. Plus, using just the keyboard HotKey ... you can use SYNC Shows.

This is just the basics of setting this Capture up ... there is lots of expansion possible here. I have expanded my test demo a bit more using full screen intro while IrfanView loads ... then the PTE Show plays and closes, I have a ending menu to access the folder where the proff captures have been copied etc. Closing the menu also closes IrfanView together.

The possibilites are there without being too complicated and time consuming to setup.

New Note : Since you preset all of your necessary IrfanView settings (theres several you must do in i_view32.ini )... then copy Irfanview to CD. This works well since the settings cannot be altered because the ini file is now read only. ( Normally the ini is written too when on the hard drive).Actually you can somewhat disable alot of functions thru the ini ...which makes the program real awkward to function normally, if need be.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...