Can I simultaneously write on notepad.exe with macro?

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
sokolowitzky
Posts: 103
Joined: Mon Sep 15, 2014 7:34 pm

Can I simultaneously write on notepad.exe with macro?

Post by sokolowitzky »

Hello,

I already know how to export data from ods to txt files. That's not what I mean.
What I'm looking for is a simultaneous logging. I have thousands of files, they will be processed with the macro I already have set.
Now I only need one more thing, can I simultaneously write logs on notepad.exe(the classical one that is found in all windows os) ?
Like these
record 1: ...../xxx.ods is done
(a few secods later a new log appears on notepad's frame, without closing)
record 2: ...../xxy.ods is created

is this technically possible?
Win10-OpenOffice 4.1/LibreOffice 7.4
User avatar
Zizi64
Volunteer
Posts: 11360
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Can I simultaneously write on notepad.exe with macro?

Post by Zizi64 »

Now I only need one more thing, can I simultaneously write logs on notepad.exe(the classical one that is found in all windows os) ?

Has the Notepad.exe any API functions? Do you know them (if even they exist)?


You can launch third party softwares from an AOO/LO macro, but you can not control them if they have not some well described API functions.

I think it: you must handle that log file (database?) directly by the AOO/LO.
What filetype must be handled (that you want handle/fill by the notepad)? Is it a pure .txt/.csv,/.tsv file or other? Have you tried to handle it directly with the AOO/LO?
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
JeJe
Volunteer
Posts: 2784
Joined: Wed Mar 09, 2016 2:40 pm

Re: Can I simultaneously write on notepad.exe with macro?

Post by JeJe »

If you type - visual basic 6 send text to notepad - into google it gives you some code.

OOBasic is similar to VB6 - but VB6 has a much bigger code base, where you can find solutions for things like your question.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
musikai
Volunteer
Posts: 294
Joined: Wed Nov 11, 2015 12:19 am

Re: Can I simultaneously write on notepad.exe with macro?

Post by musikai »

I would recommend the notepad alternative Notepad++
https://notepad-plus-plus.org/
It allows to have a txt opened without being locked.
So you could export your logs into a txt file that is always opened in notepad++.
Win7 Pro, Lubuntu 15.10, LO 4.4.7, OO 4.1.3
Free Project: LibreOffice Songbook Architect (LOSA)
http://struckkai.blogspot.de/2015/04/li ... itect.html
User avatar
Lupp
Volunteer
Posts: 3553
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Can I simultaneously write on notepad.exe with macro?

Post by Lupp »

I personally would avoid to depend on "third-party-software" in such a case. Why not write the logging data into an .ods sheet which later can be saved (exported) to plain text in .csv style?
On Windows 10: LibreOffice 24.2 (new numbering) and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Can I simultaneously write on notepad.exe with macro?

Post by RoryOF »

Lupp wrote:I personally would avoid to depend on "third-party-software" in such a case. Why not write the logging data into an .ods sheet which later can be saved (exported) to plain text in .csv style?
Or modify the timed backup code to Save the document as plain text and intercept the Save function to cause the modified timed backup code to be used instead?
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
sokolowitzky
Posts: 103
Joined: Mon Sep 15, 2014 7:34 pm

Re: Can I simultaneously write on notepad.exe with macro?

Post by sokolowitzky »

Thanks all for suggestions, informations...
The reason I prefer notepad is because this program uses very little of ram and cpu power. The sheets that I use have many complex formulas, like indirect&address, index&match, offset&range... so it takes a lot of power from the computer. So I thought if I can use the notepad it won't affect the main task's performance.
Win10-OpenOffice 4.1/LibreOffice 7.4
User avatar
Mr.Dandy
Posts: 427
Joined: Tue Dec 11, 2012 4:22 pm

Re: Can I simultaneously write on notepad.exe with macro?

Post by Mr.Dandy »

Create a TXT file
Open it through the shell with Notepad
OpenOffice 4.1.12 - Windows 10
Post Reply