Sign in to follow this  
Followers 0
Best

Help in writing my first script

10 posts in this topic

Hello AutoIt scripters !

I am a beginner learning how to write AutoIt scripts, I have an experience using php and javascript,

I learn fast, so can you help me, please??

The Idea:

I have a website with visitors counter,

I want a script to:

0- Open Firefox.

1- enter my website.

2- copy the the numbers of the visitors.

3- paste it in a SMS form and press send button.

Ok.

the problem I cant figure out which codes to use,

and I want the mouse to copy the stat of my website.

Thanks AutoIt guys for opening The Auto World for me. :mellow:

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

start with this (replace "att" with your webpage:

Run("C:\Program Files\MOZILLA FIREFOX\firefox.exe http://www.att.com/")

Edited by alram

Share this post


Link to post
Share on other sites

Thanks man I appreciate it.

Can any one continue?

Share this post


Link to post
Share on other sites

Hi, can you be more clear about your SMS form ?

you can use send function for visitor

Send("Today 11 members connected")

Then copy the number of visitor

Clipput("11")

And paste it to you ctrl

Send(ClipGet())

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

use mousemove to position the mouse at the begining of the number

use MouseClickDrag to select

use mouseclick("right") to open menu

use send("{down}") to select copy

use run to open your doc

keep using mouse until you paste the number where you want it and send it

Share this post


Link to post
Share on other sites

Thanks So much Alram, this is what I want, but can you tell me what I have to write?? I am a newbie with these codes,

and I will apreciate it if you add a comment to each line of code, please??

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Hi again,

if you want to copy visitor from web site you have two solutions :

-read source code and you know the line of visitor number (for exemple line 28) and then you can do

FileReadLine("mypage.html",28)

And use String function for select number of visitor in the line

-Copy visitor from visite website with

MouseClickDrag(); Use button left of mouse
Send(^{C}); Copy what you have selected > CTRL+C

With au3info you can check pixel coords for mouse click or use mousegetpos()

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Ok guys, why you didnt understood me, I will explain :

0- I want to open fireFox.

1- Open My website. (www.sitename.com).

2- Using the MOUSE (I have the coordinates) : select the number of visitors and Copy It.

3- Open new Firefox Tab (www.Site.com).

4- Paste the number of visitors , in a sms forum and click SEND (I have the coordinates) .

THATS ALL.

Can you help please?? WITH Details??? please?? :mellow:

Share this post


Link to post
Share on other sites

Ok guys, why you didnt understood me, I will explain :

0- I want to open fireFox.

1- Open My website. (www.sitename.com).

Shellexecute(@programfilesdir&"\Mozilla Firefox\Firefox.exe","www.site.com")

2- Using the MOUSE (I have the coordinates) : select the number of visitors and Copy It.

MouseClickDrag("left",x1,x2,y1,y2) ; x are coords of first click and y are coords of the x to drag selection
Send(^{C}); copy the draged zone : ^ for ctrl and C for C key > ctrl+c

3- Open new Firefox Tab (www.Site.com).

same thing Q1

4- Paste the number of visitors , in a sms forum and click SEND (I have the coordinates) .

MouseClick("left",x,y); click to sms input with left mouse button
Send(ClipGet());Send clipboard

THATS ALL.

Can you help please?? WITH Details??? please?? :mellow:


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

OOOhhhhh,, I love FireFox, thanks than thanks a lot.

I will make the script and test it and I will tell what happend,

YOU ARE The MAN FireFox :mellow:

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0