Sign in to follow this  
Followers 0
Ries

Simple Script Help

3 posts in this topic

Ive created this script, and having small(BIG) problems to make it work like i want it.

What im trying to do, is when i press 8, it runs the script once. And reruns it every time i press 8.

I can only get it to run once, and it wont run again when i press 8

What are i'm doing wrong?

Thanks a lot to whomever gonna help me.

HotKeySet("8", "Main")

While 1

Sleep(100)

WEnd

Func Main()

HotKeySet("8")

Send("{ESC}")

Sleep(500)

send("{ESC}")

sleep(550)

MouseClick("left",1390,765,1)

Sleep(14000)

MouseClick("left",394,637,1)

sleep(900)

MouseClick("left",671,809,1)

sleep(900)

MouseClick("left",1515,1133,1)

sleep(900)

MouseClick("left",1106,850,1)

sleep(800)

MouseClick("left",324,552,1)

sleep(4000)

MouseClick("left",425,151,1)

sleep(2800)

MouseClick("left",425,151,1)

sleep(2800)

MouseClick("left",425,151,1)

sleep(2800)

Send("{SPACE}")

sleep(200)

send("{SPACE}")

sleep(200)

send("{SPACE}")

sleep(200)

send("{SPACE}")

sleep(1500)

MouseClick("left",1265,482,1)

Send("{SPACE}")

sleep(200)

Send("{SPACE}")

sleep(200)

Send("{SPACE}")

sleep(200)

Send("{SPACE}")

sleep(200)

Send("{SPACE}")

sleep(200)

Send("{SPACE}")

sleep(400)

Send("{SPACE}")

MouseClick("left",649,175,1)

sleep(3500)

Send("{SPACE}")

sleep(1000)

MouseClick("left",1096,489,1)

Soundplay(@WindowsDir & "\media\tada.wav",1)

EndFunc

Share this post


Link to post
Share on other sites



You have to set the HotKey again because you un-set it at the start of function main.

1 person likes this

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

@Ries

Please use autoit tags to insert your code.

When your function main is called, you kill the HotKey with this code :

HotKeySet("8")

You have to remove it, then the HotKey will work everytime you press the 8 key.

Br, 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

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