New Mars Forums

Official discussion forum of The Mars Society and MarsNews.com

You are not logged in.

Announcement

Announcement: As a reader of NewMars forum, we have opportunities for you to assist with technical discussions in several initiatives underway. NewMars needs volunteers with appropriate education, skills, talent, motivation and generosity of spirit as a highly valued member. Write to newmarsmember * gmail.com to tell us about your ability's to help contribute to NewMars and become a registered member.

#2401 2022-08-06 18:11:06

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 11,336

Re: Housekeeping

For SpaceNut ... my work on the Email Outreach campaign seems to have somehow interfered with the normal operation of the Trailbreaker script.  Since (about) 73201, the runs have been defective, although I haven't been able to find an explanation or a cause.

One possible explanation is that pesky F11 situation that can cause the browser to misbehave.

I'm going to reschedule Trailbreaker to re-run over 73201-73500 to see if the problem is still present.

I suppose I can take comfort in the fail safe mechanisms, which appear to have prevented updates.

On the ** other ** hand, the error reporting can definitely be improved.

Update at 21:19 local time ... I added a bit of documentation to the skip reports.  At this point I am mystified about what is going on.

This all started when I added a new command to support the Email Outreach initiative.  The new command has NOTHING to do with the Trailbreaker.

It's possible the browser was out of sync due to an F11 (full screen) activation ... that occurs occasionally when I used the laptop to enter a post and I type too quickly.

I'll keep adding documentation to the runtime displays until the cause is revealed.

(th)

Online

#2402 2022-08-07 08:05:48

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 11,336

Re: Housekeeping

For SpaceNut re Mysteries of working with Browser over live Internet

Just FYI ... I am redoing the past couple of days of work, to make sure that all posts are properly updated.

The interaction of WBA with the browser is made more difficult by the lack of feedback that we humans enjoy due to having vision.

I just ran through the procedure in manual mode, and noted (for the umpteenth time) that when I ask for an edit window, as the WBA program would do, FluxBB and the browser cooperate to obligingly put the cursor square in the upper left hand corner of the edit window.

I can ** see ** the cursor blinking in the upper left corner of the edit window, so I know the data was downloaded successfully.

However, when WBA is operating at full speed, it has no way of knowing if the Internet has conspired to delay delivery of the needed data.

I suspect that delays are causing the garbled text that I am seeing in skips.

There may be a way of asking the browser what it's status is, because the browser is a sophisticated software in it's own right, but my investigations of that possibility have mostly revealed how complex interactions with the browser are.   It is possible to write one's own browser, and in that event, it should be possible to know it's status.  However, my investigations of ** that ** option left me less than excited at the prospect of many more hours at the keyboard.

However, there ** is ** another option .... a web cam ** might ** be able to show the location of the cursor .... The web cam ** could ** be operated by WBA at run time, and (theoretically) it could be programmed to look for specific text on the screen, or specific locations of screen objects.

This would be a relative of OCR .... Knowledge of OCR techniques might be useful.

In the case of the mouse cursor observer .... the blinking of the cursor might be available as a signal .... the pixels assigned to "watching" the location of the cursor would "see" the blinking by periodic changes in the received signal.

Update a few minutes later ...

I asked Google for help, and it came back with this suggestion:

People also ask
How do I use my webcam for security monitoring?
Can I turn my webcam into a security camera?
Can you spy with a webcam?
Can I use my webcam as a motion detector?
Yawcam is completely free

Windows users will want to check out Yawcam, a free piece software that turns your webcam into a motion-sensitive security camera. You can also view live video over the internet, shoot time-lapse movies, and set it to upload images to an FTP server however you like.May 17, 2012

Motion detection is close to mouser cursor blink detection.

(th)

Online

#2403 2022-08-07 08:24:29

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 11,336

Re: Housekeeping

For SpaceNut re Post Repair initiative ...

As reported earlier, I am rerunning work for previous days due to more skip reports than usual.

The rerun of Inspector for 73501-73800 just finished ...

Completed Sequence for ID: 73800


Total Command Lines found: 30
Total input Lines in script: 182

  Number of ID's processed: 300

Starting Number: 73501

Last Number of Run: 73800

Summary for Web Automation Report for 08-07-2022 at 10:21:59
Average time of Loop from Main form: 00:00:20

Total time of Processing: 01:46:07

Total time Program was Active: 01:47:40


Potholes: Zero
Edits: Zero
Good run

OK ... I'll queue up Trailbreaker to cover 600 to cover yesterday and today.

Trailbreaker finished with a Green Screen, after being asked to process 600 posts.

It remains to be seen (of course) how things went !!!

Completed Sequence for ID: 74400


Total Command Lines found: 57
Total input Lines in script: 179

  Number of ID's processed: 600

