I'm noteven sure how to ask about it.. Lol...

The fact is... I have my own "autocliker" thing that i use to auto repost my itens to sell over the internet in specific sites.
So work this way.

I have around 40 advertising itens, and to keep'em update i use to delete them and create a new advertise very often. So i decided to create my own software to make this to me, it opens Internet, opens the site, it clicks in delete, delete my old advertising item, the it clics in "ADD Advertising" sendkeys write the "Title", TABS to new field, write description bla bla bla bla and finally clicks into Finish.
and i have in 10 seconds a new iten advertised. And it works like a charm!

So, the problem is, eveytime site changes, my mouse coords should changes too... And that's not all, for every new site i have to open my source code and edit it, hardcoding the mouse movements and save.

I did a small utility to record mouse clicks and its movements, so when i click it saves the positions, but i can't fuse it with my software, i mean. Part of my software is here:

Public Sub Add()
' Sub to call iexplore and this site
        Espera(5000) ' waits 5000 milsec 4 safe load
        MOV(996, 119) ' sub to moves and click in this coord
        MOV(410, 435)
        EnviarTecla("{TAB}") ' sub sendkey to switch fields
        EnviarTecla(TxTitulo.Text) ' sub sendkey ("my title")
        ' and this way it goes in a lot of fields
End Sub

I know its a gross code, but it's pretty functional, so there is a way to record my mouse click into a text file then this software read the new coords and text to write,?


5 Months
Discussion Span
Last Post by rvotri_1

The website must be going through a lot of compulsive changes, and updating your script every time must be annoying.

You can save your mouse coordinates in an .ini file (a kind of .txt file) and have the program read it. Reference: http://stackoverflow.com/questions/11238898/reading-from-an-ini-file

As for reading the text and then outtputing to the text field, see here: http://www.freevbcode.com/ShowCode.asp?ID=4492

Quick solutions:
You can also make copies of the same program with different coordinates saved in them if the website only "changes" at a small limited number of ways.


Ok.. I'm currently reading from ini... But, that's not the point i want, I want, if possible to read commands from this ini.
Or better... Read every line as a command, but using Ini Index, section etc.. So this way would be possible to every advertising have it own "command recipe" as follow...

For example:
1 - [1]
2 - SenKeys "My Add Title"
3 - MoveMouse "x,y"
4 - SendKey {TAB}
1 Section 1 Would be the Index
2 Sendkeys send those keys
3 Would move mouse to x,y pos
4 send keys again.

So, in another gross my app would do something like this:
If (part of) read_line = "Sendkeys" then
sendkeys "another part of line"
elseif (part of )ReadLine = MoveMouse then
MouseMove(coord x and y read from line)
End if

I mean, want to be able to read line, or at least, partial line as a comand and its instruction. Like a recipe, simple.
This way i would be able to open the "ini" file and mannualy edit the index relationed to the advertising.


Great, you said the answer yourself. Some new problems now are how you want your algorithm to look like and ease of user input.


Yea... I Figured it out... But i can't, yet, strip the line, to read part of code as a command and other as a parameter.
This is the question, how to read each line and how to strip this line... Plus would be cool to write this lines with my progam too...
My program already saves mouse movements and clicks, i'm thinking to use "getasynckkey" like in a keylogger to save all typed text too... But thats not the problem. The problem is to write and read this reccipe, this is what i need help...

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.