topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Wednesday March 18, 2026, 5:24 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Recent Posts

Pages: prev1 ... 28 29 30 31 32 [33] 34 35 36 37 38 ... 146next
801
Post New Requests Here / Re: Manipulate lines in a txt file
« Last post by Ath on February 18, 2017, 04:18 AM »
There are other issues with these type of free texts, the (short) example contains shortened words like St. and Dr. that cause excess line-breaks to be inserted. These can be fixed by adding another step to the Notepad++ recipe:
Step 3: (Restore shortened words with their second part)
Find what: (St\.|Dr\.)\n
Replace with: \1
Press Replace all button

If more shortened words are found, add them to Find what within the round braces, prefixed with a vertical pipe, like this for adding "Mt.":
(St\.|Dr\.|Mt\.)\n

NB: This won't (can't) work with PSPad! because of the limitations of Find & Replace.
NB2: I haven't found a way to keep the lines with a single period yet, but don't know if that's desired/required?

Also added to the the Notepad++ solution, above.
802
Post New Requests Here / Re: Manipulate lines in a txt file
« Last post by Ath on February 18, 2017, 03:23 AM »
Updated: Don't use PSPad for this operation, as it doesn't have a powerful enough Find & Replace operation, use NotePad++ or EditPad Lite (both free) instead.




Well, I also tried to run this with PSPad, but Find & Replace is quite less powerful than Notepad++ in this area (and even buggy, IMHO).
Open Find & Replace (Ctrl-H)
Regular Expressions needs to be checked, and I chose Direction: Entire scope
Step 1 needs an adjustment:
Replace: $1
Step 2 needs an no adjustment:
Replace: $1\n
Step 3 above can't be performed using PSPad.

Step 4 needs to be added for removing empty lines:
Choose Edit/Lines manipulation/Remove Blank Lines (Alt-E,N,M)
Voila :-\

NB: There are several reasons I dropped PSPad many years ago in favor of Notepad++, this is one of them.
Edit: Do not use PSPad for these operations. Alternatives mentioned.
803
Post New Requests Here / Re: Manipulate lines in a txt file
« Last post by Ath on February 18, 2017, 02:54 AM »
4 line
Según el autor de este artículo, Kent fue el creador directo de su Repertorio, mientras que sus otros escritos, fueron una recopilación de los apuntes o notas que sus alumnos tomaban durante las clases que él dictaba.

This is not such a good example, as it has only 1 period, so the entire line is removed in step 1...
804
Post New Requests Here / Re: Manipulate lines in a txt file
« Last post by Ath on February 18, 2017, 02:49 AM »
So I only have to trim the left and delete any empty line after deleting the first phrase of each line.
This is very easy with pspad, and I suppose too with notepad++
Hm, you didn't say you wanted to store the intermediate result too.
A small addition to step 1 would fix that:
Updated step 1:
Step 1: (Remove all first phrases, trim any leading white-space from the remaining part)
Find what: [^\.]*?\.\s*(.*)
Replace with: \1\n
Press Replace all button

I updated the original post for this Notepad++ solution.
805
Post New Requests Here / Re: Manipulate lines in a txt file
« Last post by Ath on February 17, 2017, 01:39 PM »
See below, Reply #18, for a better working, 4 step, solution, using NotePad++


Here's a '3-step' Notepad++ solution:

Settings for Replace dialog (Ctrl-H):
Search mode: Regular expression
. matches newline: Off (=not checked)

Step 1: (Remove all first phrases, trim any leading white-space from the remaining part)
Find what: [^\.]*?\.\s*(.*)
Replace with: $1\n
Press Replace all button

Step 2: (Replace all remaining phrases by the phrase and a new-line, removing any white-space in front of a phrase)
Find what: \s*([^\.]*?\.)
Replace with: $1\n
Press Replace all button

There are other issues with these type of free texts, the (short) example contains shortened words like St. and Dr. that cause excess line-breaks to be inserted. These can be fixed by adding another step to the Notepad++ recipe:
Step 3: (Restore shortened words with their second part)
Find what: (St\.|Dr\.)\n
Replace with: $1
Press Replace all button
Done :D

