Didonet Posted September 8, 2007 Share Posted September 8, 2007 (edited) 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... This is the source:expandcollapse popup; 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 WendLink for download the .exe : here Edited September 9, 2007 by Didonet Link to comment Share on other sites More sharing options...
BAM5 Posted September 8, 2007 Share Posted September 8, 2007 Wow, I tried running it and it said it was already turned on (which it wasn't), but then i realized that it saw the title of this page and thought that was it. [center]JSON Encoding UDF[/center] Link to comment Share on other sites More sharing options...
Didonet Posted September 9, 2007 Author Share Posted September 9, 2007 Wow, I tried running it and it said it was already turned on (which it wasn't), but then i realized that it saw the title of this page and thought that was it.Huh... yea... :"> But what do u think... for first program? Link to comment Share on other sites More sharing options...
Dirk98 Posted September 9, 2007 Share Posted September 9, 2007 Cool little program, made me panic when I couldn't stop it with ESC on the first try. Link to comment Share on other sites More sharing options...
Didonet Posted September 10, 2007 Author Share Posted September 10, 2007 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 Link to comment Share on other sites More sharing options...
Rad Posted September 11, 2007 Share Posted September 11, 2007 if u could not stop it, do this:1. Open task manager2. Find the proccess MouseMover1.1.eng.exe3. Kill the proccess4. 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 More sharing options...
Nahuel Posted September 11, 2007 Share Posted September 11, 2007 Oh rather cool. But when I saw the title I thought it was some script to move your mouse with the keyboard arrows... that could be a nice idea, I believe. Link to comment Share on other sites More sharing options...
3dude Posted September 11, 2007 Share Posted September 11, 2007 Nice Program! Cool View my blog :) 3dude's blog <= help with project :S Link to comment Share on other sites More sharing options...
TK_Incorperate Posted September 11, 2007 Share Posted September 11, 2007 To prevent the bug of finding window names, have it do this If ProcessExists("YourProg.exe") Then MsgBox(0, "Error", "This program is already running, please close it and try to run again.") EndIf Link to comment Share on other sites More sharing options...
AutoItKing Posted September 11, 2007 Share Posted September 11, 2007 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 More sharing options...
Didonet Posted November 5, 2007 Author Share Posted November 5, 2007 @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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now