Jump to content

Can Autoit do this? - (Moved)


Recommended Posts

I have a very large file of text on a remote computer that I can only access via the internet using a browse.  I can not just down load the file, as much as I would rather do.

When I open this file in a window of my browser my starting text is shown, but to see more of it I have to mouse click on the word More at the bottom of that page to get the next page displayed.

When I have a long text comment, I will have to mouse click on the words See More to get the rest of the text displayed.

I can run a program in the console of the browser while the text is displayed.  A fellow gave me some java script code to try and run to click on the words More and See More as the appear in the text display, but they didn't work. 

The host computer has connection problems and often will drop the connection with the error message of "error-connection-retrying", but many times the display just freezes.

I've found after testing 6 different browsers that EDGE seems to be he best at dealing with the dropped connection and getting a reestablishment of the connection.

I'm not a programmer so I am a good bit overwhelmed at trying to learn AUTOIT.

Can anyone point me in the right direction to start using this and what commands will look for the More and See More words and issue a mouse click to click on them as they appear in the text being displayed while the console is open?

I can copy and paste several examples of the file with the words that need a mouse click if that would help to make a suggestion.

 

Thank You.

Pat

 

 

Link to comment
Share on other sites

look, honestly, unless you’re looking to get into programming this might not be worth your while.

however, here’s one thing to try to maybe make things better.  Change the zoom level of the edge browser to the smallest possible size you can deal with.  you can also change the font size.  you could also zoom it down lower than you can read it, and then save the page (or page source) to a file.

B3C3B283-F151-42BA-A462-E80BF6EB791C.thumb.jpeg.b6ca0d75906031e9b24c343d3aba5980.jpeg

Code hard, but don’t hard code...

Link to comment
Share on other sites

Seeing you are transferring the contents of the file to your browser (with all the problems and transmission problems that entails), why not transfer the entire file direct to your program using a robust error correcting protocol, and massage it from there?

Can you modify your Javascript code to bypass the -more- functionality and not have to use AutoIT3 at all?

Post some code so we can see what you are attempting, and can help some more.

Link to comment
Share on other sites

13 hours ago, RetiredGuy said:

"Check Inet* functions instead."

I don't have any idea what that is, or where it would be used.  Can you explain a bit?

Thanks.

Open help file, go into Function Reference, look inside of Network Management.  In that section there is a few Inet* functions.  (You may be interested in InetGet).

Post some code if you need more help.

Link to comment
Share on other sites

The web site containing my Comments text only has one way to look at and copy any of my data and that is to open my file on their remote computer and move through the file until I get to where I want to copy something.  I can not downsize the browser to get more.  I can not ID the file structure so that I could use the "w get" utility in Linux Ubuntu.

I am stuck with paging down by hand and mouse clicking on the word "More" to display the next page.  I am stuck mouse clicking on the words "See More" to display any remaining text of a long Comment.

I have been reading the book on programing in AUTOIT and searching for code examples to try.  I am not a programmer as my employer never saw fit to send me to any classes.  I am retired now.  What follows is my attempt to write an AUTOIT script to look for the two strings of words and when found, mouse click on that string to open up the display.  I have to go through the end of the file so I can then go back myself and find the sections I want to copy and paste into my PC's word processing program.

Here is my attempt at a script, suggestions are most welcome:

$looksee = "See More"  ;Looking for that string in a Comment to display the rest of the Comment
$lookmore = "More"     ; Looking for that string to open an display next page of Comments
If $looksee = true      ;If string found left mouse click on it to open rest of Comment
then $mouse_click_left
Endif
if $lookmore = True      ;If string found left mouse click to open next page of Comments for display
then $mouse_click_left
Endif

There may be times when the remote computer has a break in communications with my PC showing it error message of "error_communication_retrying", but I just don't know how to handle that other to watch for it and of it doesn't restart automatically, I'd have to do the restart.

Thanks,

Pat

 

Link to comment
Share on other sites

Hi JackoDundee:

 

Here is a screen shot of the "More" word to click a left Mouse button on to display the next page:

But, the hackers have swooped in. Our personal, private and economic lives have been threatened. Our personal information has been stolen from business, including the credit bureaus, to our city, county, state and federal government organizations. Even our medical data in our doctors offices and hospitals can be fair game for the hackers. 
 
