Jump to content

Quiet Mode?


Recommended Posts

Does anyone know of a way to get AutoIT v3 to run its commands without showing the user what it is doing.

What I'm trying to achieve is an operation which creates users and shared folders on a standalone PC.

This is fine and I can run it with no real issues, however I'd like to be able to get the file to open, and when someone clicks on a confirmation GUI I have put in I want it to add a progress bar whilst the operations AutoIt is performing remain hidden.

I've looked through the help as thoroughly as I can but can't find anything on a quiet mode/switch etc ;) .

TIA

Link to comment
Share on other sites

I've looked through the help as thoroughly as I can but can't find anything on a quiet mode/switch etc ;) .

The operations you mentioned ("operation which creates users and shared folders on a standalone PC"), are "quiet" by default. Maybe you should show your code, so we get a chance to understand what you are talking about..

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

Hi Kurt,

Here's what I'm doing - to be honest it is probably down to the way I'm doing it ;) but have a look:

Once I open the computer management console I'm just using tab and mouse clicks etc to move around where I want.

I know the progress meter is all wrong too but I'm not too sure how to get it to reflect the actual progress of the script as things are working.

Thanks,

Matt.

; Script Start -

#include <GUIConstants.au3>

GUICreate("Confirm Operating System", 300, 200)

GUICtrlCreateLabel("This script is designed for use with Windows XP only", 30, 10)

GUICtrlCreateLabel("Please confirm this machine runs on Windows XP by", 30, 25)

GUICtrlCreateLabel("clicking OK - or clicking exit if not. If unsure then click", 30, 40)

GUICtrlCreateLabel("exit. Run Winver.exe from the run command to ascertain", 30, 55)

GUICtrlCreateLabel("this information.", 30, 70)

GUICtrlCreateLabel("WHEN THE AUTOMATED TASK",30,85)

GUICtrlSetColor(-1,0xff0000) ; Red

GUICtrlCreateLabel("COMPLETES CLICK ON EXIT.",30,100)

GUICtrlSetColor(-1,0xff0000) ; Red

$OKbutton = GUICtrlCreateButton("OK", 40, 130, 60)

$Exitbutton = GUICtrlCreateButton("Exit", 120, 130, 60)

GUISetState(@SW_SHOW)

While 1

$msg = GUIGetMsg()

Select

Case $msg = $OKbutton

MsgBox(0, "GUI Event", "The Proceedure will now continue in Windows XP mode.")

WinWaitActive("Confirm Operating System")

WinClose("Confirm Operating System")

ProgressOn("Progress Meter", "Increments every second", "0 percent")

For $i = 0 to 100 step 1.5

sleep(1000)

ProgressSet( $i, $i & " percent")

ProgressSet(100 , "Done", "Complete")

RunWait(@COMSPEC & " /c Start compmgmt.msc")

WinWaitActive("Computer Management")

WinSetState("Computer Management", "Computer Management", @SW_MAXIMIZE)

MouseClick("left",29,151)

MouseClick("left",93,167)

MouseClick("right",699,171)

MouseClick("left",747,180)

WinWaitActive("New User")

Send("finance")

Send("{TAB}")

Send("Local Authority Finance Team")

Send("{TAB}")

Send("For Local Authority Finance Team")

Send("{TAB}")

Send("8RBMP3DR9Q")

Send("{TAB}")

Send("8RBMP3DR9Q")

MouseClick("left",571,536)

WinWait("New User", "", 15)

WinWaitActive("New User")

Send("engineer")

Send("{TAB}")

Send("Local Authority IT Support")

Send("{TAB}")

Send("For Local Authority IMS Team")

Send("{TAB}")

Send("PQHN6YGW9J")

Send("{TAB}")

Send("PQHN6YGW9J")

MouseClick("left",571,536)

MouseClick("left",652,536)

WinWait("","",5)

WinClose("Computer Management")

#include <guiconstants.au3>

RunWait(@COMSPEC & " /c Start compmgmt.msc")

WinWaitActive("Computer Management")

