Shao Posted August 6, 2006 Share Posted August 6, 2006 Hi,In a multiusers environment I'd like to know how many pages are sent to printer from any applicationTo resolve, I use WinWaitActive("Imprimer") ; r [=Print in french ]) And I use thenGuictrlread (ctrlID in the window)But it doesn't work !How can I do ? Link to comment Share on other sites More sharing options...
Xenobiologist Posted August 6, 2006 Share Posted August 6, 2006 Hi, maybe you could get ahead with ControlCommands ConrolGetText and so on. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Shao Posted August 6, 2006 Author Share Posted August 6, 2006 Thank you Mega but I can't find any ControlGetText in help and ControlCommand is used to send a command to a control, not to get any information from a control. Link to comment Share on other sites More sharing options...
Xenobiologist Posted August 6, 2006 Share Posted August 6, 2006 Thank you Mega but I can't find any ControlGetText in help and ControlCommand is used to send a command to a control, not to get any information from a control.HI,http://www.autoitscript.com/autoit3/docs/f...trolGetText.htmSo long,Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Shao Posted August 6, 2006 Author Share Posted August 6, 2006 Thank you very much, it works. Now , another problem : I notice that windows aren't the same ones when you print from Acrobat Reader or From Word or any other programs. How can I do to be sure to get the good informations from any printing windows ? Informations that I need : printer name number of copies how many pages are printed ;[from x to y : y+1-x = number of pages ; value of x and y ?] etc. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 6, 2006 Moderators Share Posted August 6, 2006 Are the Class names under the Title of the AutoItInfo.exe tool the same? If so you would use Opt('WinTitleMatchMode', 4).Opt('WinTitleMatchMode', 4) ControlGetText('classname=WindowClass', '', 'ControlID or ClassNameNN') Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Shao Posted August 8, 2006 Author Share Posted August 8, 2006 Are the Class names under the Title of the AutoItInfo.exe tool the same? If so you would use Opt('WinTitleMatchMode', 4).Opt('WinTitleMatchMode', 4) ControlGetText('classname=WindowClass', '', 'ControlID or ClassNameNN') Hi Smoke_N Yes, title and class names are the same ones in both of the Printer Windows : Title : Imprimer Class : #32770 In your comment I don't understand how can I do to get all the informations I need considering that ctrlID aren't the same in an AutoIt Printing Window or in an Acrobat Reader Printing Window (examples). Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted August 8, 2006 Moderators Share Posted August 8, 2006 Hi Smoke_NYes, title and class names are the same ones in both of the Printer Windows :Title : ImprimerClass : #32770In your comment I don't understand how can I do to get all the informations I need considering that ctrlID aren't the same in an AutoIt Printing Window or in an Acrobat Reader Printing Window (examples).If you can get the Client X and Y coords, I wrote this UDF yesterday to return the ControlID or ClassNameNN by their position on the client app, that should help your situation.http://www.autoitscript.com/forum/index.ph...st&p=218527 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Shao Posted August 8, 2006 Author Share Posted August 8, 2006 If you can get the Client X and Y coords, I wrote this UDF yesterday to return the ControlID or ClassNameNN by their position on the client app, that should help your situation.http://www.autoitscript.com/forum/index.ph...st&p=218527thank you very much. I try it. 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