AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

getting info off of a website and comparing it ?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Jamc
Guest





PostPosted: Wed Nov 30, 2005 10:39 pm    Post subject: getting info off of a website and comparing it ? Reply with quote

What I need is way to pull off a number 8 digits and compare it to a list of numbers in say a text file. The problem is that the website shows the number but you can not highlight it for a "copy" to say the clipboard. This is probably way over my head. But what I am trying to figure out is

How to copy an 8 digit number off of a website that doesn't allow you to copy and compare it witha list of numbers in a text file. So that if the number matches it will do one thing if it doesn't it will do something else.

Can that be done with this program and if so how?

Thanks
Back to top
MATUBUTU
Guest





PostPosted: Wed Nov 30, 2005 11:07 pm    Post subject: Reply with quote

I DONT KNOW ABOUT IF IT WILL WORK IF YOU CANT HIGHLIGHT THE TEXT, BUT TRY USING WINGETTEXT, OR CONTROLGETTEXT.

AS FOR COMPARING, YOU COULD USE A TXT FILE OR AN .INI FILE. AHK WORKS WELL WITH THESE. YOU CAN PRACTICALLY DO ANYTHING WITH WITH THESE KIND OF FILES.

FILEREADLINE AND FILEREAD WILL READ THE CONTENTS OF TEXT FILES. IF YOURE ABLE TO RETRIEVE THE TEXT, YOU CAN PARSE IT, AND COMPARE IT TO THE TEXT OR INI FILE.
Back to top
polyethene



Joined: 11 Aug 2004
Posts: 5248
Location: UK

PostPosted: Wed Nov 30, 2005 11:08 pm    Post subject: Reply with quote

Firstly, it can be done. There might be a few different ways to do it but the easiest is probabily to download the webpage with URLDownloadToFile and read it with FileRead. It's then just looking for the number with the string manipulation commands: StringReplace, StringTrimLeft, StringMid, IfInString and etc.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jamc
Guest





PostPosted: Wed Nov 30, 2005 11:59 pm    Post subject: Reply with quote

The controlgettext and the wingettext do not work but the urldownload does, but the information I am needing is not there. It is javascript so it must be in a child of the page.

Any other ideas?
Back to top
BoBo
Guest





PostPosted: Thu Dec 01, 2005 7:54 am    Post subject: Reply with quote

Quote:
but you can not highlight it for a "copy"
Sounds like an image is set to display that text/number. D'ya wanna bypass a "visualized" login confirmation ? Shocked

Gimme da link !
Back to top
Jamc
Guest





PostPosted: Thu Dec 01, 2005 2:15 pm    Post subject: Reply with quote

It is related to my job, its secured and youhave to have passwords. It must be a child of the parent program, It couldn't be an image because the numbers I am trying to retrieve are different every time with a host of other information that is also independent, and to top it all off you have maybe 1 second to decide.

I still have one more thing to try. I will let you know if it works.

Thanks
Back to top
Decarlo110



Joined: 15 Dec 2004
Posts: 303
Location: United States

PostPosted: Thu Dec 01, 2005 2:41 pm    Post subject: Reply with quote

jamc wrote:
It is related to my job, its secured and youhave to have passwords [...] the numbers I am trying to retrieve are different every time [...] to top it all off you have maybe 1 second to decide.

1 second to decide... It seems to me that serious security measures have been put in place for whatever reason. I do not think your company would greatly welcome your efforts to automation for the sake of mere convenience. While automation may help speed up inputs, the method(s) used seem to be the type of thing the security measures are intended to counter.
_________________
1) The Open Source Definition http://www.opensource.org/docs/definition_plain.php

2) Intuitive. Logical. Versatile. Adaptable. <<AutoHotkey>>
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Thu Dec 01, 2005 3:05 pm    Post subject: Reply with quote

Why not following the route of pain ? ImageSearch ! Very Happy
Code:

Loop, 9999
{
   4DigitNum ++
   SetFormat, Float, 04.0
   4DigitNum += 0.0
   ImageSearch,,, 40,40, 300, 300, C:\My Images\%4DigitNum%.bmp
   If Errorlevel = 0
   {
      MsgBox % 4DigitNum "has made it!"
      Break
      }
   }
Back to top
Guest






PostPosted: Thu Dec 01, 2005 3:14 pm    Post subject: Reply with quote

No it is not security related, it is sales related. You just have to be quicker than someone else.

Bobo, thanks for your suggestion I will try it.
Back to top
Guest






PostPosted: Thu Dec 01, 2005 7:01 pm    Post subject: Reply with quote

Quote:
the website shows the number but you can not highlight it


How does it show it? As text or as an image? Howcome you cannot highlight it? You cannot select it at all? If you can view the source of the page, please post it.
Back to top
Lemming



Joined: 20 Dec 2005
Posts: 165
Location: Malaysia

PostPosted: Sun Feb 03, 2008 2:09 pm    Post subject: Restore selecting Reply with quote

"Disable text selection" is actually a Javascript trick. So you can undo it with another Javascript trick.

Jesse Ruderman has exactly the code for that at his Bookmarklets site:
https://www.squarefree.com/bookmarklets/zap.html
The one you need is called "restore selecting".

Jamc wrote:
What I need is way to pull off a number 8 digits and compare it to a list of numbers in say a text file. The problem is that the website shows the number but you can not highlight it for a "copy" to say the clipboard. This is probably way over my head. But what I am trying to figure out is

How to copy an 8 digit number off of a website that doesn't allow you to copy and compare it witha list of numbers in a text file. So that if the number matches it will do one thing if it doesn't it will do something else.

Can that be done with this program and if so how?

Thanks
Back to top
View user's profile Send private message
TalkieToaster



Joined: 17 Mar 2008
Posts: 15

PostPosted: Wed Mar 26, 2008 4:04 pm    Post subject: Re: getting info off of a website and comparing it ? Reply with quote

Jamc wrote:
What I need is way to pull off a number 8 digits and compare it to a list of numbers in say a text file. The problem is that the website shows the number but you can not highlight it for a "copy" to say the clipboard. This is probably way over my head. But what I am trying to figure out is

How to copy an 8 digit number off of a website that doesn't allow you to copy and compare it witha list of numbers in a text file. So that if the number matches it will do one thing if it doesn't it will do something else.

Can that be done with this program and if so how?

Thanks


I have the very same problem, in my case it is on a game site some players "hide" behind ALT numbers wich all shows as a "."

For example êUserê shows as .User.

It would be nice to be able to copy the name from a window where it is displayed in "notextmark" mode (or whatever it is called...). And to get the ALT (ASCCI) code instead of the .

UrlDownloadToFile does not do it since this window is displayed by a sub program.

Greatfull for all hints

Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group