Jump to content

Recommended Posts

Posted

Hi guys, 

I am really new to autoit and any sort of programming in general, so I apologize for any stupid questions in advance. 

I am trying to automate an extremely mundane process of getting data from excel and searching for it in a page in IE.

 

I have taught myself functions using the help in autoit but I am having real trouble trying to do what I would think would be really basic query. 

I am trying to paste data from the clipboard to a selected search box in IE. I have the following. (Sorry if this is hideous to look at)

 

Func getCIDNfromExcel ()

     WinActivate("[CLASS:XLMAIN]", "")
     Send("^c")
     Sleep(Random(1000, 8000, 1))
     WinActivate("[CLASS:IEFrame]", "")
     Sleep(5000)

EndFunc

 

Func SearchCIDN ()

      Global $CIDNsearch = _IEGetObjById ($oIE, "phSearchInput")
      Sleep(4000)
     _IEFormElementSetValue ($CIDNsearch, (" # "))

EndFunc

 

call("getCIDNfromExcel")
Call("searchCIDN")

 

I need that # to be basically Send ("^V") so that the data from the clipboard goes there.

I have used the help in autoit but just can not crack it.

Any help would be amazing. 

Thank you. 

 

 

 

 

 

Posted

_IEFormElementSetValue ($CIDNsearch, ClipGet())

Mate, You are a bloody legend.  I'm a little annoyed cause I had pretty much worked that out myself I was just doing it slightly wrong.

 

Thank you so much. 

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
  • Recently Browsing   0 members

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