Jump to content

my first lovely script


Recommended Posts

; Script generated by AutoBuilder 0.6 Prototype

#include <GuiConstants.au3>

GuiCreate("Activeaza si Dezactiveaza - Made By Mircea Moisoiu", 427, 396,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Button_1 = GuiCtrlCreateButton("Activeaza Winamp", 40, 60, 120, 40)
$Button_2 = GuiCtrlCreateButton("Dezactiveaza Winamp", 220, 60, 130, 40)
$Button_3 = GuiCtrlCreateButton("Activeaza Tv-Tunner", 40, 130, 120, 40)
$Button_4 = GuiCtrlCreateButton("Dezactiveaza Tv-Tunner", 220, 130, 130, 40)
$Button_5 = GuiCtrlCreateButton("Activeaza Internetul", 40, 200, 120, 40)
$Button_6 = GuiCtrlCreateButton("Dezactiveaza Internetul", 220, 200, 130, 40)
$Button_7 = GuiCtrlCreateButton("Activeaza Statusul", 40, 270, 120, 40)
$Button_8 = GuiCtrlCreateButton("Dezactiveaza Statusul", 220, 270, 130, 40)
$Button_9 = GuiCtrlCreateButton("Activeaza Toate", 40, 330, 320, 20)
$Button_10 = GuiCtrlCreateButton("Dezactiveaza toate", 40, 360, 320, 20)
$Date_11 = GuiCtrlCreateDate("Date11", 280, 10, 130, 30)
$Label_12 = GuiCtrlCreateLabel("activeaza - dezactiveaza internetul si ce mai ai (merge doar la mircea)", 30, 20, 240, 30)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Button_1
        run("D:\Z ce porneste automat cand pornesti calculatorul\Winamp\doar adauga la registru winamp.exe")
        run("D:\Z ce porneste automat cand pornesti calculatorul\Tv tunner\sterge registru TvTunner.exe")
        MsgBox(0,"Winamp Activat", "Data viitoare cand pornesti calculatorul DOAR Winampul va porni automat")
    Case $msg = $Button_2
        run("D:\Z ce porneste automat cand pornesti calculatorul\Winamp\sterge registru winamp.exe")
        MsgBox(0,"Winamp Dezactivat","Data viitoare cand pornesti calculatorul Winampul nu va mai porni automat")
    Case $msg = $Button_3
        run("D:\Z ce porneste automat cand pornesti calculatorul\Tv tunner\Doar adauga la registru Tv Tunner.exe")
        run("D:\Z ce porneste automat cand pornesti calculatorul\Winamp\sterge registru winamp.exe")
        MsgBox(0,"Tv-Tunner Activat","Data Viitoare cand pornesti calculatorul Tv-Tunnerul va porni automat")
    Case $msg = $Button_4
        run("D:\Z ce porneste automat cand pornesti calculatorul\Tv tunner\sterge registru TvTunner.exe")
        run("D:\Z ce porneste automat cand pornesti calculatorul\Winamp\sterge registru winamp.exe")
        MsgBox(0,"Tv-tunner Dezactivat", "Tv-Tunnerul a fost dezactivat")
    Case $msg = $Button_5
        run("D:\Z ce porneste automat cand pornesti calculatorul\Internet\doar adauga internet la registru.exe")
        Msgbox(0,"Internet Activat", "Internetul a fost activat")
    Case $msg = $Button_6
        run("D:\Z ce porneste automat cand pornesti calculatorul\Internet\sterge registru internet.exe")
        Msgbox(0,"Internet Dezactivat", "Internetul a fost Dezactivat")
    Case $msg = $Button_7
        run("D:\Z ce porneste automat cand pornesti calculatorul\Yahoo Status\Doar adauga la registru Yahoo Status.exe")
        MsgBox(0,"Status Activat", "Statusul pentru Yahoo a fost Activat")
    Case $msg = $Button_8
        run("D:\Z ce porneste automat cand pornesti calculatorul\Yahoo Status\sterge registru Yahoo status.exe")
        MsgBox(0,"Status Dezactivat", "Statusul pentru Yahoo a fost Dezactivat")
    Case $msg = $Button_9
        run("D:\Z ce porneste automat cand pornesti calculatorul\Winamp\doar adauga la registru winamp.exe")
        run("D:\Z ce porneste automat cand pornesti calculatorul\Tv tunner\Doar adauga la registru Tv Tunner.exe")
        run("D:\Z ce porneste automat cand pornesti calculatorul\Internet\doar adauga internet la registru.exe")
        run("D:\Z ce porneste automat cand pornesti calculatorul\Yahoo Status\Doar adauga la registru Yahoo Status.exe")
        MsgBox(0,"Toate Functiile Activate", "Winamp, Tv-Tunner, Internet, Yahoo Status au fost Activate")
    case $msg = $Button_10
        run("D:\Z ce porneste automat cand pornesti calculatorul\Winamp\sterge registru winamp.exe")
        run("D:\Z ce porneste automat cand pornesti calculatorul\Tv tunner\sterge registru TvTunner.exe")
        run("D:\Z ce porneste automat cand pornesti calculatorul\Internet\sterge registru internet.exe")
        run("D:\Z ce porneste automat cand pornesti calculatorul\Yahoo Status\sterge registru Yahoo status.exe")
        MsgBox(0,"Toate Functiile Dezactivate", "Winamp, Tv-Tnner, Internet, Yahoo Status au fost Dezactivate")
        
    
    
    EndSelect
WEnd
Exit

this program helps me at each time i start my computer to activate something like winamp and yahoo or internet conexion my YAHOO Status and lot more

well please tell me how is my first script ??? :shocked:

and if you like it? and what should i add more :( some dunno things that i dont know yet :P

and by the way please make it better AUTOBUILDER it helps you a lot

and i got more scripts any script that has .exe is made with AUTOIT ;) so is cool is much easier then C++ and tell me if i am wrong is almost the same as C++

Link to comment
Share on other sites

Well for your first script I will say good job and keep trying.

What should be improved is The run command, I suggest you use Runwait because you running 3 or more program at the same time and it may cause high CPU usage and unneccessary lagness.

Browse around the help file and you will find things you need or may want to add in.

For the last question this is close? Since yours only runs exe, but for other stuff you may find the difference.

Edited by Generator
Link to comment
Share on other sites

Good job Mircea! One more post to you can put it in example scripts :shocked:

Lol a suggestion if he will put in Example Script. Change the language and use filesearch instead of direct dictionary because for everyone it's different.
Link to comment
Share on other sites

Good work buddy :P

I was quite surprised when I've seen the code because the language you've used is so familiar to me :shocked: however ... it will be a good idea to translate all messages inside (or at least what can be safely changed) to english.

Welcome to AutoIt community and hope to see more ... :(

Good luck

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
Share on other sites

well yes is fun :shocked: i think i will learn it but i got job and school anyway, here are the source code from the other files and please tell me about RUNWAIT is the same as RUN or what ? what is doing more

1) this is my internet conection script ( i got WAN conection and PPPoE so i made a first script for this to start automaticly)

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "porneste internetul automat", "REG_SZ", "D:\Z ce porneste automat cand pornesti calculatorul\internet\internet.exe")