So, now we have AI, Artificial Intelligence, coming into play. With the continuing development of AI and adding it to the Internet is much like the Lemmings running toward that cliff. There are many organizations, business, military and government that should remove internet access to their computing environments. Our personal lives and data are much too important to be made available to some hacker in a Podunk country or nation like China or Russia. Already banks, credit bureaus, the Social Security bureau, the I.R.S., the federal Office of Personnel Management and state government like the Georgia state voter rolls have been cracked and our data stolen.  
 
We better start demanding that government at all levels remove access to our data from the internet hackers. And we better start taking an active investigation of where AI is proposed to go before it gets there. There is no telling what hackers could come up with to merge AI into their hacking for even greater "scores" which could harm us beyond any ideas we have no. 
 
 
 
                                                                                                                            More
 
Now here is a screen shot of the See More word to click ona left Mouse button to display the rest of the comment:
 
 
"“I think not having the estate tax recognizes the people that are investing,” Grassley said, “as opposed to those that are just spending every darn penny they have, whether it’s on booze or women or movies.”" 
That is just so much hot air. Not having an Estate tax is just helping the rich to become richer as each generation comes along and inherits from mom or dad. It has nothing to do with "recognizing" the rich who can invest even more now with lower individual income taxes and no threat of an Estate Tax when they die. 
 
"Orrin Hatch, who explained why, despite his support of a bill offering trillions of dollars in tax breaks to the wealthy and corporations, we absolutely must start slashing the social safety net immediately: “I have a rough time wanting to spend billions and billions and trillions of dollars to help people who won’t help themselves, won’t lift a finger, and expect the federal government to do everything.”" 
 
Hatch knows that these social programs are all designed to help people up and out of poverty. He knows that Social Security paid for the Paul Ryan and family to live after his father died. There are millions of Americans just like Ryan and his family who get help and get back on their feet. 
 
And yes, there are some people who will never get off of assistance. Even the Mormon Hatch must know this quote: "Matthew 26:11, The poor will always be with us." 
And this quote: "Matthew 25:40, 'Truly I tell you, whatever you did for one of the least of these brothers and sisters of mine, you did for me.'"  
 
So what would Hatch and his republican brethren rather have? Are we Americans to now be known as the nation that doesn't care for our own people?  
 
Do Hatch and the republicans also intend to cut out all Foreign Aid as we now have it and put millions of people around the world on the road to starvation and death?  
 
With Hatch and republicans I think we are seeing the rise of a generation of cruel, greedy, no sense of morals nor feelings. 
                                                                                                                  See More
 
 
 
 
 
 
Link to comment
Share on other sites

1 hour ago, RetiredGuy said:

Now here is a screen shot

These are not screen shots.  This is cut-and-paste.

Screen shots are images.  You use the Printscreen key to make one. Do you know how to do that?

Is the website a url that you can share?  Or do you know of a public one that looks exactly like it?

Code hard, but don’t hard code...

Link to comment
Share on other sites

image.thumb.png.a76bf0ba127fcf1238da5cdd6486e873.png

 

image.thumb.png.c084110be990ebf26fbee2632ad3478f.png

 

There are the two screen shots.  I don't see that these two are getting you any different or more info than what I gave you with the copy and paste, but I'm not really up on print screen except to use it when I could not get a copy and paste copy.

I would have to display the login & password info to access the remote computer my comments are on and I'd rather not do that.  There is no public access computer data like the one for my comments and anyone else who has a similar set up like mine who was writing comments on this sites news articles from the years 2010 to mid 2018, when the site created a new commenting system.

 

I have looked at the code behind my comments by opening the console, F12, and it's unintelligible and there is no way to even find my comments as is.  The display as you see in my copy and paste and the print screens is all there is.

Thanks,

Pat

Here is one with the "See More" in the middle of the page at the bottom of the comment to click on to display the rest of the comment:

 

image.thumb.png.ef3a2da2e8d65e00fc14f322e93d769f.png

 

 

 

 

 

 

Edited by RetiredGuy
Link to comment
Share on other sites

I'm continuing to try and write a code that will take care of the "More" and "See More" variables, without any success.  Here is the report from the compiler after I made another Variable called $mouse that i found in the help pages of the editor:

 

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=my12696.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
$looksee = "See More"
$lookmore = "More"
$mouse = “MOUSE CLICK LEFT”