WinSetState("Computer Management", "Computer Management", @SW_MAXIMIZE)

MouseClick("left",29,151)

MouseClick("left",93,167)

MouseClick("left",699,171)

MouseClick("left",277,105)

Send("eng")

WinWait("","",50)

Send("{ENTER}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{RIGHT}")

Send("{TAB}")

Send("{ENTER}")

WinWaitActive("Select Groups")

Send("Management Information System")

Send("{TAB}")

Send("{ENTER}")

Send("{TAB}")

Send("{ENTER}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{ENTER}")

WinWait("","",5)

Send("{ENTER}")

WinWaitActive("Select Groups")

Send("Administrators")

Send("{TAB}")

Send("{ENTER}")

Send("{TAB}")

Send("{ENTER}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{ENTER}")

WinWait("","",5)

WinClose("Select Groups")

WinWait("","",5)

WinClose("engineer Properties")

WinWait("","",5)

WinClose("Computer Management")

#include <guiconstants.au3>

RunWait(@COMSPEC & " /c Start compmgmt.msc")

WinWaitActive("Computer Management")

WinSetState("Computer Management", "Computer Management", @SW_MAXIMIZE)

MouseClick("left",29,151)

MouseClick("left",93,167)

MouseClick("left",699,171)

MouseClick("left",277,105)

Send("fin")

WinWait("","",5)

Send("{ENTER}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{RIGHT}")

Send("{TAB}")

Send("{ENTER}")

WinWaitActive("Select Groups")

Send("Management Information System")

Send("{TAB}")

Send("{ENTER}")

Send("{TAB}")

Send("{ENTER}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{ENTER}")

WinWait("","",5)

WinClose("Select Groups")

WinWait("","",5)

WinClose("finance Properties")

WinWait("","",5)

WinClose("Computer Management")

DirCreate("D:\Users\engineer")

WinWait("","",5)

DirCreate("D:\Users\finance")

RunWait(@COMSPEC & " /c Start D:\Users")

WinSetState("Users", "",@SW_MAXIMIZE)

WinWait("Users","",1000)

MouseClick("left",884,218)

Send("engineer")

WinSetState("Users", "",@SW_MAXIMIZE)

MouseClick("left",26,35)

MouseClick("left",76,272)

WinWaitActive("engineer Properties")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{right}")

Send("{TAB}")

Send("{right}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{enter}")

WinWaitActive("Permissions for engineer")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{space}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{enter}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{enter}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{enter}")

Send("{enter}")

WinWaitActive("engineer","",600)

WinClose("engineer")

RunWait(@COMSPEC & " /c Start D:\Users")

WinSetState("Users", "",@SW_MAXIMIZE)

WinWait("Users","",100)

MouseClick("left",884,218)

Send("engineer")

MouseClick("left",26,35)

MouseClick("left",76,272)

WinWaitActive("engineer Properties")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{right}")

Send("{right}")

Send("{TAB}")

Send("{TAB}")

Send("{enter}")

WinWaitActive("Select Users, Computers, or Groups")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{enter}")

Send("{left}")

Send("{left}")

Send("{left}")

Send("{left}")

Send("{left}")

Send("{left}")

Send("{left}")

Send("{up}")

Send("{up}")

Send("{up}")

Send("{up}")

Send("{enter}")

WinWaitActive("Select Users or Groups")

Send("engineer")

Send("{enter}")

Send("{TAB}")

Send("{TAB}")

Send("{space}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{enter}")

Send("{TAB}")

Send("{enter}")

Send("administrators")

Send("{enter}")

Send("{TAB}")

Send("{TAB}")

Send("{space}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{enter}")

Send("{enter}")

WinWaitActive("Users")

WinClose("Users")

RunWait(@COMSPEC & " /c Start D:\Users")

WinSetState("Users", "",@SW_MAXIMIZE)

WinWait("Users","",100)

MouseClick("left",884,218)

Send("finance")

MouseClick("left",26,35)

MouseClick("left",76,272)

WinWaitActive("finance Properties")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{right}")

