Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Move mouse to text (not link) on html page


  • Please log in to reply
8 replies to this topic

#1 GlennRogers

GlennRogers

    Seeker

  • Active Members
  • 22 posts

Posted 21 September 2013 - 10:56 PM

Hi everyone. Was just wondering if i could get pointed in the right direction for a solution to my problem. I have read alot in the _IE function library but still not really sure the best way to do it.

 

My work uses a web based management system and on a certain page there is a table. I want a script to copy to the clipboard a certain item number that I input, either via a GU input field or just by using CRTL + F.

 

 That part I can manage but then I want the script to select the value in the adjacent row which is the number of units. Not sure if i need to somehow move my mouse to the selected item number then move it right a certain distance or if there is some other handy trick to do it easily. also the column with the units is displayed like   " 12 units "  However all i want to copy from that cell is the numeric value " 12 " . Any help would be greatly appreicated. Thankyou.









#2 JLogan3o13

JLogan3o13

    115 and holding

  • MVPs
  • 4,422 posts

Posted 22 September 2013 - 01:03 AM

My work uses a web based management system and on a certain page there is a table. I want a script to copy to the clipboard a certain item number that I input, either via a GU input field or just by using CRTL + F.

 

 That part I can manage but

 

Let's start with this part. You say you can manage copying a certain item number from the table to the clipboard. How about posting what you have, so we can see what you're doing. If you're already able to get the data out of one range in the table, why can't you obtain the data from the adjacent range?


If you put a million monkeys on a million keyboards, one of them will eventually write a Java program. The rest of them will write Perl programs.

 

My Scripts: SCCM UDFInclude Source with Compiled Script, Disk Maintenance for Windows XP, "Deal-A-Day" Sites, Windows Firewall UDF


#3 GlennRogers

GlennRogers

    Seeker

  • Active Members
  • 22 posts

Posted 23 September 2013 - 12:28 AM

Hi Jlogan. Im using the AU3 record program to simply send the keystrokes for CRTL+F and find the item number. Haven't figured out how to do it by inputing that item number via a GUI. I've looked into ControlClick()  ,   _IEpropertyget and a few others but not sure which is the right one to use.



#4 GlennRogers

GlennRogers

    Seeker

  • Active Members
  • 22 posts

Posted 23 September 2013 - 02:28 AM

i really need help lol



#5 GlennRogers

GlennRogers

    Seeker

  • Active Members
  • 22 posts

Posted 23 September 2013 - 02:36 AM

#include <INet.au3>#include <IE.au3> Local $oIE = _IECreate("www.yahoo.com", 1) _IELoadWait($oIE) $page = _INetGetSource("http://au.yahoo.com/?p=us") WinSetState("[CLASS:IEFrame]", "", @SW_MAXIMIZE) $pageArray = StringSplit($page, @CRLF) For $i = 1 To $pageArray[0]    If StringInStr($pageArray[$i], "party") Then _IEAction($pageArray[$i], "click") Next

Here I'm trying to get it to open up yahoo.com then find the text word "party" in the html then click it or ideally move the mouse there.



#6 GlennRogers

GlennRogers

    Seeker

  • Active Members
  • 22 posts

Posted 23 September 2013 - 10:39 PM

Hi everyone. Was just wondering if i could get pointed in the right direction for a solution to my problem. I have read alot in the _IE function library but still not really sure the best way to do it.

 

My work uses a web based management system and on a certain page there is a table. I want a script to copy to the clipboard a certain item number that I input via CRTL + F.

 

 That part I can manage but then I want the script to select the value in the adjacent row which is the number of units. Not sure if i need to somehow move my mouse to the selected item number then move it right a certain distance or if there is some other handy trick to do it easily. also the column with the units is displayed like   " 12 units "  However all i want to copy from that cell is the numeric value " 12 " . Any help would be greatly appreicated. Thankyou.

 

below is the piece of html im trying to get to. 130009 being the item number

<td class="odd"  primarykey=" "  align="left"  id="000428491" ><a name="CARTON_DTL__SKU_ID"  original_value="130009  " >130009  </a></td>


#7 Kidney

Kidney

    Universalist

  • Active Members
  • PipPipPipPipPip
  • 294 posts

Posted 23 September 2013 - 11:38 PM

i wouldnt do anything with mouse clicks. you can do it all through the page source. thats what i would do. it will also be very easy to get the adjacent item number since it looks like it could be set up as a data table. if you get the page source, you can do a stringinstr for original_value=" or do a StringRegExp like this:

StringRegExp($sHTMLSource, "original_value="\d\d\d\d\d\d", 1)

as long as the item numbers r always 6 digits, this will give you all of the item numbers in the table.



#8 Melba23

Melba23

    I'm old - what's your excuse?

  • Moderators
  • 22,018 posts

Posted 24 September 2013 - 07:00 AM

GlennRogers,

How about sticking to just the one topic at a time. ;)

Threads merged. :)

M23
StringSize - Automatically size controls to fit text                                                               ExtMsgBox - A user customisable replacement for MsgBox
Toast - Small GUIs which pop out of the Systray                                                                Marquee - Scrolling tickertape GUIs
Scrollbars - Automatically sized scrollbars with a single command                                   GUIFrame - Subdivide GUIs into many adjustable frames
GUIExtender - Extend and retract multiple sections within a GUI                                      NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes
ChooseFileFolder - Single and multiple selections from specified path tree structure      Notify - Small notifications on the edge of the display
Date_Time_Convert - Easily convert date/time formats, including the language               GUIListViewEx - Insert, delete, move, drag, sort and edit ListView items

#9 nitekram

nitekram

    Ng1-Nf3

  • Active Members
  • PipPipPipPipPipPip
  • 1,871 posts

Posted 08 November 2013 - 02:37 AM

Did this work for your issue? I am looking to see if my web based form has a table, and will like to see your finished product.

2ยข

"Sometimes you have to go back to where you started, to get to where you want to go."  "Everybody catches up with everyone, eventually"  "As you teach others, you are really teaching yourself." all by me. From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow."

Windows_error.gif

How to ask a Question Forum SearchWIKI FAQ Tutorials Original FAQ - AutoIt Snippets - Multple Guis - Interrupting a running functionAnother Send StringRegExp StringRegExp Help RegEX TesterONLINE HELP UDF's Wiki AutoIt PDF AutoItSetOption Macros Wiki Arrays AutoIt Snippets WrapperAutoit Docs SCITE SciteJump - BB MyTopicsProgramming UDFs AutoIt_101 UDFs Form - UDFTutorial - Tutorials - Documentation - IE.AU3Games? - FreeSoftwarePath_Online

 

Spoiler




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users