Page 1 of 1

Reading pdf from folder

Posted: Sun Oct 27, 2013 8:49 pm
by Tribblehunter
Hi all. Back again.

I have managed to overcome the issues with my last experiment.

Am now trying another.

I have got it to do all i want (which is to list files in a folder then open the selected one).

It works as a livecode project but not as a stand alone. that is, in development i can test it but once I change it to stand alone I only get the files in the folder that the program resides.

I wish to open pdf doc in a folder which resides in the same folder that the standalone is. (so i can transfer the program from this computer to another by stick).

In the code I have set the default folder to the one containing the PDF's by the line set the defaultfolder to "/Current Volvo Service Protocols" believing this will enable the stand alone to access the folder. Guess i am wrong.

Any pointers gladly received!!

Brian

Re: Reading pdf from folder

Posted: Sun Oct 27, 2013 9:03 pm
by Tribblehunter
Solved!

Using this code I can do it.

Code: Select all

 set the defaultFolder to item 1 to -2 of the effective filename of this stack 
  set the defaultFolder to defaultFolder & "\Current Volvo Service Protocols" 
Another thing learnt!!

Brian

Re: Reading pdf from folder

Posted: Sun Oct 27, 2013 10:48 pm
by dave.kilroy
Well done Brian!

There is (almost) nothing quite as nice as the feeling of solving a problem that's been resisting you :)

BTW I'm guessing you did a "set the itemdelimiter to slash" before setting the defaultFolder?

Kind regards

Dave

Re: Reading pdf from folder

Posted: Fri Nov 08, 2013 7:36 am
by Tribblehunter
Hi Dave
Yes i did. and eve better i now understand how and why!!

That little experiment is now sitting on a desktop at work enabling the engineers to search for documents easily without going into the file system.

I know windows has a search facility but we are talking guys who have enough problem switching on a computer let alone searching for files!
Now it is 'click, select document type, enter the number in the engine designation (ie '63' for a TAMD63P) and up pops a list for them to select from.

Next programme is now under way and will start a new thread.

Re: Reading pdf from folder

Posted: Fri Nov 08, 2013 10:41 am
by dave.kilroy
Tribblehunter wrote:Next programme is now under way and will start a new thread.
Looking forward to it...