Jump to content

Recommended Posts

Posted (edited)

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
Sleep(100)
WEnd

Func test_1()
Sleep(100)
Send("adadadadadadadadadadadadadadadadad")
EndFunc;==>TakeOff1

Func test_2()
Sleep(100)
Send("                               ")
EndFunc;==>TakeOff2

Func Terminate()
Exit 0
EndFunc

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
Posted (edited)

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
  Send("ad")
EndIf
WEnd

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

Edited by otrebla9
Posted (edited)

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
Do
If _IsPressed(20) AND $Pause = 0 Then ;Check for Space AND pause var.
    Send('Gibberish')
ElseIf _IsPressed(50) Then ;P key, as in Pause
    If $Pause = 0 Then
    $Pause = 1
    Else
    $Pause = 0
    EndIf
EndIf
Until _IsPressed(23) = 1 ;ENDKey
Edited by careca
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

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
×
×
  • Create New...