Jump to content

How to do this, in the best way


Recommended Posts

Ive wanted to intigrate the Keylogger script Made by Layer... i have changed a bit in it, in order to fit danish language and so on. I want to intigrate it with my PC-Info script, with options like, run when windows starts, and exit by hotkey, trayicon or not and so on... and therefor i cannot compile it, as it have to be "change able"

The Keylogger runs in a While, bacause it uses the _IsPressed func. and i want to be able to use the other while (Pc-Info) at the same time...

So the question really is: How can i run this Keylogger, and at the same time run PC-Info, in the same script. Maybe i could let it open a new GUI? but remeber i have to be able to change some options for the keylogger, before it runs, from the PC-Info scipt...

Ive explained it in the best way my english was able to, hope you guys know what i want :lmao:

Thx for any help!

Edited by Wb-FreeKill
Link to comment
Share on other sites

Okay, it is possiple to run two Whiles in the same script, maybe in another GUI? someone plz help me  :lmao:

<{POST_SNAPBACK}>

I believe that would require threading. At this time, AutoIt does not support threading. Closest thing to threading is running two separate scripts and having them read a common configuration file where variables can be set and changed.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

You can use multithreading by haveing a second autoit script run your other while, or you can tailor your script with a single while. Basically the computer will have to pause instruction and do the second action no matter what you do, as the computer doesn't actually do two things at once. It may seem like it does a hundread things at once, but if it actually did there would be no reason for things like priority.

So first one is to make two scripts and let them run at the same time.

The second is the make one script that has a while with two tests.

ex:

adlibenable("someadlib",5)
while 1
$x=_IsPressed()
if $x="blah blah blah" then dosomething()
if $gui_return>3213 then dosomething_else()
do_tests()
sleep(10)
wend

func someadlib()
; some code
endfunc

; other functions

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

ahh, so the best way to do it, is to run two seperate scipts.

Then my idea is:

In the PC-INFO GUI, were the confuguration of the Keylogger is, when these options are made, it will create fx an INI file, with the options you made. Like:

;Run after shutdown:

0 = yes

1 = No

After that, it will run the Keylogger script, with the while, and then read the INI files options, and run as the options you made?

Is that a good idea, or?

Edited by Wb-FreeKill
Link to comment
Share on other sites

Why can't you just put it all in one while loop?

While 1
    If $Why_Cant_You_Just = 'Do Some Other' Then
        Code_Up_Here('?')
    EndIf

    If _IsPressed('a') Then
        _LogKey('a')
    ElseIf _IsPressed('b') Then
        _LogKey('b')
    ElseIf
    ; Etc...;
    EndIf
WEnd
Link to comment
Share on other sites

Why can't you just put it all in one while loop?

While 1
    If $Why_Cant_You_Just = 'Do Some Other' Then
        Code_Up_Here('?')
    EndIf

    If _IsPressed('a') Then
        _LogKey('a')
    ElseIf _IsPressed('b') Then
        _LogKey('b')
    ElseIf
    ; Etc...;
    EndIf
WEnd

<{POST_SNAPBACK}>

that i already tried, but after each_IsPressed is an delay of 20 Msec, så it would slow the whole while alot, there is alot of other functions in that while..

Im almost finish with my idea, and the thing is, i can close the PC-Info GUI, and still run the Keylogger GUI...

Link to comment
Share on other sites

I question whether having two scripts access the same files would not run into typical threading problems. There, one must take care not to permit the threads to collide. I.e. a test must be made to see if the file is ready, and if not, to wait, and if it is possible to get deadlocked waiting, then a condition to resolve the deadlock.

J

If I am too verbose, just say so. You don't need to run on and on.

Link to comment
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
 Share

  • Recently Browsing   0 members

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