Starting Number: 73801

Last Number of Run: 74400

Summary for Web Automation Report for 08-07-2022 at 16:50:01
Average time of Loop from Main form: 00:00:32
274 Skip Exceptions were recorded.

Total time of Processing: 06:22:08

Total time Program was Active: 06:24:38

Potholes: Zero
274 skips !!!

Good Grief!

Update after midnight local time .... a small adjustment to the Trailbreaker script seems to have helped.

I replaced a tab command with a mouse click.  The tab command seems to be unreliable, in the sense that it depends upon the browser setting up conditions so that a tab counts to the right destination.

The mouse click avoids uncertainty by landing in the area of interest with digital accuracy.

Here is a summary of a rerun of the Trailbreaker through 74400.


Completed Sequence for ID: 74400


Total Command Lines found: 60
Total input Lines in script: 192

  Number of ID's processed: 222

Starting Number: 74179

Last Number of Run: 74400

Summary for Web Automation Report for 08-08-2022 at 00:20:12
Average time of Loop from Main form: 00:00:38
3 Skip Exceptions were recorded.

Total time of Processing: 02:32:49

Total time Program was Active: 02:35:05

Potholes: Zero
Skips:
21 SpaceNut alerts so 7 posts ....

Tomorrow's Trailbreaker will try for 74700.

If that goes well, I'll attempt an Inspector run over the entire area where difficulties have interfered with progress.

That will be from 73001 through 74700.

(th)

Online

#2404 2022-08-07 09:54:45

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 11,336

Re: Housekeeping

For SpaceNut re problem of "reading" display on a monitor

In an earlier post, I reported that Google had found a utility program to "watch" a webcam to report movement. The application is primarily for security.

In thinking about that, I realized that if a program could "watch" a security webcam, then it could "watch" a browser screen.

The evolution of that line of thinking led to this request of Google:

How to read the screen pixels? - c++ - Stack Overflowhttps://stackoverflow.com › questions › how-to-read-th...
Apr 17, 2010 — If you're going to read a lot of pixels, then you're better off with a screen capture and then using GetDIBits .
5 answers

·

Top answer:
Starting with your code and omitting error checking ... // Create a BITMAPINFO specifying ...
Simple way to get pixel data of coordinate on screen in windows
Jan 9, 2015
C - how to read color of a screen pixel (FAST)? (in Windows)
May 24, 2017
Getting pixel color in C++ - Stack Overflow
Nov 8, 2011
C++ screen capture - how to read the bitmap? - Stack Overflow
May 15, 2018
More results from stackoverflow.com

Thread: Reading screen pixels fast - CodeGuru Forumshttps://forums.codeguru.com › showthread › 155712-R...
Oct 22, 2001 — Reading screen pixels fast. Hello, Here's what I'm trying to do: Let's say there's an application running on the computer.

How to Set Pixel Color & Get Pixel Color in C/C++ - YouTubehttps://www.youtube.com › watch

PREVIEW
7:54
Hola!!! Ohh... that's just Hello in Spanish! Anyways in this video I am going to show How to Set & Get Pixel Color form SCREEN in C/C++ ...
YouTube · Easy Programming · Nov 8, 2020

3 key moments in this video

c++ get screen pixels Code Examplehttps://www.codegrepper.com › code-examples › cpp
Queries related to “c++ get screen pixels”. c++ capture screen as pixel array · c++ display array as pixel on screen · c++ capture screen as ...
People also ask
How do I get pixels in C++?
How do I find the pixels of my screen?
Feedback

[HELP-CODE]Scanning Screen for pixel color - c++ - DaniWebhttps://www.daniweb.com › programming › threads › h...
Sep 27, 2009 — i use it for scanning for a certain pixel on the screen but it doesn't seem to be working... no compiler or runtime errors but it just skips ...
14 answers

·

Top answer:
This code is confusing, that's your main problem. I don't understand the need for POINT lame; ...

input from screen - C++ Forumhttps://cplusplus.com › forum › general
May 20, 2013 — input from screen ... not possible is it at least possible to read what's the state (i mean colors etc) of the pixel at a specific location?

A library for accessing screen pixels? : r/rust - Reddithttps://www.reddit.com › rust › comments › a_library_f...
Mar 20, 2022 — What library were you using in C++? C++ does not have a GetPixel function on its own.

I note the function name cited in the last line ... GetPixel

someone may have coded that, and ** possibly ** contributed it to an Open Source library.

The programming environment in which I am working supports multiple languages in a single executable module.

It is quite feasible to add a C++ function to the program.

How that would translate to a script command is unknowable at present, but I can imagine a Smart Wait for a Blinking Cursor at location x,y

That ** should ** solve the problem of not knowing when all data has been downloaded and presented on the browser screen.

