Translate code from Mac to PC

Mark Schonewille m.schonewille at economy-x-talk.com
Thu Nov 21 19:03:08 EST 2013


Hi Jim,

Your script should work on both Mac and Windows. It would always use the 
default picture viewer to open the PNG file. On Windows 8, this is an 
app called Photo but many people change it to Windows Photo Viewer or 
something else. On Mac it is Preview and only few people will change 
this to a different app.

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other 
colour spaces. http://www.color-converter.com

Buy my new book "Programming LiveCode for the Real Beginner" 
http://qery.us/3fi

Fill out this survey please
http://livecodebeginner.economy-x-talk.com/survey/

On 11/22/2013 00:56, James Hurley wrote:
> I need a little code translation for a program I am doing for a local school.
>
> It is a drawing program. After the drawing is complete, I need a way for the student to print and or save the  image.
>
> On the Mac that is easy. Take a snapshot of the rect containing the image, save it to disk, launch the file and it opens in Preview.
> And from Preview, the image can be printed or saves. Here is that in Mac speak.
>
> on mouseUp
>     ask "Please name this image." with "MyImage"
>     if it is "" then exit mouseUP
>     put "/" & it & ".png" into tName
>     put specialFolderPath ( "desktop") & tName Into tPathAndName
>     export snapshot from rect (rect of  graphic "oval") of this card  to file tPathAndName as PNG
>     launch document tPathAndName
> end mouseUp
>
> I need this for the PC as well. Is there an app on the PC that opens any PNG file  that is double clicked?
>
> Thanks,
>
> Jim Hurley





More information about the use-livecode mailing list