Send("{TAB}")

Send("{right}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{enter}")

WinWaitActive("Permissions for finance")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{space}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{enter}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{enter}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{enter}")

Send("{enter}")

WinWaitActive("finance","",600)

WinClose("finance")

RunWait(@COMSPEC & " /c Start D:\Users")

WinSetState("Users", "",@SW_MAXIMIZE)

WinWait("Users","",100)

MouseClick("left",884,218)

Send("finance")

MouseClick("left",26,35)

MouseClick("left",76,272)

WinWaitActive("finance Properties")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{right}")

Send("{right}")

Send("{TAB}")

Send("{TAB}")

Send("{enter}")

WinWaitActive("Select Users, Computers, or Groups")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{enter}")

Send("{left}")

Send("{left}")

Send("{left}")

Send("{left}")

Send("{left}")

Send("{left}")

Send("{left}")

Send("{up}")

Send("{up}")

Send("{up}")

Send("{up}")

Send("{enter}")

WinWaitActive("Select Users or Groups")

Send("finance")

Send("{enter}")

Send("{TAB}")

Send("{TAB}")

Send("{space}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{enter}")

Send("{TAB}")

Send("{enter}")

Send("administrators")

Send("{enter}")

Send("{TAB}")

Send("{TAB}")

Send("{space}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{enter}")

Send("{enter}")

WinWaitActive("Users")

WinClose("Users")

RunWait(@COMSPEC & " /c Start D:\Users")

WinSetState("Users", "",@SW_MAXIMIZE)

WinWait("Users","",100)

WinSetState("Users", "",@SW_MAXIMIZE)

MouseClick("left",884,218)

Send("engineer")

MouseClick("left",26,35)

MouseClick("left",76,272)

WinWaitActive("engineer Properties")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{right}")

Send("{right}")

Send("{TAB}")

Send("e")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{enter}")

Send("{down}")

Send("{down}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{space}")

Send("{enter}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{enter}")

Send("{enter}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("e")

Send("{TAB}")

Send("{TAB}")

Send("{enter}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{TAB}")

Send("{enter}")

Send("{enter}")

WinWaitActive("engineer properties")

WinClose("engineer properties")

WinWaitActive("Users")

Sleep(3000)

MouseClick("left",1012,12)

sleep(500)

ProgressOff()

Next

MsgBox(264, "Finished", "Script complete, Click OK then Exit. ")

Case $msg = $Exitbutton

MsgBox(0, "GUI Event", "You clicked Exit! Exiting...")

ExitLoop

EndSelect

WEnd

Edited by SuperFletch
Link to comment
Share on other sites

Hi Kurt,

Here's what I'm doing - to be honest it is probably down to the way I'm doing it ;) but have a look:

Once I open the computer management console I'm just using tab and mouse clicks etc to move around where I want.

I know the progress meter is all wrong too but I'm not too sure how to get it to reflect the actual progress of the script as things are working.

O.K. from what I can see your are adding some users and then changing some file/folder permissions. Well, you better don't do that via window "controlling". There are functions available to add users directly and also to set file permissions. See below:

1.) Add User:

http://www.autoitscript.com/forum/index.ph...mp;#entry175366

http://www.autoitscript.com/forum/index.ph...st&p=206132

2.) Change Folder permissions:

http://www.autoitscript.com/forum/index.ph...st&p=206132

http://setacl.sourceforge.net/ (need to run this via Run()).

Those operations will run "in the background", meaning the user will not see your script controlling some windows.... To add users and to change file/folder permissions, you might need admin privileges!

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

if you need so mutch Send("{TAB}") use this:

for example if you like to have 30 tabs use:

Send("{TAB 30}")

and you can combine Send together ;) :

Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{TAB}")
Send("{RIGHT}")
Send("{TAB}")
Send("{ENTER}")
oÝ÷ Ú+-ëæ¬jëh×6Send("{TAB 7}{RIGHT}{TAB}{ENTER}")
Edited by Zedna
Link to comment
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
 Share

  • Recently Browsing   0 members

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