Event trigger print using VC++ - visual-c++

I have requirement to print log data continuously whenever an event trigger (Without showing print dialog, using default printer). Event may occur twice a second or minit or hour. Also i don`t bother about printer status. example out of paper, communication problem. Printer should not leave empty page. Example event 1 have 4 lines of data to print. While printing event 2, printer should print continuously instead of fetching next paper.
My development environment VC++ and MFC.

Do you have a printer DC with you, if not you have create one and send file across.

Related

Is there a way to save progress in a desktop application developed in python and pyqt5?

Our application process a large audio file into number of smaller segemnts and displays it on a table in the GUI. The user can listen, label and comment on each segment in the table. So is there a way to save the progress that can be resumed from where the user left off with the last accessed row in the table?
For example in the table has 700 rows and the user has worked with 100 and closes the application, the next time they open the application they must be able to start working with the 101st row and the previous work must be saved.
pickle (import pickle) allows you to write/read python objects and therefore save a progress status from one session to another.

How do I 'trust' an external data source in Excel?

I have a tool that uses an external data connection to keep a dashboard updated from single CSV which contains a data log. I don't want anyone touching the log itself and fiddling with it, so I have put together a small dashboard that is fed from the data displayed by the connection.
I have the connection set to update on open and every 10 minutes in the background, but it does not do this. Instead, I need to manually press refresh, whereupon I get the following message:
'Microsoft Office has ifentified a potential security concern' message box example
I absolutely trust the source in question, but do not want my user to have to click refresh every now and then to make sure their data is up to date.
How can I make this connection 'trusted' and have this persist through sessions?
(Apologies if I have missed anything or this isn't the right way to ask this question. I'm new! :) )
Moved the tool and it's peripherals to a (trusted) shared drive, and no problems.

How can I update what is displayed in TextInput widget? python kivy

I have a TextInput widget that is suppose to display text within a .log file.
The python script looks like
logginfo = ObjectProperty()
with open('logtest.log', 'r') as file:
loginfo = file.read()
The kivy file looks like
TextInput:
id: logginfo
text: root.loginfo
The problem is, the log file is only read once and that is what is displayed.
How can I update loginfo whenever the .log file changes? In other words, how can I get a live feed of the logtest.log file?
You will have to produce a method/function that will check for changes and load the file to update the textbox for you. There is no "automagic" way to do it.
I don't work with kivy directly, but most GUI frameworks seem to come with some sort of timer, or timeout object. Kivy doesn't seem to be any different in this case. A quick search revealed that Kivy has a "Clock" object. I found some docs here.
Most of the time these work on a timeout, so you define the Clock, tell it what function to run, whether it should repeat or not, and how frequently to time out. Each time the Clock times out, the function will be called. You can code the function to do whatever you like, in this case, check the file for changes.
I'd suggest making a hash of the file (something simple like md5) and storing the hash in a variable. Then, each time the clock times out, it can simply compare the files hash, to the hash you stored in ram, and if it's changed, you know you need to update the text box with the new contents of the file. If it doesn't you don't need to re-access the file for another timeout interval.
If you have specific questions on problems you encounter trying to work through the project please make new questions with specific issues, again showing your code at that point.

Reading Excel updates with UFT

Hi everyone,
I'am using HP UFT for testing.
I get data from an Excel file and also write data to the same Excel file.
My issue is that when i write data to the Excel file, I can't use it until the test is closed and UFT stops running (UFT won't read it, it's still blank to it).
I need a way to update UFT "view" of the Excel while running, i can't just close and open again the Excel file while test is still running.
Language used: VBScript
Can you help me?
Thank you all
You should use the UFT DataTable. The DataTable utility object gives you ways to import the Excel File programmatically at the beginning of the Test, write the files to there and when it ends, dump it back to a file. As a Bonus, you would also be able to see the DataTable content in the RunReports at the end(under the Data Tab)
Do not forget that everything you do on the DataTable while running the test is written into the memory only. In case the test cannot reach the end where you persist it again, all is lost. You can try error handling with On Error Resume Next, Recovery Scenarios or Class_Terminate based destructors (Create and instantiate a Dummy class, and if the test crashes and stops the Class_terminate will automatically be called where you can do cleanup activities.

How to get print statement in xpinc?

I've successfully created a view in XPages which contains list of all my lotusscript agents and a button to run the selected agent. When I select any one of the agent and run it, it successfully run but all the print statements are not appearing. I checked my code and my print codes are there. Run my agent from designer and the print statements do appear. Is this due to the limitation of xpinc?
Print statements go to the console. So you should find them in the log.nsf you also can start the client with the -rparams -console to get a console. Of course you could follow this example and send the print to a place where you can process it.
Or - if the prints serve debugging purposes, use the Debug Toolbar from OpenNTF.

Resources