(th)

Online

#2405 2022-08-07 09:57:22

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 11,336

Re: Housekeeping

For SpaceNut re investigation of how to "read" a screen from inside a program ....

Asking Google, once again...

GetPixel function (wingdi.h) - Win32 apps | Microsoft Docshttps://docs.microsoft.com › ... › Wingdi.h
Nov 4, 2021 — The GetPixel function retrieves the red, green, blue (RGB) color value of the pixel at the specified coordinates.

C++ (Cpp) GetPixel Examples - HotExampleshttps://cpp.hotexamples.com › examples › cpp-getpixel...
C++ (Cpp) GetPixel - 30 examples found. These are the top rated real world C++ (Cpp) examples of GetPixel extracted from open source projects.
People also ask
How to use GetPixel function?
How to Get pixel Color c++?
What is GetPixel function?
How to read Pixels of an image in C?
Feedback

getpixel() function in C - GeeksforGeekshttps://www.geeksforgeeks.org › getpixel-function-c
Jan 23, 2018 — The header file graphics.h contains getpixel() function which returns the color of pixel present at location (x, y). Syntax :

How to Set Pixel Color & Get Pixel Color in C/C++ - YouTubehttps://www.youtube.com › watch

PREVIEW
7:54
Hola!!! Ohh... that's just Hello in Spanish! Anyways in this video I am going to show How to Set & Get Pixel Color form SCREEN in C/C++ ...
YouTube · Easy Programming · Nov 8, 2020

3 key moments in this video

C++ Code Examples for get pixel - ProgramCreek.comhttps://www.programcreek.com › cpp › CodeExample=...
60 C++ code examples are found related to " get pixel". These examples are extracted from open source projects. You can vote up the ones you like or vote down ...

BGI Documentation for getpixelhttps://home.cs.colorado.edu › ~main › bgi › doc › get...
getpixel · Syntax: #include <graphics.h> unsigned getpixel(int x, int y); · Description: getpixel gets the color of the pixel located at (x,y). · Return Value ...

get pixel color values from image.png - C++ Forumhttps://cplusplus.com › forum › beginner
Jan 18, 2020 — As with any file, you need to open it either using a path relative to your program's working directory, or an absolute path. For example ...

Using GetPixel Function - C++ Forumhttps://cplusplus.com › forum › beginner
Jan 4, 2010 — I'm trying to make a program that will detect the pixel color in the center of the screen. This is what I have: ...

getpixel (winapi) [SOLVED] - c++ - Daniwebhttps://www.daniweb.com › programming › threads › g...
May 4, 2012 — COLORREF color; HDC hdc_ = GetDC(NULL); //get dc of whole screen color = GetPixel(hdc_, 10, 10); std::cout << color << endl;. That is the simple ...
7 answers

·

Top answer:
The COLORREF is a typedef of DWORD, which is a typedef of unsigned long, but you'd use a ...

I notice there is even an implementation for C#

(th)

Online

#2406 2022-08-07 16:42:40

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 11,336

Re: Housekeeping

For SpaceNut re Post Repair initiative and excessive skips problem ....

In the latest version of WBA, I added information to the skip report, and ** all ** the unexpected and unwanted skips were occurring at the point where I added a new double/triple check to make sure the data produced by the edit feature, and forwarded to the browser edit window, is ** exactly ** the same after arrival in the edit window as it was before.  I looked at the script, and I was only allowing one second of time for the paste to complete, before I checked it.

Clearly that was not enough time.  I increased the delay to three seconds and added a delay in addition to the one that was there, for a total of six seconds. The run time for an update is averaging 38 seconds now, which compares to the 34 seconds before the change.

I decided to rerun the Trailbreaker from the point where the skips began in this morning's run, so the current run is covering (about) 450 posts.

Hopefully the additional waits will help to give the system (laptop only in this case) time to settle down.

In addition, I asked Google for more help on the idea of checking the pixels on the browser screen where the blinking cursor is visible.

It appears that a function to check pixels is available, but it also appears I do not have the needed Software Development Kit installed.

While looking at ** that ** problem, I remembered that the function runs out of a DLL (Dynamic Link Library) that is part of Windows, and has been since at least Windows NT (circa 2000).

There ** is ** an option available ... calls to system DLL files can be made from any language, using the appropriate interface, so now I'm heading in the directin of finding ** that **.

(th)

Online

#2407 2022-08-07 18:22:31

SpaceNut
Administrator
From: New Hampshire
Registered: 2004-07-22
Posts: 26,331

Re: Housekeeping

The DLL have been around since the beginning of the operating systems registry and depending on the setting it could be thinking the operation is not what you would want it to do. The DLL's have also done some consolidating over the years and hide in the edit function in command prompt. In either case it is going to take a bit to find as it sounds from the new machines build.

