Spikar Posted January 13, 2019 Posted January 13, 2019 Just wondering if AutoIT is the right software for my requirements, as I can't seem to find anything to be able to do this. I want to be able to have a 'counter' recorder. What does this mean?. Basically, every time I press the combination 'Shift and NUM+" it will keep a count on how many times I've pressed that combination saving the results and adding each time. At the end of a working week, I'd like to be able to access the data (txt file or excel file ?? ) and be able to determine how many times the combination was pressed on that particular date (needs to be dated for each day and save the records, ie. 13/01/18 = 100, 14/01/18 = 50, so on and so forth). I'm wanting to do this in the background, therefore not wanting to have any particular window in focus in order to achieve this result. Does that make sense? It's a little hard to explain and therefore not sure exactly what to search to find details on it. Hoping I can get some help from AutoIT Forum! I am in no way script savvy, so would need some direction for a complete n00b. Thanks!
careca Posted January 13, 2019 Posted January 13, 2019 Hi, yes it can. There are a couple ways, but the way i would choose would be by using functions: _ispressed and iniwrite Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
Subz Posted January 13, 2019 Posted January 13, 2019 Or use HotKeySet for example: Global $sIniFile = @ScriptDir & "\Counter.ini" HotKeySet("+{NUMPADADD}", "_Counter") HotKeySet("+{ESC}", "_ExitScript") While 1 Sleep(100) WEnd Func _ExitScript() Exit EndFunc Func _Counter() Local $iCount = IniRead($sIniFile, "Count Record", @MDAY & "/" & @MON & "/" & @YEAR, 0) $iCount += 1 IniWrite($sIniFile, "Count Record", @MDAY & "/" & @MON & "/" & @YEAR, $iCount) EndFunc
Nine Posted January 13, 2019 Posted January 13, 2019 _ispressed is one solution but it requires that you embed it in a tight loop since pressing a couple of keys can be quite fast. The drawback of a short loop is that it will grab a significant amount of CPU time. One other solution is to define HotKeySet ("+{NUMPADADD}") and have a very loose loop waiting for the key combo to be pressed. One drawback of this function is that the key is usually "grab" by the function. You will have to do a little trick to let it go thru slowing the key combo a few millisecs. Happy scripting ! “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy
Earthshine Posted January 13, 2019 Posted January 13, 2019 too late nine, Subz beat you to it.... My resources are limited. You must ask the right questions
Nine Posted January 13, 2019 Posted January 13, 2019 2 minutes ago, Earthshine said: too late nine, Subz beat you to it.... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy
careca Posted January 13, 2019 Posted January 13, 2019 It's one thing to help, another one is to spoon feed. Teach a man to fish, and he'll fish his entire life. Ya know? Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
Subz Posted January 13, 2019 Posted January 13, 2019 Each to their own, I like to teach by example, I personally also like to learn by example. If my post helps the OP to get interested in Autoit great, if not might help someone else searching the forums.
Earthshine Posted January 13, 2019 Posted January 13, 2019 (edited) Well I don’t think there’s anything wrong with posting some good working example— especially if there’s nothing in the help file It’s a fine line but some folks need a little help. I looked through UDF’s for examples as well of stuff that I need to do so I guess I’ll learn by example too Edited January 13, 2019 by Earthshine My resources are limited. You must ask the right questions
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now