Jump to content

progress bar or something


mikey88
 Share

Recommended Posts

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

Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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

Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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

Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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)

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...