The outreach that I had complained about came from what I had sent out a month ago. When I do write I like to let things set for that reason as to allow for a fresh frame of mind when reading.

This might work for a form letter content:

I am trying to reach out again for you; a past Member of NewMars a Mars Society Forum.

Like many others we make aspirational statements and claims for what we would like to see and how we can be part of that. Yet our resources are not up to the task at this point. All space groups suffer from the same problem. I guess what I'm trying to say is that we are trying to build here an organization you can believe in. An organization that will (eventually) reache all of its goals.

Because of the onslaught of thousands upon thousands of spammers over 20+ years, the decision was made to close off access to inactive accounts.  Unfortunately, the only mechanism available is the "banning" tool.  If you are an older member and you find your account has been banned, it has been locked to prevent hacker access.

We are also happy to welcome you a former member back into the active community.  It has been brought to my attention that a number of former members are marked as "banned".  In many cases, this marking is a limitation of FluxBB, which is the forum software.

For existing registered members who have lost your password ... If you remember the email address you used to register, you can request a recovery email at that address.  If you no longer have the email available (as could happen over 20+ years) just write to this email address.

Write to newmarsmember * gmail.com to tell us about your ability, if you cannot gain access to your old NewMars account to once more become an active member.

Your request will be forwarded to SpaceNut, who has the tools available to assist as needed.

With the section that was not required for an existing account removed.

Can anyone else think about what else it needs to say.

Offline

#2408 2022-08-07 19:06:25

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 11,336

Re: Housekeeping

For SpaceNut re Revised Outreach Email text

I've saved the revised text and will have it ready to   blend into the script when you are ready.

***
I'm online just now working on the problem I'm having with Trailbreaker...

No harm is being done, because the fail safes prevent it.  However, the program completed only a couple hundred posts before it went off the rails again.

I watched the failure for a while, to try to understand what is going on.

The tab seems toi have stopped working midway through the run.

That is the failure that occurs when F11 is accidently used, to set the screen to full screen.

I wonder (thinking out loud here ... ) if something in the text might cause accidental F11 status?

I'll restart the run at the point of failure, and I expect the program will finish.

Meanwhile, I'm researching the gdi32.dll, which (as you say) has been around for decades.

Finally, as I watched the misbehaving script, it occurred to me that if tab ** is ** the problem, the mouse click might be able to solve that particular problem, because the mouse can click anywhere in the edit window to be able to take control of it.

(th)

Online

#2409 2022-08-07 19:19:12

SpaceNut
Administrator
From: New Hampshire
Registered: 2004-07-22
Posts: 26,331

Re: Housekeeping

Depending on where the curser is for the open window a tab will typically move to the next link on the page from whatever is highlighted.
Try it on a page by highlighting a work on a page and then push the tab and watch where it goes. I was using that to help to get to an edit page whenever it was not visible for access on the screen for the post fix issues.

As far as the outreach start from A and keep going until we reach the end. We do not need to do many at any one time. This will allow for tracking of those that do log in as well as giving them a chance to respond if they can not.

Offline

#2410 2022-08-07 19:28:24

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 11,336

Re: Housekeeping

For SpaceNut re #2409

First, good suggestions to try to corral the failing tab ...

Second, the text you provided is saved and ready to be installed when you are ready.

Third, it sounds as though you are ready, and have a thought in mind of who you want to contact.

Rather than me making a guess, please create a query that does what you want and send me a copy.

The way this process works is:

1) I run a query per your specifications
2) The output of the query gets fed into a series of utility programs that delivers a list of user names.
3) The list of user names is then saved as an input file to WBA.
4) At run time, the email script is opened, and the data file with names is opened.
5) During a run, a script command pulls a name from the data file and uses it to send an email

The next step is for you to try various queries until you get just the people you want to contact.

You can have more than one list, if that is easier.

I agree that about 10 people a day would be a good number.  FluxBB wants the emails to be spaced out at least 60 seconds, so the script is set to wait 60 seconds between user names.

(th)

Online

#2411 2022-08-08 07:58:09

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 11,336

Re: Housekeeping

For SpaceNut ... re Post Repair ....

We seem to be back on schedule, after disruption over the past couple of days, due to changes I made to support the new Email Outreach campaign.

The changes that impacted Trailbreaker were in the area of tightening controls over operation, to further prevent error.

The changes had ** really ** subtle effects, that had me on the ropes for a while.

The symptom was failure of the script to update FluxBB with revised posts, but the cause was way back in the beginning (apparently) where I added a command to verify logged in status. 

In any case, Inspector just delivered a clean report for 1400 posts, from 73001 through 74400.

We are back on schedule, so today's run will try for 74700.

The replacement of a tab with a mouse click appears to have improved performance dramatically.

