Jump to content

Recommended Posts

Posted (edited)

Ive made this small program, witch is loggin the mouse position, and then moves it, by looking at the log file..

It quite slow, can i optimize it in any way?

OBS: Run the program again, if you try more than once, or else the mouse.ini wont be deleted!

MouseLog.exe

mouselog.au3

mouse.ini

PLACE THE MOUSE.INI in C:\

Edited by Wb-FreeKill
Posted (edited)

i don't know if it will help but you can try looking at my remote mouse program

edit: added attachments

au3xtra.dll

Edited by Xenogis

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Posted

(i posted this a little late, i bet you already figured it out)

in the same folder as the 2 autoit scripts

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Posted (edited)

thats because it didnt work right when you did it, just look at the source of the files. because i dont like explaining au3xtra.dll or using it

edit: i dont think this post makes sence

Edited by Xenogis

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Guest Guidosoft
Posted

i don't know if it will help but you can try looking at my remote mouse program

edit: added attachments

<{POST_SNAPBACK}>

Cool. That's pretty neat. I wish I knew how to use the power of Au3xtra.dll.

Can you help me?

Posted

optimize

Ok.

#include <GUIConstants.au3>
Opt ("GUIOnEventMode", 1)

HotKeySet("{ESC}", "quit")


Global $ini_name = @HomeDrive & "\mouse.ini", $start , $count

GUICreate("Mouse move GUI", 300, 200)
GUISetOnEvent($GUI_EVENT_CLOSE, "quit")

$record = GUICtrlCreateLabel("Record", 50, 10, 120, 20)
GUICtrlSetFont($record, 14)
$tart_record = GUICtrlCreateButton("Start", 43, 50, 70, 25)
$top_record = GUICtrlCreateButton("Stop", 43, 80, 70, 25)
$label = GUICtrlCreateLabel(IniRead($ini_name, "mouse", "count", 0), 43, 120, 120, 20)
GUICtrlCreateGroup("", 20, 30, 120, 150)

$Play = GUICtrlCreateLabel("Play", 200, 10, 120, 20)
GUICtrlSetFont($Play, 14)
$tart_play = GUICtrlCreateButton("Start", 185, 50, 70, 25)
$top_play = GUICtrlCreateButton("Stop", 185, 80, 70, 25);lol
GUICtrlCreateGroup("", 160, 30, 120, 150)

GUICtrlSetOnEvent($tart_record, "_msgs")
GUICtrlSetOnEvent($top_record, "_msgs")
GUICtrlSetOnEvent($tart_play, "_msgs")
GUISetState()

While 1
   If $start = 1 Then
      $count = $count + 1
      $pos = MouseGetPos()
      IniWrite($ini_name, "mouse", "posx" & $count, $pos[0])
      IniWrite($ini_name, "mouse", "posy" & $count, $pos[1])
      GUICtrlSetData($label, $count)
  Else
      Sleep(10)
  EndIf
WEnd



Func _msgs()
   $msg = @GUI_CtrlId
   
   Select
      Case $msg = $tart_record
         $start = 1
         $count = 0
      Case $msg = $top_record
         $start = 0
         IniWrite($ini_name, "mouse", "count", $count);inportant if you dont delete the log...
      Case $msg = $tart_play
         For $i = 1 To IniRead($ini_name, "mouse", "count", 2)
            MouseMove( IniRead($ini_name, "mouse", "posx" & $i, ""), IniRead($ini_name, "mouse", "posy" & $i, ""), 0)
         Next
   EndSelect
EndFunc  ;==>_msgs

Func quit()
  ;FileDelete($ini_name)
   Exit
EndFunc  ;==>quit

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...