sleep(20000)

send("^{ESC}")
sleep(300)
send("t")
sleep(300)
send("{right}")
sleep(300)
send("{enter}")
sleep(300)
Winwaitactive("Connect RDS oradea")
sleep(300)
send("{enter}")

2)This is for the Tv-Tunner ( dang sometimes i use my Tv-Tunner or Winamp as Alarm Clock lol

sleep(3000)
RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "porneste Tv Tunnerul automat", "REG_SZ", "D:\Z ce porneste automat cand pornesti calculatorul\Tv tunner\Tv Tunner.exe")

sleep(8000)

run("C:\Program Files\WinFast\WFTVFM\WFTV.exe")

3)This is the same as Tv-Tunner only is Winamp ( and it start automaticly to play )

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "porneste winampul automat", "REG_SZ", "D:\Z ce porneste automat cand pornesti calculatorul\winamp\winamp.exe")


sleep(8000)
run("C:\Program Files\Winamp\winamp.exe")
WinWaitActive("Player Window")
send("x")

4) Well this is for my YAHOO! Status :( because not all the time i wake up lol

RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "pune statusul de dimineata la yahoo", "REG_SZ", "D:\Z ce porneste automat cand pornesti calculatorul\yahoo status\yahoo status.exe")

sleep(30000)
run("C:\Program Files\Yahoo!\Messenger\YahooMessenger.exe")
winwaitactive("Yahoo! Messenger")
send("!m")
send("u")
send("n")
sleep("1000")
winwaitactive ("Enter your status message")
send("daca e ora 8.00-8.30-9.00 dimineata sunt sanse sa dorm asa ca lasativa mesagele si va voi raspunde cand ma trezesc")
send("{enter}")

well i got a few but those are only to add\remove the .reg to the regedit

well i hope you like it and i am waiting for the answer to the Run and Runwait command

and please tell me this too - What is the command to use the mouse to select something like all the text ( without using the command CTRL-A ) i want only the mouse to use

thank you

Edited by mircea
Link to comment
Share on other sites

Runwait will execute your command and wait for it to finish.

run will continue after launching the command.

runwait("notepad.exe")
run("notepad.exe)
msgbox(48, "HELLO", "Did you catch that?")

Happy scripting, keep e'm coming :shocked:

Link to comment
Share on other sites

well yes is fun :shocked: i think i will learn it but i got job and school anyway, here are the source code from the other files and please tell me about RUNWAIT is the same as RUN or what ? what is doing more

Run just attempts to make Windows start something and then immediately continues the rest of the script. RunWait waits until the command has finished before continuing with the script.

For example. This code:

While 1
    RunWait("notepad.exe")
WEndoÝ÷ Û¥»§6^¥§ZÛaz|Û§¶)b¶«¢¶Æ§vØ^·«ºshµêZw÷ܨ¹Æ§¶¼­+,i÷¥Éh^­æ¬jëh×6While 1
    Run("notepad.exe")
WEnd

... will totally trash your Windows session by starting hundreds of Notepad's per second. It is NOT ADVISED to test this if you were not planning a cold reboot! :(

Edited by SadBunny

Roses are FF0000, violets are 0000FF... All my base are belong to you.

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