After the line above on $mouse is this error message in a red line I could not copy that says:

\Users\tpk1\Documents\My12696code.au3" (6,10)  : errors: syntax error  (illegal character)

I don't have a clue what this means.


#include
MouseClick($MOUSE_CLICK_LEFT)
MouseClick($MOUSE_CLICK_LEFT)
If $looksee > 0
then $mouse_click_left
EndIf
if $lookmore > 0
then $mouse_click_left
EndIf

 

The 3 # statements were added by compiler.

I put in the #include because I found it in the examples for mouse click.

 

I said up front I'm not a programmer, but I am trying...........

Pat

Link to comment
Share on other sites

I'm continuing to try and write a code that will take care of the "More" and "See More" variables, without any success.  Here is the report from the compiler after I made another Variable called $mouse that i found in the help pages of the editor:

 

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=my12696.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
$looksee = "See More"
$lookmore = "More"
$mouse = “MOUSE CLICK LEFT”

After the line above on $mouse is this error message in a red line I could not copy that says:

\Users\tpk1\Documents\My12696code.au3" (6, 10)  :error: syntax error (illegal characters)


#include
MouseClick($MOUSE_CLICK_LEFT)
MouseClick($MOUSE_CLICK_LEFT)
If $looksee > 0
then $mouse_click_left
EndIf
if $lookmore > 0
then $mouse_click_left
EndIf

The 3 # statements were added by compiler.

 

As I said before, I'm not  a programmer so I'm just stumbling around.

Suggestions welcome.

Pat

Link to comment
Share on other sites

2 hours ago, RetiredGuy said:

$mouse = “MOUSE CLICK LEFT”

You used Unicode character ” (0x201D RIGHT DOUBLE QUOTATION MARK) instead of " (0x0022 QUOTATION MARK).

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

$mouse = “MOUSE CLICK LEFT”

What does this mean:  You used Unicode character ” (0x201D RIGHT DOUBLE QUOTATION MARK) instead of " (0x0022 QUOTATION MARK).  I am not a programmer so I'm guessing that the " after the word LEFT should be deleted??  If it's not that I don't have a clue.

 

 

 

Like
  •  

 

Link to comment
Share on other sites

The (wrong) character you used here ” is NOT the same as what you should have used ".

See that?   ” " ” " not the same!

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

Can anyone explain these error messages?  I keep going back to the book and the help files in AUTOIT and copying the examples and I still can not get it right.

here is my latest code attempt with the error messages:

"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /ShowGui /prod /in "C:\Users\tpk1\Documents\My12696code.au3"
+>17:50:35 Starting AutoIt3Wrapper (19.1127.1402.0} from:SciTE.exe (4.2.0.0)  Keyboard:00000409  OS:WIN_10/  CPU:X64 OS:X64  Environment(Language:0409)  CodePage:0  utf8.auto.check:4
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\tpk1\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\tpk1\AppData\Local\AutoIt v3\SciTE
-> 1 Change(s) made.
>Running AU3Check (3.3.14.5)  from:C:\Program Files (x86)\AutoIt3  input:C:\Users\tpk1\Documents\My12696code.au3
"C:\Users\tpk1\Documents\My12696code.au3"(8,21) : warning: $MouseClick: possibly used before declaration.
$MouseClick ("LEFT")
~~~~~~~~~~~~~~~~~~~~^
"C:\Users\tpk1\Documents\My12696code.au3"(11,19) : error: Statement cannot be just an expression.
"mouse_click_left"
~~~~~~~~~~~~~~~~~~^
"C:\Users\tpk1\Documents\My12696code.au3"(14,19) : error: Statement cannot be just an expression.
"mouse_click_left"
~~~~~~~~~~~~~~~~~~^
"C:\Users\tpk1\Documents\My12696code.au3"(8,21) : error: $MouseClick: undeclared global variable.
$MouseClick ("LEFT")
~~~~~~~~~~~~~~~~~~~~^
C:\Users\tpk1\Documents\My12696code.au3 - 3 error(s), 1 warning(s)
!>17:50:54 AU3Check ended. Press F4 to jump to next error.rc:2
+>17:50:54 AutoIt3Wrapper Finished.
>Exit code: 2    Time: 19.71

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...