If more shortened words are found, add them to Find what within the round braces, prefixed with a vertical pipe, like this for adding "Mt.":
Find what: (St\.|Dr\.|Mt\.)\n

Remember: It replaces the file-contents, so either work on a copy or use Save as... if the original file needs to be preserved.

PS: Tested using Notepad++ 7.2.2 and EditPad Lite 7.5

NB: please report how it's working for your file(s) so the thread can be moved to Resolved when satisfactory.

Edit: Updated step 1 to remove leading white-space of the remaining text.
Edit2: Added step 3 to restore 'unintended' line-breaks after shortened words like Dr., St., etc.
Edit2: Replaced \1 substitutions by more generic $1.
Edit2: Also tested with EditPad Lite. PSPad isn't capable of doing step 3, so I'd advise to not use PSPad!
Edit3: Superseded by a better 4 step solution, see below, Reply #18
806
Post New Requests Here / Re: Manipulate lines in a txt file
« Last post by Ath on February 17, 2017, 10:07 AM »
In NANY 2014 there was TIMU by phitsc, but I couldn't get it to remove the first phrase or empty lines.

Just download awk (or gawk) for windows (command-line tool) and run it using the command I've shown above... :tellme:
807
Post New Requests Here / Re: Manipulate lines in a txt file
« Last post by Ath on February 17, 2017, 02:45 AM »
awk one-liner to get your original request, assuming period ('.') as a separator, ignoring the first phrase on each sentence, removing leading whitespace from each column and restoring the period after each phrase:
awk -F'.' '{for(i=2;i<=NF;i++) {$i=gensub(/^[ \t]*|[ \t]*$/, "","g",$i);if($i!="") print$i"."}}'
add this to process input.file to output.file (output.file is created/overwritten):
input.file >output.file
808
Post New Requests Here / Re: Manipulate lines in a txt file
« Last post by Ath on February 17, 2017, 01:34 AM »
Showing some actual data might help to provide the best solution. Knowing the separator between the phrases is crucial.

