├── .gitattributes ├── .gitignore ├── README.md ├── chrome-kiosk ├── README.md ├── launch-chrome.au3 └── launch-screensaver.au3 ├── gui-automation └── gui-automation.au3 ├── lock-screen ├── README.md └── lock-screen.au3 └── move-mouse ├── README.md └── move-mouse.au3 /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ################# 2 | ## Eclipse 3 | ################# 4 | 5 | *.pydevproject 6 | .project 7 | .metadata 8 | bin/ 9 | tmp/ 10 | *.tmp 11 | *.bak 12 | *.swp 13 | *~.nib 14 | local.properties 15 | .classpath 16 | .settings/ 17 | .loadpath 18 | 19 | # External tool builders 20 | .externalToolBuilders/ 21 | 22 | # Locally stored "Eclipse launch configurations" 23 | *.launch 24 | 25 | # CDT-specific 26 | .cproject 27 | 28 | # PDT-specific 29 | .buildpath 30 | 31 | 32 | ################# 33 | ## Visual Studio 34 | ################# 35 | 36 | ## Ignore Visual Studio temporary files, build results, and 37 | ## files generated by popular Visual Studio add-ons. 38 | 39 | # User-specific files 40 | *.suo 41 | *.user 42 | *.sln.docstates 43 | 44 | # Build results 45 | 46 | [Dd]ebug/ 47 | [Rr]elease/ 48 | x64/ 49 | build/ 50 | [Bb]in/ 51 | [Oo]bj/ 52 | 53 | # MSTest test Results 54 | [Tt]est[Rr]esult*/ 55 | [Bb]uild[Ll]og.* 56 | 57 | *_i.c 58 | *_p.c 59 | *.ilk 60 | *.meta 61 | *.obj 62 | *.pch 63 | *.pdb 64 | *.pgc 65 | *.pgd 66 | *.rsp 67 | *.sbr 68 | *.tlb 69 | *.tli 70 | *.tlh 71 | *.tmp 72 | *.tmp_proj 73 | *.log 74 | *.vspscc 75 | *.vssscc 76 | .builds 77 | *.pidb 78 | *.log 79 | *.scc 80 | 81 | # Visual C++ cache files 82 | ipch/ 83 | *.aps 84 | *.ncb 85 | *.opensdf 86 | *.sdf 87 | *.cachefile 88 | 89 | # Visual Studio profiler 90 | *.psess 91 | *.vsp 92 | *.vspx 93 | 94 | # Guidance Automation Toolkit 95 | *.gpState 96 | 97 | # ReSharper is a .NET coding add-in 98 | _ReSharper*/ 99 | *.[Rr]e[Ss]harper 100 | 101 | # TeamCity is a build add-in 102 | _TeamCity* 103 | 104 | # DotCover is a Code Coverage Tool 105 | *.dotCover 106 | 107 | # NCrunch 108 | *.ncrunch* 109 | .*crunch*.local.xml 110 | 111 | # Installshield output folder 112 | [Ee]xpress/ 113 | 114 | # DocProject is a documentation generator add-in 115 | DocProject/buildhelp/ 116 | DocProject/Help/*.HxT 117 | DocProject/Help/*.HxC 118 | DocProject/Help/*.hhc 119 | DocProject/Help/*.hhk 120 | DocProject/Help/*.hhp 121 | DocProject/Help/Html2 122 | DocProject/Help/html 123 | 124 | # Click-Once directory 125 | publish/ 126 | 127 | # Publish Web Output 128 | *.Publish.xml 129 | *.pubxml 130 | 131 | # NuGet Packages Directory 132 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 133 | #packages/ 134 | 135 | # Windows Azure Build Output 136 | csx 137 | *.build.csdef 138 | 139 | # Windows Store app package directory 140 | AppPackages/ 141 | 142 | # Others 143 | sql/ 144 | *.Cache 145 | ClientBin/ 146 | [Ss]tyle[Cc]op.* 147 | ~$* 148 | *~ 149 | *.dbmdl 150 | *.[Pp]ublish.xml 151 | *.pfx 152 | *.publishsettings 153 | 154 | # RIA/Silverlight projects 155 | Generated_Code/ 156 | 157 | # Backup & report files from converting an old project file to a newer 158 | # Visual Studio version. Backup files are not needed, because we have git ;-) 159 | _UpgradeReport_Files/ 160 | Backup*/ 161 | UpgradeLog*.XML 162 | UpgradeLog*.htm 163 | 164 | # SQL Server files 165 | App_Data/*.mdf 166 | App_Data/*.ldf 167 | 168 | ############# 169 | ## Windows detritus 170 | ############# 171 | 172 | # Windows image file caches 173 | Thumbs.db 174 | ehthumbs.db 175 | 176 | # Folder config file 177 | Desktop.ini 178 | 179 | # Recycle Bin used on file shares 180 | $RECYCLE.BIN/ 181 | 182 | # Mac crap 183 | .DS_Store 184 | 185 | 186 | ############# 187 | ## Python 188 | ############# 189 | 190 | *.py[co] 191 | 192 | # Packages 193 | *.egg 194 | *.egg-info 195 | dist/ 196 | build/ 197 | eggs/ 198 | parts/ 199 | var/ 200 | sdist/ 201 | develop-eggs/ 202 | .installed.cfg 203 | 204 | # Installer logs 205 | pip-log.txt 206 | 207 | # Unit test / coverage reports 208 | .coverage 209 | .tox 210 | 211 | #Translations 212 | *.mo 213 | 214 | #Mr Developer 215 | .mr.developer.cfg 216 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
A collection of AutoIT scripts I've written and found useful in system administration tasks.
4 | 5 |A one-line script that locks the Windows screen. Once compiled as an .exe, this is useful to place in a user's Startup folder to immediately lock the screen after logon. Combine with SysInternals Autologon for situations that require a console session.
10 | 11 |A short while loop that moves the mouse slightly every 60 seconds.
14 | 15 |Part of a Google Chrome kiosk setup that keeps a Google Chrome window open at all times.
18 | 19 |Part of a Google Chrome kiosk setup that resets Chrome when the screensaver is launched.
22 | 23 |A non-functional example script demonstrating several AutoIT GUI functions.
26 | 27 |My work can be used freely. If you've found anything to be of use, please let me know about it!
-------------------------------------------------------------------------------- /chrome-kiosk/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edingc/autoit-scripts/a8f03371eff37b741d1b4cd4275f6d548ff9980a/chrome-kiosk/README.md -------------------------------------------------------------------------------- /chrome-kiosk/launch-chrome.au3: -------------------------------------------------------------------------------- 1 | #comments-start 2 | # ------------------------------------------------------------------------ 3 | # NAME: launch-chrome.au3 4 | # AUTHOR: Cody Eding 5 | # DATE: 8/10/14 6 | # 7 | # COMMENTS: This while loop ensures that Google Chrome is always running. 8 | # This is very useful in a kiosk situation where the browser should stay 9 | # open at all times. 10 | # 11 | # ------------------------------------------------------------------------ 12 | #comments-end 13 | 14 | While 1 15 | ; 32-bit OS (assuming Chrome is 32-bit) 16 | If Not ProcessExists( "chrome.exe" ) Then Run( "C:\Program Files\Google\Chrome\Application\chrome.exe --incognito --start-maximized --disable-extensions" ) 17 | ; 64-bit OS (assuming Chrome is 32-bit) 18 | ; If Not ProcessExists( "chrome.exe" ) Then Run( "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe --incognito --start-maximized --disable-extensions" ) 19 | WEnd 20 | -------------------------------------------------------------------------------- /chrome-kiosk/launch-screensaver.au3: -------------------------------------------------------------------------------- 1 | #comments-start 2 | # ------------------------------------------------------------------------ 3 | # NAME: launch-screensaver.au3 4 | # AUTHOR: Cody Eding 5 | # DATE: 8/10/14 6 | # 7 | # COMMENTS: This script kills the current browser session and launches 8 | # the Windows screensaver. Compile to .exe and rename to .scr to use as a 9 | # replacement screensaver within Windows. 10 | # 11 | # ------------------------------------------------------------------------ 12 | #comments-end 13 | 14 | Run( "taskkill.exe /IM chrome.exe" ) 15 | Sleep ( 5000 ) 16 | Run( "C:\Windows\System32\logon.scr -s" ) -------------------------------------------------------------------------------- /gui-automation/gui-automation.au3: -------------------------------------------------------------------------------- 1 | #comments-start 2 | # ------------------------------------------------------------------------ 3 | # NAME: gui-automation.au3 4 | # AUTHOR: Cody Eding 5 | # DATE: 9/2/2014 6 | # 7 | # COMMENTS: This script automates the GUI functions of a Citrix application. 8 | # This is only an example of functions provided by AutoIT and is not functional. 9 | # 10 | # ------------------------------------------------------------------------ 11 | #comments-end 12 | 13 | ; Set mouse coordinates to be relative to the current window. 14 | ; This should be default behavior, but let's ensure it behaves. 15 | AutoItSetOption( "MouseCoordMode", 0 ) 16 | 17 | ; Get the username to add from an input box. 18 | Local $Username = InputBox( "User Setup", "Username?" ) 19 | 20 | ; Run the Citrix application through the client. 21 | Run( 'C:\Program Files (x86)\Citrix\ICA Client\pnagent.exe /CitrixShortcut: (2) /QLaunch "Citrix Application Name"' ) 22 | 23 | ; Wait until the LOGON screen is open and then make it the active window. 24 | WinWait( "LOGON - \\Remote" ) 25 | WinActivate( "LOGON - \\Remote" ) 26 | 27 | ; I'm just sending ENTER to move past the welcome window and log in. 28 | Send( "{ENTER}" ) 29 | 30 | ; Wait to continue until the main Citrix window appears. 31 | WinWaitActive( "CITRIX Application - \\Remote" ) 32 | 33 | ; Click the "User Access" module. 34 | MouseClick( "left", 605, 455 ) 35 | 36 | ; Wait to continue until the User Access window appears. 37 | WinWaitActive( "User Access - \\Remote" ) 38 | 39 | ; Select the username field and type the name we collected via input earlier. 40 | MouseClick( "left", 100, 90 ) 41 | Send( $Username ) 42 | 43 | ; Add the user. Sleep between dialog boxes. 44 | ; Send ENTER to move past two save dialogues. 45 | MouseClick( "left", 355, 75 ) 46 | Sleep( 3000 ) 47 | Send( "{ENTER}" ) 48 | Sleep( 3000 ) 49 | Send( "{ENTER}" ) 50 | 51 | ; Wait to continue until the main User Access dialog is active again. 52 | WinWaitActive( "User Access - \\Remote" ) 53 | 54 | ; Select the application permissions (checkboxes). 55 | MouseClick( "left", 330, 305 ) 56 | MouseClick( "left", 330, 320 ) 57 | MouseClick( "left", 330, 335 ) 58 | MouseClick( "left", 330, 365 ) 59 | MouseClick( "left", 330, 395 ) 60 | MouseClick( "left", 330, 430 ) 61 | MouseClick( "left", 330, 445 ) 62 | MouseClick( "left", 330, 460 ) 63 | 64 | ; Select the Functions tab. 65 | MouseClick( "left", 120, 200 ) 66 | 67 | ; Select the functions (checkboxes). 68 | MouseClick( "left", 340, 320 ) 69 | MouseClick( "left", 340, 350 ) 70 | MouseClick( "left", 340, 465 ) 71 | 72 | ; Click the Modify button. 73 | MouseClick( "left", 350, 70 ) 74 | 75 | ; Wait three seconds for the Save dialog and send ENTER to close it. 76 | Sleep( 3000 ) 77 | Send( "{ENTER}" ) 78 | 79 | ; Wait to continue until the User Access dialog is active again. 80 | ; Once it's active, close the User Access module. 81 | WinWaitActive( "User Access - \\Remote" ) 82 | MouseClick( "left", 355, 175 ) 83 | 84 | ; Wait to continue until the main Falcon window is active. 85 | ; Once it's active, log out of Falcon by pressing the button. 86 | WinWaitActive( "CITRIX Application - \\Remote" ) 87 | MouseClick( "left", 765, 555 ) -------------------------------------------------------------------------------- /lock-screen/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edingc/autoit-scripts/a8f03371eff37b741d1b4cd4275f6d548ff9980a/lock-screen/README.md -------------------------------------------------------------------------------- /lock-screen/lock-screen.au3: -------------------------------------------------------------------------------- 1 | #comments-start 2 | # ------------------------------------------------------------------------ 3 | # NAME: lock-screen.au3 4 | # AUTHOR: Cody Eding 5 | # ADAPTED FROM: http://www.autoitscript.com/forum/topic/151184-cant-lock-screen-with-sendl/ 6 | # DATE: 9/4/14 7 | # 8 | # COMMENTS: This script locks the screen. Compile to .exe using AutoIT tools 9 | # and place in Startup folder to immediately lock screen after logon. 10 | # 11 | # ------------------------------------------------------------------------ 12 | #comments-end 13 | 14 | Run( "rundll32.exe user32.dll LockWorkStation" ) -------------------------------------------------------------------------------- /move-mouse/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edingc/autoit-scripts/a8f03371eff37b741d1b4cd4275f6d548ff9980a/move-mouse/README.md -------------------------------------------------------------------------------- /move-mouse/move-mouse.au3: -------------------------------------------------------------------------------- 1 | #comments-start 2 | # ------------------------------------------------------------------------ 3 | # NAME: move-mouse.au3 4 | # AUTHOR: Cody Eding 5 | # DATE: 2/21/14 6 | # 7 | # COMMENTS: This script moves the mouse slightly every minute. 8 | # Useful to keep screen from locking. 9 | # 10 | # ------------------------------------------------------------------------ 11 | #comments-end 12 | 13 | While 1 14 | Sleep( 60000 ) 15 | $CurPos = MouseGetPos ( ) 16 | MouseMove ( $CurPos[0] + 1, $CurPos[1] ) 17 | MouseMove ( $CurPos[0] - 1, $CurPos[1] ) 18 | WEnd --------------------------------------------------------------------------------