Sign in to follow this  
Followers 0
mikey88

progress bar or something

8 posts in this topic

can you insert some kind of prgressbar into this script,

with that i mean some kind of timer that show's you when script is going to loop?

; Press Esc to terminate script, Pause/Break to "pause"

Global $Paused, $Runner

HotKeySet("{PAUSE}", "TogglePause")

HotKeySet("{ESC}", "Terminate")

HotKeySet("{F9}", "ShowMe")

;;;; Body of program would go here ;;;;

While 1

Sleep(10)

WEnd

;;;;;;;;

Func TogglePause()

$Paused = Not $Paused

While $Paused

Sleep(10)

ToolTip('Script is "Paused"', 0, 0)

WEnd

ToolTip("")

EndFunc ;==>TogglePause

Func Terminate()

Exit 0

EndFunc ;==>Terminate

Func ShowMe()

$Runner = Not $Runner

While $Runner

Sleep( 10 )

MouseMove( 1868, 923 , 1 )

Sleep( 100 )

MouseClick( "left" , 1868, 923, 1, 1 )

Sleep( 900 )

MouseMove( 1016, 707,1 )

Sleep( 100 )

MouseClick( "left" , 1016, 707, 1, 1 )

Sleep( 900 )

MouseMove( 1163, 707, 1 )

Sleep( 100 )

MouseClick( "left" , 1163, 707 , 1 , 1 )

Sleep( 900 )

MouseMove( 1868, 923, 1 )

Sleep( 100 )

MouseClick( "left" , 1868, 923 , 1, 1 )

Sleep( 900 )

MouseMove( 751, 501 , 1 )

Sleep( 100 )

MouseClick( "left" , 751, 501, 1, 1 )

Sleep( 900 )

MouseMove( 1185, 452 , 1 )

Sleep( 300 )

MouseClick( "left" , 1185, 452, 1, 1 )

Sleep( 900 )

MouseMove( 907, 47 , 1 )

Sleep( 300 )

MouseClick( "left" , 907, 47, 1, 1 )

Sleep( 900 )

MouseMove( 1868, 923 , 1 )

Sleep( 300 )

MouseClick( "left" , 1868, 923, 1, 1 )

Sleep( 900 )

MouseMove( 1016, 707,1 )

Sleep( 300 )

MouseClick( "left" , 1016, 707, 1, 1 )

Sleep( 900 )

MouseMove( 1163, 707, 1 )

Sleep( 300 )

MouseClick( "left" , 1163, 707 , 1 , 1 )

Sleep( 1000 )

MouseMove( 1868, 923, 1 )

Sleep( 300 )

MouseClick( "left" , 1868, 923 , 1, 1 )

Sleep( 900 )

MouseMove( 751, 501 , 1 )

Sleep( 300 )

MouseClick( "left" , 751, 501, 1, 1 )

Sleep( 900 )

MouseMove( 1185, 452 , 1 )

Sleep( 300 )

MouseClick( "left" , 1185, 452, 1, 1 )

Sleep( 900 )

MouseMove( 1117, 49 , 1 )

Sleep( 300 )

MouseClick( "left" , 1117, 49, 1, 1 )

Sleep( 900 )

MouseMove( 1868, 923 , 1 )

Sleep( 300 )

MouseClick( "left" , 1868, 923, 1, 1 )

Sleep( 900 )

MouseMove( 1016, 707,1 )

Sleep( 300 )

MouseClick( "left" , 1016, 707, 1, 1 )

Sleep( 900 )

MouseMove( 1163, 707, 1 )

Sleep( 300 )

MouseClick( "left" , 1163, 707 , 1 , 1 )

Sleep( 900 )

MouseMove( 1868, 923, 1 )

Sleep( 300 )

MouseClick( "left" , 1868, 923 , 1, 1 )

Sleep( 900 )

MouseMove( 751, 501 , 1 )

Sleep( 300 )

MouseClick( "left" , 751, 501, 1, 1 )

Sleep( 900 )

MouseMove( 1185, 452 , 1 )

Sleep( 300 )

MouseClick( "left" , 1185, 452, 1, 1 )

Sleep( 900 )

MouseMove( 690, 50 , 1 )

Sleep( 300 )

MouseClick( "left" , 690, 50, 1, 1 )

sleep (601000)

WEnd

EndFunc ;==>ShowMe

Share this post


Link to post
Share on other sites



Welcome to AutoIt and the forum!

A few notes:

  • Please wrap your code in [autoit][/autoit] tags for better readability
  • What kind of application do you want to automate with so many MouseMove/MouseClick calls?

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

; Press Esc to terminate script, Pause/Break to "pause"


Global $Paused, $Runner
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{ESC}", "Terminate")
HotKeySet("{F9}", "ShowMe")

;;;; Body of program would go here ;;;;
While 1
Sleep(10)
WEnd
;;;;;;;;

Func TogglePause()
$Paused = Not $Paused
While $Paused
Sleep(10)
ToolTip('Script is "Paused"', 0, 0)
WEnd
ToolTip("")
EndFunc ;==>TogglePause