Simple: Do it by hand in a text editor. (Yes, that's time consuming, but simple)
Less simple: use sed or awk (both of these Unix command-line tools are available in a Windows version, or can be run using Cygwin)
809
General Software Discussion / Re: Windows 10 Announced
« Last post by Ath on February 14, 2017, 10:44 AM »
If you turn it on and leave it alone for a few hours, it will update itself. You can 'force' it (read: expedite it somewhat) to update by going to the relevant Settings page and pressing the Check Now button.
810
I did test SCREENSHOT CAPTOR VERSION 4 https://www.donation...hotcaptor/index.html but I wasn't able to do it (the automatic page "down/up" did not work - win8.1 64) !

Have you let SCC try all methods of scrolling it supports? (Assume you have, but just asking to be sure)

A similar request led to the development of my WinSendKeys tool, though that doesn't do the OCR, but only the pagedown action
811
General Software Discussion / Re: Windows moving around after monitors wake up
« Last post by Ath on February 08, 2017, 08:52 AM »
812
General Software Discussion / Re: Windows moving around after monitors wake up
« Last post by Ath on February 04, 2017, 12:24 PM »
While swapping out monitors, did any if them end up being connected by displayport? Last time that was the 'cause' :-[
813
Clipboard Help+Spell / Re: CHS v2.39.0 portable on VM
« Last post by Ath on February 04, 2017, 12:15 PM »
It seems that CHS portable (v.2.39) when 'installed' on VM does not capture the clipboard from the host-pc.
Why would you expect it to? Without special techniques it's pretty hard to see keystrokes on a VM host from inside a VM. The fact ctrl-c/ctrl-v outside to inside a VM and the other way around works is because the vendor explicitly implemented that. It does not mean any keystroke is shared, in fact it would make the VM totally unusable if all host-keystrokes would also end up in the VM.
814
Living Room / Re: Looking for smartphone
« Last post by Ath on February 02, 2017, 10:36 AM »
@kalos: Is that phone on Android 5? In that case upgrade to 6 ASAP, if possible, I had similar issues on an original Nexus 5, and it is related to the power-management kicking in too long/not waking up when needed. It went away when I upgraded to Android 6.

If it's already upgraded to Android 6 then it could still be a power management issue, you could turn it to a lesser degree/level of power management, or turn that off.
815
N.A.N.Y. 2017 / Re: NANY 2017 post your mug photos here
« Last post by Ath on January 25, 2017, 02:27 PM »
Compared to my feet they're not that big ;D

tmp_20170125_212246-2022794738.jpg

I ordered both models to complete my partial collection (I'm a late starter sometimes :P)

(I'll rotate it when I'm at a PC)
816
Skwire Empire / Re: Release: sWeather (tray-based weather app)
« Last post by Ath on January 25, 2017, 09:44 AM »
It is still the Yahoo service playing havock with all its users >:(
It seems that the server hosting the service is in a bootloop, providing service for a few minutes and then restarting all over again :down:
817
Living Room / Re: Text editor - macro - multiple regex find and replaces
« Last post by Ath on January 23, 2017, 09:54 AM »
818
Screenshot Captor / Re: Performance issue
« Last post by Ath on January 20, 2017, 05:16 AM »
What AV package is installed? Some are very suspicious of screen-shot-taking applications.
819
Skwire Empire / Re: Release: sWeather (tray-based weather app)
« Last post by Ath on January 13, 2017, 01:08 PM »
Well, the Yahoo service has been very flaky for several weeks now, where earlier sWeather just refreshed fine. I'm also hoping that Yahoo gets its act together and just serves the data stable.
820
Screenshot Captor / Re: ScreenshotCaptor - Auto Capture modes
« Last post by Ath on January 12, 2017, 01:40 AM »
I suspect it include some well thought strategies for preventing data extraction.
That sounds like the most viable cause. Not much to do about that then :(
821
Screenshot Captor / Re: ScreenshotCaptor - Auto Capture modes
« Last post by Ath on January 10, 2017, 03:20 PM »
Not to downplay your enthusiastic use of Screenshot Captor, but wouldn't grabbing a list of items from a scrolling window be easier using NirSoft's SysExporter? (freeware). Except maybe if it's a .NET/WPF application, that uses non-standard controls that most low-level tools like SysExporter don't handle/support.
It will save you the errors that are bound to happen when OCR-ing images to text, and gain 'some' time in the extraction process.
822
N.A.N.Y. 2017 / Re: NANY 2017: Feast Day / Fast Day (Android)
« Last post by Ath on January 09, 2017, 01:42 AM »
What version of the API did you target when you made the APK? Android 5.0 is API 21. So if you targeted anything >21 it would say it wasn't compatible with Android 5.0 or below.
I've been running it on my Android 4.x tablet from the start (API 15/16 or so), so Android version compatibility doesn't seem to be an issue here.
That I couldn't install this (and other direct-download apps) on some occasions has to do with me running a 'screen overlay' app (Twilight), that explicitly needs the Android Installer to be excluded or the installer won't allow to install apps... (security feature! the screen-overlay app was too late/slow in temporarily disabling itself in time) Nailed that by buying a new tablet 8) the old one was old (2012) and slow, and now all is fine.
823
General Software Discussion / Re: Change to prefixed backgrounds at prefixed time
« Last post by Ath on January 08, 2017, 10:24 AM »
Well, imho, Workrave has quite a lot more options, such as a time after which any work is prohibited, as was asked in the OP, Instant Boss doesn't have that afaics. And the lovely sheep, ofcourse :D
It's just a bit worring that development of Workrave seems to have halted, as there haven't been updates for several years.
824
General Software Discussion / Re: Change to prefixed backgrounds at prefixed time
« Last post by Ath on January 08, 2017, 05:56 AM »
But, when working in an application or two, my desktop is usually covered with several open windows. How would you be able to see the change in background color and/or text :huh:
I think that using WorkRave (I've used it for several years) is the only real solution to your 'problem'.
825
N.A.N.Y. 2017 / Re: NANY 2017: Progress Bars of Life Android
« Last post by Ath on January 07, 2017, 09:44 AM »
Yup :Thmbsup:
Pages: prev1 ... 28 29 30 31 32 [33] 34 35 36 37 38 ... 146next