Hopefully today's run will be successful.

Trailbreaker finished a run to 74700 with a Green screen ... that is encouraging but not conclusive ...

details to follow ... there were three FluxBB rejects ... Inspector found them.

For some reason, Trailbreaker did not report them, but otherwise Trailbreaker seems to have completed 297 edits.

Tomorrow's Trailbreaker will try for 75000 ... just 3000 posts (or ten days) from the goal of 78000

(th)

Online

#2412 2022-08-08 11:48:23

NewMarsMember
Member
Registered: 2019-02-17
Posts: 640

Re: Housekeeping

For SpaceNut ... your edited text was applied to the email script.

I queued up a send to just you so you can confirm the editing.

Update later Monday:

The spreadsheet of member/user names came up fine, with a total of 1291 candidates.

This list needs to be pruned before we start sending emails.

As you saw by the response from RobertDyck, our active members are NOT going to appreciate receiving this.

Plus, there are names on the list that (I think anyway) we do NOT want to return.  There was a REASON why some folks were banned.

Let's think about how we might go about creating a list that tries to pull in folks we'd like to return, without causing distress to our active members.

In particular, I'd recommend removing one special person from the mailing.  If you want to let him know what we are doing, a direct email to him would be a better way to go about it, than an email asking him to return after a long absence.

We have four Admins .... it is possible everyone is too busy to help, but it can't hurt to ask.

(th)


Recruiting High Value members for NewMars.com/forums, in association with the Mars Society

Offline

#2413 2022-08-08 19:58:24

SpaceNut
Administrator
From: New Hampshire
Registered: 2004-07-22
Posts: 26,331

Re: Housekeeping

I deleted the 2 which were permanently banned by James but let the others in so that you would see them.

I think that those that have less than 100 posts will most likely not care and that is the majority of those that have come here in the past.

The list contains the current status of each profile.

There is no rush if all they do is log in and never visit again.

Offline

#2414 2022-08-08 20:46:27

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 11,336

Re: Housekeeping

For SpaceNut .... Re post #2413

Thanks for removing 2 from the original list ...

Please consider removing the names of everyone you do NOT want to receive this email

Our regular members and contibutors should NOT receive this email.

As you saw from the response of RobertDyck, there is a strong chance they have NOT been following this discussion, and will react negatively to receiving this particular text.

In addition, I recommend you consider removing such names as "HellRaiser" and "BornToLose" (if they are present).

Here's a thought .... you can add a column to your spreadsheet, showing the order in which you want the candidates to receive email.

That will give you a chance to rethink the criteria for selection. 

A member who has posted 2000 messages  and posted a message as recently as last week is not likely to appreciate the letter.

You may recall that I worked in IT in banking.  Frequently the marketing department would ask IT to prepare an automated mailing to our customers, inviting them to consider a new service.  The IT department had the responsibility to select the records of the customers, based upon the criteria established by the marketing department.  A co-worker lost his job due to setting up the selection criteria incorrectly.  In my mind, this outreach campaign is no different.  We want to touch ONLY those who might appreciate hearing from us, and we want to avoid sending a "please come back" message to our best customers.

(th)

Online

#2415 2022-08-08 22:30:15

SpaceNut
Administrator
From: New Hampshire
Registered: 2004-07-22
Posts: 26,331

Re: Housekeeping

clearly post 2389 and follow up 2391 shows that it was not read and how hard is it to really remove from the master list...I will send it tomorrow...

Offline

#2416 2022-08-09 06:27:17

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 11,336

Re: Housekeeping

For SpaceNut re #2415