Func Terminate()
Exit 0
EndFunc ;==>Terminate

Func ShowMe()
$Runner = Not $Runner
While $Runner


Sleep( 10 )
MouseMove( 1868, 923 , 1 )
Sleep( 100 )
MouseClick( "left" , 1868, 923, 1, 1 )

Sleep( 900 )
MouseMove( 1016, 707,1 )
Sleep( 100 )
MouseClick( "left" , 1016, 707, 1, 1 )

Sleep( 900 )
MouseMove( 1163, 707, 1 )
Sleep( 100 )
MouseClick( "left" , 1163, 707 , 1 , 1 )

Sleep( 900 )
MouseMove( 1868, 923, 1 )
Sleep( 100 )
MouseClick( "left" , 1868, 923 , 1, 1 )

Sleep( 900 )
MouseMove( 751, 501 , 1 )
Sleep( 100 )
MouseClick( "left" , 751, 501, 1, 1 )

Sleep( 900 )
MouseMove( 1185, 452 , 1 )
Sleep( 300 )
MouseClick( "left" , 1185, 452, 1, 1 )

Sleep( 900 )
MouseMove( 907, 47 , 1 )
Sleep( 300 )
MouseClick( "left" , 907, 47, 1, 1 )


Sleep( 900 )
MouseMove( 1868, 923 , 1 )
Sleep( 300 )
MouseClick( "left" , 1868, 923, 1, 1 )

Sleep( 900 )
MouseMove( 1016, 707,1 )
Sleep( 300 )
MouseClick( "left" , 1016, 707, 1, 1 )

Sleep( 900 )
MouseMove( 1163, 707, 1 )
Sleep( 300 )
MouseClick( "left" , 1163, 707 , 1 , 1 )

Sleep( 1000 )
MouseMove( 1868, 923, 1 )
Sleep( 300 )
MouseClick( "left" , 1868, 923 , 1, 1 )

Sleep( 900 )
MouseMove( 751, 501 , 1 )
Sleep( 300 )
MouseClick( "left" , 751, 501, 1, 1 )

Sleep( 900 )
MouseMove( 1185, 452 , 1 )
Sleep( 300 )
MouseClick( "left" , 1185, 452, 1, 1 )

Sleep( 900 )
MouseMove( 1117, 49 , 1 )
Sleep( 300 )
MouseClick( "left" , 1117, 49, 1, 1 )

Sleep( 900 )
MouseMove( 1868, 923 , 1 )
Sleep( 300 )
MouseClick( "left" , 1868, 923, 1, 1 )

Sleep( 900 )
MouseMove( 1016, 707,1 )
Sleep( 300 )
MouseClick( "left" , 1016, 707, 1, 1 )

Sleep( 900 )
MouseMove( 1163, 707, 1 )
Sleep( 300 )
MouseClick( "left" , 1163, 707 , 1 , 1 )

Sleep( 900 )
MouseMove( 1868, 923, 1 )
Sleep( 300 )
MouseClick( "left" , 1868, 923 , 1, 1 )

Sleep( 900 )
MouseMove( 751, 501 , 1 )
Sleep( 300 )
MouseClick( "left" , 751, 501, 1, 1 )

Sleep( 900 )
MouseMove( 1185, 452 , 1 )
Sleep( 300 )
MouseClick( "left" , 1185, 452, 1, 1 )

Sleep( 900 )
MouseMove( 690, 50 , 1 )
Sleep( 300 )
MouseClick( "left" , 690, 50, 1, 1 )

sleep (601000)

WEnd
EndFunc ;==>ShowMe

Share this post


Link to post
Share on other sites

Which program to you try to automate?

MouseMove/MouseClick isn't very reliable because it depends on the screen resolution and window position.

Control* functions, the IE UDF etc. provide better solutions.


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

it's to automate something on the internet (gamelike)

the windowposition is always the same, so i'm not bothered with that^^

i'm kinda a newbie to this so every input is welcome :-)

so if ur up to it, would you like to explain it to me like i'm a 6yrs old :P

Share this post


Link to post
Share on other sites

You should read the forum rules. Link is in the lower right corner of this page.

Game automation of any kind isn't allowed here.

What do you mean by "gamelike"? Can you post the URL?


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

it's for a gameserver i set up... the site is for admins only

since i'm the night-admin i wanna smuggle the last two hours of my shift :$ (and if it works all admins would work with it)

so it's not actually to automate ingame stuff

it's actually to dowload some online logfiles (since i'm a newbie to this i made the script mouseclick-based, works fine tho)

the logfiles update every ten minutes and we need all logfiles to see where possible errors are

since the server is accesable through "remote desktop"

i want a timer in this script so that the other admins don't interubt the script

this way we got more time to do other things

(I know, it's an annyoing way to control our server, that's why i want this script to work^^)

(my english is a bit bad, so can't explain it in a good way, sorry bout that)

Share this post


Link to post
Share on other sites

mikey88,

Please read the Forum rules (the link is also at bottom right of each page) - particularly the bit about not discussing interaction with game servers - before you post again. Thread locked. :naughty:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0