How do I print a document with some variable values?

Get help using Construct 2

Post » Mon Mar 03, 2014 7:39 pm

Hi,

I have a calculator. It works with several variables which now I want to print. Yes, to print to an old classic sheet of paper. I know that you can use javascript to print some elements of a web page, for instance, with a function like this one: window.print()

How could I use this on construct?
B
17
S
4
G
1
Posts: 105
Reputation: 1,874

Post » Tue Mar 04, 2014 11:48 am

Really?
No one has ever wanted to do this?
At least, not to print, but to save a file with some data...
Any idea?
B
17
S
4
G
1
Posts: 105
Reputation: 1,874

Post » Tue Mar 04, 2014 12:05 pm

Try asking in the Javascript SDK part of the forums maybe? I wish I could help, it's definitely an interesting idea! Let us know if it works out!
B
11
S
2
G
1
Posts: 172
Reputation: 1,486

Post » Tue Mar 04, 2014 12:23 pm

Insert Browser object.
add action
browser
execute java and paste "window.print();"
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,718

Post » Tue Mar 04, 2014 12:24 pm

teacherpeter wrote:Try asking in the Javascript SDK part of the forums maybe? I wish I could help, it's definitely an interesting idea! Let us know if it works out!


I'll do it!
B
17
S
4
G
1
Posts: 105
Reputation: 1,874

Post » Tue Mar 04, 2014 12:25 pm

DUTOIT wrote:Insert Browser object.
add action
browser
execute java and paste "window.print();"


Hey! Dutoit!

Yes, I'll try it too...
B
17
S
4
G
1
Posts: 105
Reputation: 1,874

Post » Sun Mar 09, 2014 7:55 pm

well, actually it doesn't work fine. The window.print(); function prints all the window broser including margins left and right of the content we want to print. This leads to a really bad result.
No way...
B
17
S
4
G
1
Posts: 105
Reputation: 1,874


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 33 guests