Thanks for noting the message from RobertDyck (#2389) and the follow up (#2391)... #2391 was helpful because it was the first chance I got to see what the message looked like to a recipient.  Because of that feedback, I added vertical spacing which is now present in the text.

You're right that #2389 indicates that RobertDyck had not been following the Housekeeping topic, but I think that is not surprising.  I cannot imagine ** anyone ** reads the Housekeeping topic, other than the two of us.  What could possibly be more boring than daily progress reports on cleaning ancient posts?

Speaking of cleaning ancient posts .... Trailbreaker will reach 75000 today, if all goes well.

The goal of this marathon is only a few days away.

Regarding the email outreach campaign .... I'd like to suggest a slow and careful pace.... There is no reason whatsoever to hurry, and the risk of doing harm is significant, if we accidentally send a please-come-back message to a regular member.

I'd like to suggest a pace of no more than one person per day, and discussion of each candidate in this topic before we send an email.

Also! Some folks might appreciate a Thankyou-for-your-years-of-support message.  I can set up a separate script for that, and will simply have to pay attention to which script is going out. 

To start things out, please consider the text you might want to send to Executive Director James  Burk, who is present in your candidate list.

He is someone who has provided this forum with substantial support for many years, and has most recently provided the Professional Zoom service.

(th)

Online

#2417 2022-08-09 10:39:48

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 11,336

Re: Housekeeping

For SpaceNut re final stretch of Post Repair toward goal of 78000

Trailbreaker crossed 75000 today!  Only ten days remain before 78000 shows up in the Done window, if all goes well.

Completed Sequence for ID: 75000


Total Command Lines found: 60
Total input Lines in script: 192

  Number of ID's processed: 300

Starting Number: 74701

Last Number of Run: 75000

Summary for Web Automation Report for 08-09-2022 at 12:34:23
Average time of Loop from Main form: 00:00:38

Total time of Processing: 03:56:17

Total time Program was Active: 04:02:13

Potholes: Zero
Skips Zero - There were SpaceNut posts, but changes made recently appear to have caused the "skipping" messages to NOT appear in the log when the script encounters SpaceNut posts.

I'll run Inspector to find any FluxBB rejects that may have occurred.

Update at 12:55 local time .... Inspector is running with an ETA a couple of hours from now...

This next is an Inside Baseball item ... Posting just for the record...

Some time ago, and more recently, I have reported/commented upon the lack of feedback from a browser when operated by a program.

The program can read the address bar easily enough, and it can read a screen if the entire screen is captured to text.

However, it is the ** state ** of the screen has eluded me so far.

Recently, I rediscovered the benefit of using a mouse click to reach a button on the screen, because tabs are unreliable.

A fixed count of tabs is (can be) thrown off by changes in how the browser is operating, but a mouse click can be relied upon to hit a spot on the screen with decent/acceptable accuracy.

However, watching the mouse click in action brought to mind that it would be nice to know what the screen itself is doing at the moment the mouse click occurs.  If the wrong screen is under the mouse, it has no way of knowing.

It turns out that the software running on the machines involved in this operation include functions to examine the settings of individual bits on the screen.

Because I am working with state-of-the-art in 2008 as a base, it is helpful that the operating system can be (and is) updated with more modern components. It appears that while the software I am using does not include the more modern GetPixel function, there may be a way to reach the same goal by using a BitMap function.  At this point, I am still investigating what is possible, and the Post Repair operation may well be finished before a solution is found. However, I consider it worth while to investigate, because you may very well come up with some other need where it would be handy.

Update at 16:53 local time ... Inspector found one post that FluxBB didn't like...

(th)

Online

#2418 2022-08-10 12:04:30

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 11,336

Re: Housekeeping

For SpaceNut re Post Repair .... Trailbreaker finished and I'll check it shortly...

In the mean time, I've been stretching my knowledge in a new direction ... The need for improved feedback from WBA is leading me toward "seeing" the screen by examining individual pixels.  I wasn't sure that the ancient software I use is able to work with pixels, but happily, that capability is available.

The next challenge is to try to decode the sample programs that folks have offered over the years.  It appears that it might be possible to pull part of a screen into a bitmap, which is an object with features such that individual pixels can be set or reset.  In this case, I'll be happy if I can confirm that a desired form has loaded, which is currently not available using text-only tools.

I just printed a reply to a question: How to screenshot and save an image of a form.

This is quite promising.  I don't need to save the form.  I just need to be able to study it to confirm it is the right form, before proceeding to the next action.

At present, I am just hoping the right form is showing, and depending upon downsteam failure checks to discover an error.

This crude system has been working for the past year, but the Email Outreach campaign is about to start, and I'd like to have better knowledge of what the program is doing.  Ancient posts are one thing, and emails to current or previous members are another.

Update at 15:00 local time...Trailbreaker reached 75300

Completed Sequence for ID: 75300

Total Command Lines found: 60
Total input Lines in script: 192

  Number of ID's processed: 300

Starting Number: 75001

Last Number of Run: 75300

Summary for Web Automation Report for 08-10-2022 at 14:53:28
Average time of Loop from Main form: 00:00:38

Total time of Processing: 05:00:47

Total time Program was Active: 05:07:41

Potholes: Zero

Inspector will check for FluxBB rejects.  That is faster than sifting through the log.

Inspector found one post that FluxBB did not like. Corrected.


(th)

Online

#2419 2022-08-11 07:44:57

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 11,336

Re: Housekeeping

For SpaceNut re Post Repair initiative....

In late July, I posted a question on FluxBB.org, asking if there might be a way to know the length of a post sitting in the MySQL database.

Today I remembered to go back to look to see if anyone had taken up the question, and there was one reply.

The reply was an SQL statement that would pull the length property for a given table row.

I thanked the responder, and then explained that this operation is being carried out by personnel working at the Admin/Moderator level, so we are limited to the stored queries provided by FluxBB, such as login.php and edit.php.

Today's Trailbreaker will try for 75600.

Update at 13:19 local time ... Trailbreaker is close to 75600

Meanwhile, I copied code from the MousePositionTrainingUtility to see if the transparent form can capture screen pixels.

A sample program from StackExchange was able to capture pictures from the active screen, so it ** should ** be able to capture pixels from a designated window. I'm taking a break after completing the merge of the Mouse code with the Extract code, where I am exploring the pixel capture possibility.

Pixels have properties reported in four integers (0-255)(0-255)(0-255)(0-255)

Per Google:

Native Pixel Formats Overview - Win32 apps - Microsoft Docs
docs.microsoft.com › ... › Windows Imaging Component
Jan 7, 2021 · This topic introduces the pixel formats provided by the Windows ... When all four color channels are at maximum value, the result is black.

Also per Google:

PixelFormats Class (System.Windows.Media) - Microsoft Docs
docs.microsoft.com › ... › .NET API browser › System.Windows.Media
Properties ; Bgra32. Gets the Bgra32 pixel format. Bgra32 is a sRGB format with 32 bits per pixel (BPP). Each channel (blue, green, red, and alpha) is allocated ...

Since an Edit Window is displayed as white with black letters, I am hoping it will be (relatively) easy to differentiate a loaded Edit window from the tinted FluxBB screen that is present before the Edit window is shown.

Follow up ... Alpha is a measure of transparency .... I am using that field in the Mouse Position Training Utility.  The screen is set to a transparency of "just barely visible" so that the underlying screen (a browser window) is visible.  The mouse operates on the transparent screen without bothering the underlying browser window, so the position of the mouse cursor over the browser window can be read out on the Mouse Trainer window.

Update at 15:45

A test of capturing the browser screen from a transparent window appears to be a success.

In the next work session, I'll set up the code to run from a button, so it can be repeated while moving the inspection point. 

What I'm not clear on yet is whether the pixels captured in the bitmap are from the underlying screen or from the transparent screen.

Trailbreaker finished with a Green screen, no potholes and one post to edit.

The one post to edit looks fine ... it appears to have been garbled during download, so it doesn't need editing.

I'll run Inspector now to double check.

Regarding work on the Pixel Capture feature ... The signs are definitely encouraging that this idea is going to work. However, since I've never worked with pixels before, there's a bit more to learn. 

I'm hoping to be able to confirm that the edit window was loaded, before attempting to perform an operation on it.

As explained earlier, the address bar contains text that ** says ** the edit window was supposed to load, but it does NOT say the window actually loaded.

(th)

Online

#2420 2022-08-11 13:45:01

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 11,336

Re: Housekeeping

For SpaceNut re outage ....

Since you were at work, and NewMars is back up, you might not have known about the outage today.

Here is a set of quotes from right after the outage began:

Notes on database outage 2022/08/11 at 14:00 Eastern Standard Time

http://newmars.com/
Error establishing a database connection

http://newmars.com/forums/profile.php?id=159

An error was encountered
Error: Unable to connect to MySQL and select database. MySQL reported: Connection refused.

Trying marssociety.org
This site can’t provide a secure connection

www.marssociety.org uses an unsupported protocol.
ERR_SSL_VERSION_OR_CIPHER_MISMATCH

Later on:
http://newmars.com/forums/
An error was encountered
Error: Unable to insert into online list.

(th)

Online

#2421 2022-08-11 15:52:43

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 11,336

Re: Housekeeping

Both Trailbreaker and Inspector runs are complete, through 75600.

One FluxBB reject was reported by each.

Tomorrow's Trailbreaker will try for 75900.

(th)

Online

#2422 2022-08-11 18:59:01

SpaceNut
Administrator
From: New Hampshire
Registered: 2004-07-22
Posts: 26,331

Re: Housekeeping

I had a planned network outage that limited my time to scan the newmars topics at work, so I did not see it. Had files open working on them when it went down so had to save to the computer that I was using, which is not preferred but can be done since it's still not a virtual machine.

Good that you had clear sailing in the repairs.

Offline

#2423 2022-08-11 19:59:55

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 11,336

Re: Housekeeping

For SpaceNut re #2422

Thanks for your notes on the outage.  Glad you were able to save the files when the network went down.

We are just a few days away from the goal.  Trailbreaker is working smoothly.  I won't change a thing until we reach the goal.

***
However! I ** can ** report that my guess as to how to "read" the computer (browser) screen turns out to have been a good one. The transparent window can be set over the area of interest (ie, the Edit window) and it can report the contents of any pixel in the range.

I confirmed that a black screen shows as A(255)(0)(0)(0)  and a white screen (eg, Notepad) shows as A(255)(255)(255)(255).

Naturally, the color screens have different combinations, but since the Edit window is displayed with a white background, it it is present, it will be unmistakable, because any other screen (with color) will have color values less that 255.

However, as I say, since Trailbreaker is running so well at present, there is no reason to change anything.

However, for the email project, I'll add this new safety feature where it makes sense.

At this point, I am thinking about doing just one person a day.  that would stretch the job out over 3 years.

I'm thinking about reading the posts of each user before sending the email.

There are a ** lot ** with just one post, so not much time will be needed.

(th)

Online

#2424 2022-08-12 11:22:56

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 11,336

Re: Housekeeping

For SpaceNut re Post Repair initiative...

Trailbreaker reached 75900 with a Green screen

Things seem more _back to normal_ .... 9 Skip Exceptions were reported

Completed Sequence for ID: 75900


Total Command Lines found: 60
Total input Lines in script: 192

  Number of ID's processed: 300

Starting Number: 75601

Last Number of Run: 75900

Summary for Web Automation Report for 08-12-2022 at 13:05:40
Average time of Loop from Main form: 00:00:37
9 Skip Exceptions were recorded.

9 potholes were found
75832 75830 75826 75818 75817 75783 75766 75691 75689

Inspector will confirm the potholes, and report any FluxBB rejects

Update at 16:18 .... Inspector finished with a Green screen ... we are closing in on the goal of 78000!

Completed Sequence for ID: 75900


Total Command Lines found: 30
Total input Lines in script: 182

  Number of ID's processed: 300

Starting Number: 75601

Last Number of Run: 75900

Summary for Web Automation Report for 08-12-2022 at 16:20:24
Average time of Loop from Main form: 00:00:20
9 Skip Exceptions were recorded.

Total time of Processing: 02:54:30

Potholes: 9 confirmed
Edits: 75808
http://newmars.com/forums/edit.php?id=75808

That turned out to be a false alarm!  The post contains a url that includes a reference to color.

Tomorrow's Trailbreaker will cross 76000 to 76200

(th)

Online

#2425 2022-08-12 15:26:05

tahanson43206
Moderator
Registered: 2018-04-27
Posts: 11,336

Re: Housekeeping

For SpaceNut re Inside Baseball ... I can't imagine anyone else would be interested, and for ** you ** it would be a stretch ....

However ... with a view toward improving the accuracy of automated web updates, I've begin investigating the possibility of "reading' the pixels on the screen, to supplement reading "text" from the browser, such as the Address Bar and text from a screen scrape.

On the development machine, the new code worked fine.

However, on the production machine, with live data (one of my posts) in the spotlight, the program generated an error I'll now have to try to understand. 

Update a few hours later .... The failure reported in the quote below is a good example of a downstream failure caused by an upstream error.

I had ** thought ** the development machine and the production machine were/are identical, but in fact, there is a minor but critical difference.

The directory structures differ slightly, and the abend occurred because I was in a hurry to test the program, and postponed creating code to properly open the output file for the image to be collected for the screen snapshot.

Here is the tell-tale:

at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams)
   at System.Drawing.Image.Save(String filename, ImageFormat format)

