export snapShot problem

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
jsburnett
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 121
Joined: Fri Mar 09, 2007 9:47 pm

export snapShot problem

Post by jsburnett » Fri Jan 25, 2013 12:25 am

I have writen a script using: export shapShot to file "Image" as JPEG.
It seems to work on most computers using windows 7.
However, on 1 computer, with the Stand Alone Stack - no file is made.
When trying the runrev file, or stack that wasn't saved as a Stand Alone, I get an error execution error at line 3 (expot: no image selected, or image not open), char 1

any ideas?

Thanks in advance for any help.

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: export snapShot problem

Post by Klaus » Fri Jan 25, 2013 2:26 pm

Hi jsburnett,

you did not add the FROM RECT parameter, so what area of the screen/stack/card do you exspect to be "snapshot"ted at all?
I think this is neccesary:
...
export snapshot from rect "0,0,600,300" to file "my image.jpg" as JPEG
...

Another possible problem is that you did not specify a PATH for the exported image.
In this case the image will be saved in the current "defaultfolder" whereever this may be.
That maybe a folder where your app does not have write permissions, so this might also fails.

Always use any preferences folder or -> specialfolderpath("documents")


Best

Klaus

jsburnett
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 121
Joined: Fri Mar 09, 2007 9:47 pm

Re: export snapShot problem

Post by jsburnett » Fri Jan 25, 2013 8:11 pm

Thank you for your suggestions.

I tried your suggestions without any changes ... :-(

If the FROM RECT parameter is not specified, rect is choosen by the user using the 'cross hairs' (the dictionary includes samples such as:
Examples
export snapshot to file "Test.ppm"
export snapshot from rect "0,0,200,200" to file "Nav.jpg" as JPEG
export snapshot from Field 1 to file "File1.png" as PNG
export snapshot to pictVariable as GIF

interestingly, the 'code' or 'script' does work on most computers.

I did check the permissions, and I am the administrator, and able to save files to the same folder.

The destination folder is the default folder where the application is ... which works well ... on the 'other computers' ... and designating a specific folder doesn't change the outcome...

I really appreciate your help and to tell you I tried your suggestions and what the results were.

I am still working on it ...

Fortunately I found windows 7 had a "Snipping Tool" that does the same as my stack.

Thank you again.

John

Post Reply