Reading pdf from folder

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Tribblehunter
Posts: 78
Joined: Wed Apr 10, 2013 9:08 pm

Reading pdf from folder

Post by Tribblehunter » Sun Oct 27, 2013 8:49 pm

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
Returning to try to learn livecode again.

But much greyer at the temples than the last time.

Tribblehunter
Posts: 78
Joined: Wed Apr 10, 2013 9:08 pm

Re: Reading pdf from folder

Post by Tribblehunter » Sun Oct 27, 2013 9:03 pm

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
Returning to try to learn livecode again.

But much greyer at the temples than the last time.

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: Reading pdf from folder

Post by dave.kilroy » Sun Oct 27, 2013 10:48 pm

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
"...this is not the code you are looking for..."

Tribblehunter
Posts: 78
Joined: Wed Apr 10, 2013 9:08 pm

Re: Reading pdf from folder

Post by Tribblehunter » Fri Nov 08, 2013 7:36 am

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.
Returning to try to learn livecode again.

But much greyer at the temples than the last time.

dave.kilroy
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 858
Joined: Wed Jun 24, 2009 1:17 pm
Contact:

Re: Reading pdf from folder

Post by dave.kilroy » Fri Nov 08, 2013 10:41 am

Tribblehunter wrote:Next programme is now under way and will start a new thread.
Looking forward to it...
"...this is not the code you are looking for..."

Post Reply