Jump to content

Recommended Posts

Posted

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!

 

Posted

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

Posted

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

 

Posted

_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 !

 

Posted

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

Posted

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.

Posted (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 by Earthshine

My resources are limited. You must ask the right questions

 

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
  • Recently Browsing   0 members

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