Looking for Help on a Project

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

Klaus
Posts: 13793
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Looking for Help on a Project

Post by Klaus » Fri Jul 07, 2017 11:28 am

Hi David,
bidgeeman wrote:For some weird reason the images are now simply loading straight into my main stack?????
This was working fine a week ago. Can anyone advise what the problem could be?
unfortunately this syntax "import paint ... onto card XYZ..." is not valid.

Try something like this:

Code: Select all

...
set the defaultfolder to it       
put the files into myListOfFiles  
filter myListOfFiles with "*.png"

## !!!
lock screen
go cd "Nums" of stack "imageload"
repeat for each line myFile in myListOfFiles            
    import paint from file myFile into card "Nums" of stack "ImageLoad"           
end repeat  
## Now unlock screen and go back to where you came from      
 ...
Best

Klaus

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am
Location: Australia

Re: Looking for Help on a Project

Post by bidgeeman » Fri Jul 07, 2017 11:34 am

Thanks once again Klaus.
Now if only I could get it to print Landscape :(

Bidge

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am
Location: Australia

Re: Looking for Help on a Project

Post by bidgeeman » Sat Jul 08, 2017 12:28 am

I have attached a stack that is supposed to print in Landscape and in Portrait. For some reason I cannot get it to print in Landscape mode at all, no matter what I do. Can someone please look at the stack and tell me if there are any errors that might be causing the problem?

Many thanks
Bidge
Attachments
PrintingTester.zip
(1.02 KiB) Downloaded 377 times

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am
Location: Australia

Re: Looking for Help on a Project

Post by bidgeeman » Sat Jul 08, 2017 3:11 am

Hello.
I have figured a workaround for this Landscape problem. Take a snapshot of the Landscape image area, place it on another card, rotate it 90 degrees and print it via portrait mode.

Can someone help me out with the correct syntax for placing a snapshot onto another card?

Code: Select all

export snapshot of image "Print" of stack "ImageArea" as JPEG to image "PR" of stack "PrintRoom"
I keep getting learner errors.

Thanks
Bidge
Last edited by bidgeeman on Sat Jul 08, 2017 3:34 am, edited 1 time in total.

jameshale
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 474
Joined: Thu Sep 04, 2008 6:23 am
Location: Melbourne Australia

Re: Looking for Help on a Project

Post by jameshale » Sat Jul 08, 2017 3:30 am

According to the dictionary the PrintPaperOrientation has to be set BEFORE calling open printing.
You have...

Code: Select all

on mouseUp
   focus on nothing
   open printing with dialog
   if the result is "Cancel" then exit mouseUp
   set the printPaperOrientation to "landscape"
   set the printMargins to 0,0,0,0
   set the printPaperSize to "595,842"
   set the printScale to 1
   print stack "ImageArea"
   close printing
end mouseUp 
Perhaps it should be..

Code: Select all

on mouseUp
   focus on nothing
   set the printPaperOrientation to "landscape"
   set the printMargins to 0,0,0,0
   set the printPaperSize to "595,842"
   set the printScale to 1
   open printing with dialog
   if the result is "Cancel" then exit mouseUp 
   print stack "ImageArea"
   close printing
end mouseUp

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am
Location: Australia

Re: Looking for Help on a Project

Post by bidgeeman » Sat Jul 08, 2017 3:33 am

Thanks jameshale.
THAT WORKED!!!!! Thank you so much!

Many thanks
Bidge

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”