Jump to content

Process manegment

- - - - -

  • Please log in to reply
2 replies to this topic

#1
CrazyVB

CrazyVB

    Newbie

  • Members
  • PipPip
  • 20 posts
Ok, so I'm working on this program that works like so:
-opens google chrome(or any other internet program)
-automaticly writes something in the searchbar and clicks the first result
-searches for a file
-it download's the file


The green is what I have done and the red what I couldn't do.

I need some help on the red things, I was thinking aboult the program moving the cursor but that would be realy hard for me, so if i could make something like this:
---something like this---
[COLOR="blue"]Dim[/COLOR] chrome [COLOR="blue"]As[/COLOR] 'the chrome process or something'

chrome.[COLOR="green"]textbox1.text[/COLOR] = [COLOR="#a0522d"]"the file"[/COLOR]

[COLOR="green"] 'textbox1 is ment as searchbox'[/COLOR]

Searchbutton.PerformClick()

'and so on...'

------------------------
I realy need help with this,
CrazyVB

----------------------------------------------
Evrything is possible...

#2
fayyazlodhi

fayyazlodhi

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 405 posts
Why don't you try doing it from something like command line rather than the entire Browser GUI?

i.e. you write any http get request to google with the search bar content in it, you would receive an http response followed by links in order. I am sure parsing text string to extract first entry is much easier than automating a physical GUI usage.

If knowing about http get and response confuses you, my simplified answer is, command line browsers do exist. With a little effort you would be able to find the exact request in text that is sent when you search a term in google. So you should program your code to send that and parse the response.

This completely eliminates worrying about opening up a GUI browser and behaving like a robot is using it and locating the links on the screen. That is the way it is done pro grammatically and should be followed.

#3
fayyazlodhi

fayyazlodhi

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 405 posts
Again this would apply to file download too. Use FTP commands from with in your program to get the file, rather than worrying about some thing like "Right click on GUI link, save and store the file locally by automating UI"




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users