I'll fix that tomorrow, and chances the program will run on the production machine will be improved.

Extract Report for 08-12-2022 at 17:11:31
  Generic Extract Lines Utility
Version 2022.8.9.1


Total Input Lines 1
Total Output Lines 11
  Lines containing String One
  Lines containing String Two
Lines containing String Three
Lines containing String Four
A problem occurred

A problem occurred alright!  There should have been a display of the properties of a pixel in the output.
Furthermore, there should have been an image file produced, showing the contents of area of screen of interest.

The development machine and the production machine are almost identical, both in hardware (32 bits) and software (Windows XP).  ** Something ** is different!

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
   at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams)
   at System.Drawing.Image.Save(String filename, ImageFormat format)
   at ExtractLinesGivenSearchString.ExtractLinesMainForm.StartSearchCommand_Click(Object eventSender, EventArgs eventArgs)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3655 (GDR.050727-3600)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
ExtractLinesGivenSearchString
    Assembly Version: 2022.8.9.1
    Win32 Version: 2022.8.9.1
    CodeBase: file:///C:/DataDell/ExtractGeneric3/ExtractLinesGivenSearchString.exe
----------------------------------------
Microsoft.VisualBasic
    Assembly Version: 8.0.0.0
    Win32 Version: 8.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3644 (GDR.050727-3600)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3645 (GDR.050727-3600)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3644 (GDR.050727-3600)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

Update the next day .... The Bmp.Save function is ** really ** picky.  it wants to create it's own file.

It wants a file name with the complete path, and the file must be unique.

When all those conditions are met, it will write the bitmap to the output file.

(th)

Online

Board footer

Powered by FluxBB