Jump to content

MouseMover v1.1


Didonet
 Share

Recommended Posts

Hello! :) This is my first complete program made in Auto-IT.

The idea of the program is some kind of dummy.. but thats my first program :)

Now, the idea: the program moves your mouse left-right as long as u turn it off. The idea is that u can your computer is always alive... :P

This is the source:

; Mouse Mover v1.1
; By Dido_net (c) 07.09.2007

#include <GuiConstants.au3>
#include <Constants.au3>
#NoTrayIcon
Opt("TrayOnEventMode", 2)
Opt("TrayMenuMode", 1)

Func ExitEvent()
    Exit
EndFunc

Global $title
Global $version
Global $height
Global $width1
Global $width2
Global $start
Global $about
Global $round

$round = 0
$version = "v1.1"
$title = "Mouse Mover " & $version

If WinExists($title)Then
    Msgbox(0, $title, $title & " is turned on already!")
    Exit
EndIf

$height = @DesktopHeight / 2
$width1 = @DesktopWidth - @DesktopWidth / 10
$width2 = @DesktopWidth / 10
$about_txt = "Hello! This is " & $title & ", a program witch allows you to move your cursor on the desktop when you are not in front of your computer. To start the process, please, click the button 'S&tart'. For exit use the button E&scape on your keyboard!"



$tray_open = TrayCreateItem("Show")
TrayItemSetOnEvent(-1, "showGui")
$tray_exit = TrayCreateItem("Exit")
TrayItemSetOnEvent(-1,"ExitEvent")
TraySetState()


Func hideAbout()
    GUIDelete()
EndFunc

Func showAbout()
    GUICreate("За " & $title, 275, 95)
        GuiCtrlCreateLabel( $about_txt, 5, 5, 265, 75 )
        GuiCtrlCreateLabel( "By &Dido_net (c) 07.09.2007", 140, 80 )
        GUISetState()
    While 1
        $msg = GUIGetMsg()
                
            Select
                
            Case $msg = $GUI_EVENT_CLOSE
                GuiDelete()
                ExitLoop
                
            EndSelect
    WEnd
    
EndFunc

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

Func showGui()
    Global $round
    GUICreate( $title, 210, 130 )
    GUISetState ()

    GuiCtrlCreateLabel("Hi, " & @UserName & "!", 5, 5)
    GuiCtrlCreateLabel("Display Info:", 5, 25)
    GuiCtrlCreateLabel("------------------------------------------------------------------", 5, 38)
    GuiCtrlCreateLabel("Screen Width: " & @DesktopWidth, 5, 51)
    GuiCtrlCreateLabel("Screen Height: " & @DesktopHeight, 5, 64)
        GuiCtrlCreateLabel("Count of turns: " & $round, 5, 77)
    $start = GuiCtrlCreateButton( "S&tart", 5, 105, 40, 20)
    $about = GuiCtrlCreateButton( "A&bout", 155, 105, 40, 20)
EndFunc

showGui()

While 1

$msg = GUIGetMsg()

    Select
        
    Case $msg = $GUI_EVENT_CLOSE
        GuiDelete()
        
    Case $msg = $GUI_EVENT_MINIMIZE
        GuiDelete()
        
    Case $msg = $about
        showAbout()
    Case $msg = $start
        Func sExit()
            showGui()
            ExitLoop
        EndFunc
        While 1
        GuiDelete()
        TrayTip("", "For exit use the Escape button!", 5)
        ExitLoop
        WEnd
    
        While $start
        $round += 1
        MouseMove($width1, $height)
        MouseMove($width2, $height)
        WEnd
    
    EndSelect
Wend

Link for download the .exe : here

Edited by Didonet
Link to comment
Share on other sites

if u could not stop it, do this:

1. Open task manager

2. Find the proccess MouseMover1.1.eng.exe

3. Kill the proccess

4. Be Happy :)

CTRL+Break in SciTE to terminate it, you wont be able to use task manager to save you when your MOUSE gets attacked :)

Link to comment
Share on other sites

Great for your first full script! But couldn't you just turn of your power-saving options and screen-saver?

And your spelling of AutoIt is wrong.

http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script]
Link to comment
Share on other sites

  • 1 month later...

@AutoItKing, i can <_< But I was thinking what to do... and that was the first dummy it crosses my mind.

@TK_Incorperate, no, if you check if the process is started... you start it first :) And the result everytime is "running", because you run the program to check does it is running.

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