Page 1 of 1

Page number printed cards

Posted: Thu Mar 25, 2010 1:46 pm
by bsouthuk
Hello all

Wonder if somebody can help me.

I have a stack that contains lots of cards that I need printin. However only cards that I have selected to print - I have the following code that I am using for this:

Code: Select all


function whatCards2Print
repeat with i = 1 to the num of btns of grp "ActivePrint" of cd 1
if the hilite of btn i of grp "ActivePrint" of cd 1 = true then
put i & "," after new_list
end if
end repeat

delete char -1 of new_list

RETURN new_list
end whatCards2Print



set the formatForPrinting of stack "qg" to true
   set the printRotated to false 

   open printing with dialog 



set the printScale to 1
    set the printMargins to 0, 0, 0, 0  --1/2 inch margins 
    set the printGutters to 0, 0 --1/4 inch gutters 
   put whatCards2Print() into  Cards2print
repeat for each item i in  Cards2print
print  Card i 
end repeat 
close printing
I now need to page number the cards that have been selected in format "Page 1 of 24, Page 2 of 24' etc and wondered what code i'd need to add to make this possible?
Your help is most appreciated.

Cheers

Daniel

Re: Page number printed cards

Posted: Thu Mar 25, 2010 1:57 pm
by Klaus
Hi Daniel,

I already answered this about 9 days ago!
See here:http://forums.runrev.com/phpBB2/viewtop ... f=9&t=5057


Best

Klaus

Re: Page number printed cards

Posted: Thu Mar 25, 2010 2:08 pm
by bsouthuk
Hi Klaus

You did and thank you for that.

However am experiencing a few problems. The page numbering code must work with the code I have written above as it must relate to check box buttons within a group.

The reason for this is that the stack containing all of the cards has lots of different 'grouped check box buttons' that determine which pages are to be printed and depending upon the user that logs in to my application determines which 'check box button group' is visible.

Does this make sense?

Re: Page number printed cards

Posted: Thu Mar 25, 2010 3:11 pm
by Klaus
Hi Daniel,

whatever :-)

You only used parts of my original script in your example!

But here is a hint on how to do this in your script, see the comments!

Code: Select all

...
## Your function will return a comma separated list of all the card number to be printed
put whatCards2Print() into  Cards2print

## Now you can get the COUNT of these card to be printed:
put the num of items of Card2Print into tCardCount

## Since "repeat for each" will noit give you a clue what number is curretnly processed you need to make you own counter:
put 0 into tCounter

repeat for each item i in  Cards2print
   add 1 to counter

   ## Now you can fill your info field of all these cards inside of this loop!
   put "Page" && tCounter && "of" && tCardCount into fld "pagenumber" of cd i
   print Card i 

   ## Optional: remove this info again after printing
   put empty into fld "pagenumber" of cd i
end repeat 
...
Best

Klaus

Re: Page number printed cards

Posted: Thu Mar 25, 2010 4:32 pm
by bsouthuk
Done! You're a star Klaus.

Its simple when you know how!

Re: Page number printed cards

Posted: Thu Mar 25, 2010 6:28 pm
by Klaus
Hi Daniel,
bsouthuk wrote:Done! You're a star Klaus.
I know! 8)

Check this if you like rock music:
http://www.youtube.com/watch?v=W6w-EMwJh4g
I am the guy with glasses and few hair on the right :D

Best

Klaus

Re: Page number printed cards

Posted: Thu Mar 25, 2010 7:51 pm
by sturgis
Hmm. You don't have much hair on the left either!

You guys rock.

Re: Page number printed cards

Posted: Thu Mar 25, 2010 8:01 pm
by Klaus
sturgis wrote:Hmm. You don't have much hair on the left either!
Ahhh, you made my day!!! :lol: :lol: :lol:
sturgis wrote:You guys rock.
Thanks, it's a lot of fun!
Check our website, it is in german but "Bilder" means pictures and sure you get the picture with "Sounds", so you can see and hear us, if you like.
http://www.andernfalls.de/

I totally spoil the average age of the band, all of them are more than 20 years younger than me 8)

Re: Page number printed cards

Posted: Thu Mar 25, 2010 8:17 pm
by sturgis
Nice site. Think i'll snag your downloads and add em to my library.
All I need to do now is learn German to better appreciate. The only thing I can see that the band needs now is a really great... ukulele soloist! However, if you ever decide you need a low to average ukulele soloist, i'm there.

Re: Page number printed cards

Posted: Fri Mar 26, 2010 9:00 am
by Klaus
Hi sturgis,

OK, I talked to my band mates and we will give you a try!
We'll meet next tuesday 8:00 PM in Bonn-Beuel at McDonalds, bring a microphone, if you don't have pick-up on your uke :D


Best

Klaus

Re: Page number printed cards

Posted: Fri Mar 26, 2010 2:26 pm
by FourthWorld
Klaus wrote:Check this if you like rock music:
http://www.youtube.com/watch?v=W6w-EMwJh4g
Nice Klaus! Is that a fretless bass you're playing? The group has a good sound - and that was an amazingly clean recording for a live performance.

Re: Page number printed cards

Posted: Fri Mar 26, 2010 2:48 pm
by sturgis
Hmm. I do happen to have a pickup in my uke. Any chance you can swing by to pick me up? In New Mexico, USA? *grin* Instead how about an audition tape? Made a quick and dirty shortened cover of "Smooth" (santana and rob thomas). Keep in mind its recorded with my laptop mic not proper recording equipment but even so for a self styled "mediocre" player its not bad.

Used to play keyboard also, but all we have at the moment is a really badly tuned piano.

P.S. ignore any string buzz, ukes are really sensitive to string burr and i'm due for a new set.
Klaus wrote:Hi sturgis,

OK, I talked to my band mates and we will give you a try!
We'll meet next tuesday 8:00 PM in Bonn-Beuel at McDonalds, bring a microphone, if you don't have pick-up on your uke :D


Best

Klaus

Re: Page number printed cards

Posted: Fri Mar 26, 2010 6:55 pm
by Klaus
Hi sturgis,

ok, send me the tape :D
My address: klaus (AT) major-k.de

Best

Klaus

Re: Page number printed cards

Posted: Fri Mar 26, 2010 7:05 pm
by sturgis
Hmm, thought I had posted it last time. Heres a link to my audition recording. http://runthenumbersnow.com/santana/smoothe.mp3

Re: Page number printed cards

Posted: Tue Mar 30, 2010 10:32 am
by Klaus
Hi all,

sorry for being a bit late to answer.
A friend of mine died surprisingly on sunday, he just did not wake up anymore.
He was the boy friend of our female singer and we had been on stage together
about a week ago. :cry:


@Richard
Yes this is my baby, a fretless 6-string bass I bought more than 20 years ago.

@sturgis
That is really cool what you do with your uke, honestly!


Best

Klaus