Sign in to follow this  
Followers 0
pcouturier

Use Autoit to permit print

5 posts in this topic

Hi,

I want to setup a public computer to be used to print a web based form. Is there is a way with Autoit to permit printing but only from a specified site. That if they try to print a Word document for exemple or from another website then our specified page, the print function would be disabled.

Is this possible and how?

Share this post


Link to post
Share on other sites



Hi, pcouturier. The problem I see with your path is, if the user is trying to print from another application such as Word, AutoIt is not controlling the function. You would have to have the script running all the time, and try to intercept the call to the printer, regardless of what application made the call (which could be both difficult and detrimental to whatever the user is doing in the other application).

If you're using a guest account (since this sounds like a kiosk situation) you could deny the guest accound "print" permission. In your script, you would then need to make your printer call using elevated credentials (RunAs).


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

I think it might not be so difficult. First you can set the printer, or lack of it, depending on the application. I wrote a udf for doing this and although it is old it might still work. Search for 'psycho' in example scripts.

Secondly, assuming you prevent the user controlling it, the printed output will have the title of the web page, so anything that doesn't have this title can be prevented.

If you set the printer to be a pdf printer then the file created will have the webpage as it's name. You could then print that out if it was allowed and then either way delete it or save it as a reference of what was printed.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Very nice UDF, Martin. Can't believe I've never stumbled across that one before :)


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Thanks JLogan3o13.

You need to be completely lost to stumble across that I would think :)


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0