pcouturier Posted November 25, 2013 Share Posted November 25, 2013 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? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 25, 2013 Moderators Share Posted November 25, 2013 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). "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
martin Posted November 25, 2013 Share Posted November 25, 2013 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. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted November 25, 2013 Moderators Share Posted November 25, 2013 Very nice UDF, Martin. Can't believe I've never stumbled across that one before "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
martin Posted November 25, 2013 Share Posted November 25, 2013 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now