Jump to content
Sign in to follow this  

Simple macro, big processor consumtion

Recommended Posts

How can i make this simple script use not so much processor

HotKeySet("r down", "test_1")
HotKeySet("q down", "test_2")
HotkeySet("{F13}", "terminate")

While 1

Func test_1()

Func test_2()
Send("                               ")

Func Terminate()
Exit 0

This is the cheap method of what i would like to make.

It works fine(not exactly as i would like) but it takes lot of processor ( i dont know why).

I hope you guys can help me in making it use the minimum processor as possible.

When the script is running i cant type Caps f... i tried to add a pause script i found but when i use it it also blocks the "r" meaning i cant type it... i use terminate because i've no other way(because of my knowledge) to stop the script.

My intention here was to hold R and make it send "ad" while its being held. same with Q sending lot of "spaces" per second. But i dont know how to do that, any help will be really appreciated. THANK YOU!

and please someone help me trying to make a pause to work properly so i can keep typing with R and Q while the script is running (but disabled)...

Edited by otrebla9

Share this post

Link to post
Share on other sites

thank you for the fast answer... any suggestion to pause in the right way?

well that takeoff1 and 2 dont really influence, just as a description is ok.. :D

i am now trying this:

#Include <Misc.au3>
$dll = DllOpen("user32.dll")
While 1
Sleep (100)
if _IsPressed("52", $dll) Then

but i still need a PAUSE function.. can someone give me a hand?

Edited by otrebla9

Share this post

Link to post
Share on other sites

I would do this in a different way, i would use _ispressed, and then assign a button to a var, and that would be the pause, the rest of it would be the usual if, ispressed then blahblah

EDIT: This is what i mean

#include <Misc.au3>
Local $hDLL = DllOpen("user32.dll")
Local $Pause
If _IsPressed(20) AND $Pause = 0 Then ;Check for Space AND pause var.
ElseIf _IsPressed(50) Then ;P key, as in Pause
    If $Pause = 0 Then
    $Pause = 1
    $Pause = 0
Until _IsPressed(23) = 1 ;ENDKey
Edited by careca


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


Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...