AutoHotkey Community

It is currently May 27th, 2012, 6:10 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: November 30th, 2005, 11:39 pm 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 1st, 2005, 12:07 am 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 1st, 2005, 12:08 am 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 1st, 2005, 12:59 am 
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?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 1st, 2005, 8:54 am 
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 ? :shock:

Gimme da link !


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 1st, 2005, 3:15 pm 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 1st, 2005, 3:41 pm 
Offline

Joined: December 15th, 2004, 10:24 pm
Posts: 303
Location: United States
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>>


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 1st, 2005, 4:05 pm 
Why not following the route of pain ? ImageSearch ! :D
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
      }
   }


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 1st, 2005, 4:14 pm 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 1st, 2005, 8:01 pm 
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.


Report this post
Top
  
Reply with quote  
 Post subject: Restore selecting
PostPosted: February 3rd, 2008, 3:09 pm 
Offline

Joined: December 20th, 2005, 4:15 am
Posts: 165
Location: Malaysia
"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


Report this post
Top
 Profile  
Reply with quote  
PostPosted: March 26th, 2008, 5:04 pm 
Offline

Joined: March 17th, 2008, 11:41 am
Posts: 15
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


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: HotkeyStick, Wicked and 58 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group