Click here to Skip to main content
15,920,632 members
Home / Discussions / C#
   

C#

 
GeneralRe: Something for beginners Pin
Qlex7-Aug-11 20:37
Qlex7-Aug-11 20:37 
AnswerRe: Something for beginners Pin
BillWoodruff6-Aug-11 8:39
professionalBillWoodruff6-Aug-11 8:39 
GeneralRe: Something for beginners Pin
Qlex7-Aug-11 20:38
Qlex7-Aug-11 20:38 
AnswerRe: Something for beginners Pin
RaviRanjanKr7-Aug-11 9:20
professionalRaviRanjanKr7-Aug-11 9:20 
GeneralRe: Something for beginners Pin
Qlex7-Aug-11 20:39
Qlex7-Aug-11 20:39 
AnswerRe: Something for beginners Pin
cjb1108-Aug-11 0:13
cjb1108-Aug-11 0:13 
GeneralRe: Something for beginners Pin
Qlex8-Aug-11 0:48
Qlex8-Aug-11 0:48 
QuestionHow useful WhiteFramework in C# to automate Print Jobs? Pin
Basnta Padhi4-Aug-11 20:03
Basnta Padhi4-Aug-11 20:03 
Hi all,

I am developing a console application using C# to automate Print Job for a bulk of documents. Below I am mentioning my plan for developing and my approach.

Algorithm:

1)Fetch list of documents.
2)Process the document list one by one.
a)Launch the Application.
b)Wait till the application launched perfectly.
c)Fire the Print Job.
d)Wait for Print dialog appear.
e)Fire "ENTER" key press event.
f)Wait till spooling finish.
g)Close the document and application.
3)Update the XML with Print job info.


Code:
<pre lang="c#">//Launch the file from the location specified in.
White.Core.Application application =White.Core.Application.Launch(@path);

Console.WriteLine("launch is done");

Thread.Sleep(3000);//Wait till Application Launched successfully.

//Sending Commands to Print(to press "Ctrl+P" button).
SendKeys.SendWait("^(p)");

Thread.Sleep(3000);//Wait till Print Dialog appear

//Sending Commands to Print(to press "Enter" Button).
SendKeys.SendWait("{ENTER}");

//Get the current time as the document fired for print job.
_printedTime = DateTime.Now;

Thread.Sleep(3000);//Wait till spooling Finish.

//Closing the window.
SendKeys.SendWait("%{F4}");
</pre>

Now the problem is for waiting case I am blindly using Thread.Sleep(With Few seconds), which is not Ideal. So I need to know How I'll fix these issues using White Framework in C#.

Can anybody help me to fix this issue please. Any help will be appreciated.
Thanks in advance
AnswerRe: How useful WhiteFramework in C# to automate Print Jobs? Pin
Dave Kreskowiak5-Aug-11 3:45
mveDave Kreskowiak5-Aug-11 3:45 
GeneralCreating a complex text/code editor [modified] Pin
Raikai4-Aug-11 16:14
Raikai4-Aug-11 16:14 
GeneralRe: Creating a complex text/code editor Pin
Mycroft Holmes4-Aug-11 16:25
professionalMycroft Holmes4-Aug-11 16:25 
GeneralRe: Creating a complex text/code editor Pin
Raikai4-Aug-11 16:32
Raikai4-Aug-11 16:32 
GeneralRe: Creating a complex text/code editor Pin
Roger Wright4-Aug-11 18:38
professionalRoger Wright4-Aug-11 18:38 
GeneralRe: Creating a complex text/code editor Pin
RobCroll4-Aug-11 19:12
RobCroll4-Aug-11 19:12 
GeneralRe: Creating a complex text/code editor Pin
Ravi Bhavnani5-Aug-11 12:17
professionalRavi Bhavnani5-Aug-11 12:17 
GeneralRe: Creating a complex text/code editor Pin
Shameel4-Aug-11 23:01
professionalShameel4-Aug-11 23:01 
GeneralRe: Creating a complex text/code editor Pin
BobJanova5-Aug-11 6:31
BobJanova5-Aug-11 6:31 
QuestionCan someone help me with is C# project Pin
mw2adrian4-Aug-11 12:59
mw2adrian4-Aug-11 12:59 
AnswerRe: Can someone help me with is C# project Pin
Dave Kreskowiak4-Aug-11 13:58
mveDave Kreskowiak4-Aug-11 13:58 
GeneralRe: Can someone help me with is C# project Pin
mw2adrian4-Aug-11 15:15
mw2adrian4-Aug-11 15:15 
GeneralRe: Can someone help me with is C# project Pin
Mycroft Holmes4-Aug-11 16:19
professionalMycroft Holmes4-Aug-11 16:19 
GeneralRe: Can someone help me with is C# project Pin
mw2adrian4-Aug-11 17:11
mw2adrian4-Aug-11 17:11 
GeneralRe: Can someone help me with is C# project Pin
Mycroft Holmes4-Aug-11 17:36
professionalMycroft Holmes4-Aug-11 17:36 
GeneralRe: Can someone help me with is C# project Pin
mw2adrian4-Aug-11 18:01
mw2adrian4-Aug-11 18:01 
GeneralRe: Can someone help me with is C# project Pin
fjdiewornncalwe5-Aug-11 2:46
professionalfjdiewornncalwe5-Aug-11 2:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.