Jump to content

JReinn

Active Members
  • Posts

    41
  • Joined

  • Last visited

About JReinn

  • Birthday 11/20/1994

Profile Information

  • Location
    Denmark

JReinn's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Thanks, I got it to work. Just added "#requireadmin" at the top of the script. Have a nice day :-)
  2. Hey, I've made (or tried to make) a script that would block a user-input website for user-input X amount of time. I was out with my friends yesterday and I asked them if they had any ideas for what I should code. They told me that when they're drunk they and go on Facebook, they usually post something that they wished they didn't. Therefore they wanted me to make a script that would block facebook for X amount of time. So I guess my problem is that the method I'm using isn't working. The hosts file found at: "C:\WINDOWS\system32\drivers\etc\hosts" can't be replaced without Admin rights. I've tried to run this from within Scite, and I've also tried to compile the script to a ".exe" and running it as admin. It still didn't help. Any ideas? Script: ;Script for being unable to access user-chosen websites for X amount of time. ;To do: ; * Find a way to overwrite the real hosts file (Maybe run as admin) ; * Make an "Unblock" script if someone (or the script) accidentally does something it shouldn't #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Website Blocker", 287, 125, 192, 124) $Website = GUICtrlCreateLabel("Website to block:", 8, 16, 87, 17) $Time = GUICtrlCreateLabel("Amount of time", 8, 48, 74, 17) $Input1 = GUICtrlCreateInput("www.facebook.com", 104, 16, 177, 21) GUICtrlSetTip(-1, "This is where you input the website, that you want to block the access to.") $Input2 = GUICtrlCreateInput("1", 104, 48, 49, 21) GUICtrlSetTip(-1, "This is where you input the X amount of time, you would like to block the aforementioned website for.") $Combo1 = GUICtrlCreateCombo("Hour(s)", 176, 48, 57, 25) GUICtrlSetData(-1, "Minute(s)|Second(s)") GUICtrlSetTip(-1, "This is where you choose if you want the amount of time to be in seconds, minutes or hours.") $Button1 = GUICtrlCreateButton("Block website!", 104, 88, 89, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 Block() EndSwitch WEnd Func Block() FileCopy("C:\WINDOWS\system32\drivers\etc\hosts", @Scriptdir & "\hostsbackup") FileCopy("C:\WINDOWS\system32\drivers\etc\hosts", @Scriptdir & "\hosts") FileWrite(@ScriptDir & "\hosts", @CRLF & "127.0.0.1 " & GUICtrlRead($Input1)) $write = FileCopy(@ScriptDir & "\hosts", "C:\WINDOWS\system32\drivers\etc\hosts", 1) If $write = 0 Then MsgBox(64, "Error", "An error has occured with blocking " & GuiCtrlRead($Input1), 5) Exit Else EndIf GUISetState(@SW_HIDE) If GuiCtrlRead($Combo1) = "Hour(s)" Then Dim $Sleep = GuiCtrlRead($Input2) * 60 * 60 ElseIf GuiCtrlRead($Combo1) = "Minute(s)" Then Dim $Sleep = GuiCtrlRead($Input2) * 60 ElseIf GuiCtrlRead($Combo1) = "Second(s)" Then Dim $Sleep = GuiCtrlRead($Input2) Else EndIf For $s = $Sleep To 0 Step -1 Sleep(1000) $Tseconds=$s $hours = int($Tseconds/3600) $Remsecs = $Tseconds - ($hours * 3600) $minutes = int($Remsecs / 60) $Seconds = $Remsecs - ($minutes * 60) $TT = ToolTip(GUICtrlRead($Input1) & " will be unblocked in " & $hours & " hour(s), " & $minutes & " minute(s) and " & $Seconds & " second(s).", 5, 5, "Countdown until block removed" & @CRLF & "This script has been written by Reinn. Educational purposes only, all rights reserved - 2012.", 1) Next Dim $TT = ToolTip("") $Copy = FileCopy(@ScriptDir & "\hostsbackup", "C:\WINDOWS\system32\drivers\etc\hosts", 1) If $Copy = @error Then MsgBox(64, "Error", "An error has occured with unblocking " & GuiCtrlRead($Input1), 5) Exit Else FileDelete(@ScriptDir & "\hosts") EndIf MsgBox(64, "Unblocked", "The website: " & GuiCtrlRead($Input1) & " has been unblocked and is now accesible.", 5) Exit EndFunc
  3. Wow thanks, fast reply... Just what I needed! Thanks!
  4. #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### $Form1 = GUICreate("*Random Fraze*", 277, 157, 192, 124) $Button1 = GUICtrlCreateButton("Start", 88, 64, 105, 25, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndIf Case $Button1 While 2 ;Loop Start Run("Notepad.exe") Sleep(1000) $Random = Random(1, 104, 1) Switch $Random Case 1 $nValue = "Football" Case 2 $nValue = "Playstation 3" Case 3 $nValue = "Spiderman" Case 4 $nValue = "Good money guide" Case 5 $nValue = "free wow gold" Case 6 $nValue = "how to get wow gold fast" Case 7 $nValue = "warcraft 3 hacks" Case 8 $nValue = "wow hacks" Case 9 $nValue = "d3scene.com" Case 10 $nValue = "mmowned.com hacks and cheats" Case 11 $nValue = "good ptc site" Case 12 $nValue = "cheap vacations" Case 13 $nValue = "Nba championship" Case 14 $nValue = "funny vidoes" Case 15 $nValue = "funny animals" Case 16 $nValue = "funny clips" Case 17 $nValue = "free music downloads" Case 18 $nValue = "free downloads" Case 19 $nValue = "funny humans" Case 20 $nValue = "trustworthy paying sites" Case 21 $nValue = "game forums" Case 22 $nValue = "hacking forums" Case 23 $nValue = "how to get free money" Case 24 $nValue = "vending machine hacks" Case 25 $nValue = "youtube.com advertising guide" Case 26 $nValue = "youtube.com advertising?" Case 27 $nValue = "google advertising guide" Case 28 $nValue = "warhammer online faq" Case 29 $nValue = "warhammer online pics" Case 30 $nValue = "neobux.com payment proof" Case 31 $nValue = "blacksmithing projects" Case 32 $nValue = "welder info" Case 33 $nValue = "how to be emo" Case 34 $nValue = "how to be gangster" Case 35 $nValue = "myspace advertising" Case 36 $nValue = "money guide" Case 37 $nValue = "how to make batch files" Case 38 $nValue = "batch fil commands" Case 39 $nValue = "colormyprofile" Case 40 $nValue = "alt codes" Case 41 $nValue = "free schoolproject downloads" Case 42 $nValue = "free novel downloads for school" Case 43 $nValue = "drawing forum" Case 44 $nValue = "how to trick the police" Case 45 $nValue = "how to behave against others" Case 46 $nValue = "free hacks and tools for games" Case 47 $nValue = "world clock" Case 48 $nValue = "blackhatforums" Case 49 $nValue = "Nazakada" Case 50 $nValue = "Harry Potter info" Case 51 $nValue = "Hermione" Case 52 $nValue = "Ron - Harry Potter" Case 53 $nValue = "The lord of the rings ebook" Case 54 $nValue = "money making guide ebook" Case 55 $nValue = "how to earn loads of money fast" Case 56 $nValue = "easy paypal money" Case 57 $nValue = "math forms" Case 58 $nValue = "wikipedia.pl" Case 59 $nValue = "marcdk" Case 60 $nValue = "Winner" Case 61 $nValue = "how to train your writing skills" Case 62 $nValue = "welder pictures" Case 63 $nValue = "free movies" Case 64 $nValue = "free music" Case 65 $nValue = "free games download" Case 66 $nValue = "warez forums" Case 67 $nValue = "free gifts" Case 68 $nValue = "free presents" Case 69 $nValue = "dailymotion" Case 70 $nValue = "dailyhaha" Case 71 $nValue = "how to be a good boyfriend" Case 72 $nValue = "Free proxy" Case 73 $nValue = "free proxies" Case 74 $nValue = "good proxy site" Case 75 $nValue = "hidemyass" Case 76 $nValue = "automated youtube accounts" Case 77 $nValue = "programs for youtube views" Case 78 $nValue = "free photoshop torrent" Case 79 $nValue = "Utorrent" Case 80 $nValue = "Download msn messenger" Case 81 $nValue = "newest messenger update" Case 82 $nValue = "free messenger emotions" Case 83 $nValue = "fireproxy server" Case 84 $nValue = "good programming language" Case 85 $nValue = "C++ tuts" Case 86 $nValue = "Asm tuts" Case 87 $nValue = "good tutorials for C++" Case 88 $nValue = "Asm Tutorials (good)" Case 89 $nValue = "download Vb6 studio" Case 90 $nValue = "best warez-site" Case 91 $nValue = "radioblogclub.com" Case 92 $nValue = "How to paint your hair" Case 93 $nValue = "Html tutorial" Case 94 $nValue = "Css Tutorials" Case 95 $nValue = "Counterstrike hacks and cheats" Case 96 $nValue = "wallhack" Case 97 $nValue = "material hack" Case 98 $nValue = "starcraft 2 release" Case 99 $nValue = "warcraft 4 release date" Case 100 $nValue = "Good working proxy list" Case 101 $nValue = "cheap laptops" Case 102 $nValue = "surveys" Case 103 $nValue = "how to setup vbulletin" Case 104 $nValue = "how to setup your own forum" EndSwitch Sleep(1000) Send($nValue) Sleep(100) Send("{Enter}") WEnd ;End Loop EndSwitch WEnd That way it takes one of the 104 random words/frazes. But I would like to ask, if it can take the words from a .txt file. Like you have a file with 100 words, and you would like to use that instead. (So you have like 2 Radio buttons saying: "Use frazes in Bot" & "Use my own frazes", and then you have to search for your file. Any help is appreciated. Thanks.
  5. You can just use:ShellExecute("http://www.Autoitscript.com/")oÝ÷ ØêÞDz¢ç;¬¶Æ²jëh×6Run("C:\Program Files\Mozilla Firefox\Firefox.exe") Sleep(5000) Send("{F6}") Sleep(1000) Send("http://www.Autoitscript.com/") Sleep(500) Send("{Enter}")
  6. Okey First of all, I understand why you don't want to write the whole code, but atleast help meh with the ini thing will do... I'll try to make a code myself, and MAYBE come back and ask for help to end it.
  7. This searches for you. You input a fraze, and it can search: Google, Youtube, Wikipedia, etc. It also has a search function for a site called D3scene.com, where I contribute with my AutoIt bots. (That's the function you need the resolution for, else you don't need it #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=d:\users\jan\desktop\applications\koda\forms\winner's search is easy bot v2.kxf $Form1 = GUICreate("WinneR's Search Is easy bot 2nd edition", 412, 495, 192, 124) $Input1 = GUICtrlCreateInput("D3Scene.com", 32, 16, 161, 21) $Button1 = GUICtrlCreateButton("Search Google!", 32, 48, 161, 25, 0) $Input2 = GUICtrlCreateInput("WinneR", 240, 16, 161, 21) $Button2 = GUICtrlCreateButton("View user profile", 240, 48, 161, 25, 0) $Button3 = GUICtrlCreateButton("Visit D3Scene.com for Hacks, Bots and Tools", 80, 400, 249, 57, 0) $Button4 = GUICtrlCreateButton("About", 176, 200, 81, 33, 0) $Button5 = GUICtrlCreateButton("Copyrights", 160, 152, 113, 41, 0) $Input3 = GUICtrlCreateInput("Neobux", 32, 88, 161, 21) $Input4 = GUICtrlCreateInput("D3Scene.com", 240, 88, 161, 21) $Button7 = GUICtrlCreateButton("Search YouTube", 32, 120, 163, 25, 0) $Button8 = GUICtrlCreateButton("Search Wikipedia", 240, 120, 161, 25, 0) $Input5 = GUICtrlCreateInput("WinneR's Search Is Easy bot", 32, 248, 161, 21) $Button9 = GUICtrlCreateButton("Search D3Scene.com", 32, 280, 161, 25, 0) $Input6 = GUICtrlCreateInput("24.S07E08.HDTV.XviD-LOL", 240, 248, 161, 21) $Button6 = GUICtrlCreateButton("Search Subscene.com", 240, 280, 161, 25, 0) $Input7 = GUICtrlCreateInput("24.S07E08.HDTV.XviD-LOL", 32, 336, 161, 21) $Button10 = GUICtrlCreateButton("Search Opensubtitles.org", 32, 368, 163, 25, 0) $Input8 = GUICtrlCreateInput("24.S07E08.HDTV.XviD-LOL", 240, 336, 161, 21) $Button11 = GUICtrlCreateButton("Search Warez-bb", 240, 368, 161, 25, 0) $Combo1 = GUICtrlCreateCombo("Choose your resolution", 120, 464, 153, 25) GUICtrlSetData(-1, "1280*1024|1280*768|1024*768") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $BUTTON1 _SEARCH_GOOGLE(GUICtrlRead($INPUT1), "com") Case $BUTTON2 ShellExecute("http://www.d3scene.com/forum/members/" & GUICtrlRead($Input2) & ".html") Case $BUTTON3 $v = MsgBox(0x44, "WinneR's Search Is easy bot 2nd edition", "You are now being taken to www.D3scene.com, do you want to go to the registration site right away?") If ( $v == 6 ) Then ShellExecute("http://www.d3scene.com/forum/register.php") Else ShellExecute("http://www.d3scene.com/") EndIf Case $BUTTON4 MsgBox(1,"About", "This is a bot made by WinneR from D3Scene.com, it can be used for searching: Google, YouTube, Wikipedia, D3Scene.com, Subscene.com, Opensubtitles.org, Warez-bb.org and to view user profiles on D3Scene.com. The resolution stuff top down is needed for the Search D3Scene.com feature only.") Case $BUTTON5 MsgBox(1, "Copyrights", "This application is made by WinneR from D3Scene.com (With help from AlmarM from the AutoIt forum) - Copyright by D3Scene.com & WinneR - All rights reserved.") Case $BUTTON6 ShellExecute("http://subscene.com/s.aspx?q=" & GuiCtrlRead($Input6)) Case $BUTTON7 ShellExecute("http://www.youtube.com/results?search_query=" & GUICtrlRead($INPUT3) & "&search_type=") Case $BUTTON8 ShellExecute("http://en.wikipedia.org/wiki/" & GUICtrlRead($INPUT4)) Case $Button9 ShellExecute("http://www.d3scene.com/forum/search.php") Sleep(15000) If GuiCtrlRead($Combo1) = "1280*1024" Then MouseClick("Left",415,682,1,1000) If GuiCtrlRead($Combo1) = "1280*768" Then MouseClick("Left",434,682,1,1000) If GuiCtrlRead($Combo1) = "1024*768" Then MouseClick("Left",331,682,1,1000) EndIf EndIf EndIf Sleep(200) Send(GuiCtrlRead($Input5)) Sleep(500) Send("{Enter}") Case $Button10 ShellExecute("http://www.opensubtitles.org/en/search2/sublanguageid-all/moviename-" & GuiCtrlRead($Input7)) Case $Button11 ShellExecute("http://www.warez-bb.org/search.php") MsgBox(0,"Error","Warez-bb is an illegal site. *Search MAY be fixed later.*") EndSwitch WEnd Func _SEARCH_GOOGLE($AKEYWORDS, $ALANGUAGE) ShellExecute("http://www.google." & $ALANGUAGE & "/search?hl=" & $ALANGUAGE & "&q=" & $AKEYWORDS & "&meta=") EndFunc
  8. Thanks for all the replies guys, and sorry I haven't answered sooner, I was queit bussy. Thanks especially to: Manadar for googling it, and thanks for all the answers.. If there is anything I can do for ANY of you please tell me, and I will see what I can do about it.
  9. Tool that can turn on chosen applications, or go to chosen websites, with the click of a button. (The user choses how many buttons there should be) (User configures himself (When user closes, it asks if it should save the config as an .ini file (Here is the problem, I don't know how to deal with the ini stuff))) Else then .ini I could do myself, I believe, but I am sure my code would be TOTALLY messed up & Maybe also the How many buttons thing. I could post it here afterwards, for a checking maybe. If someone is going to post the WHOLE code here, please write comments explaining why the code is that way/what the code is used for, so I learn something from it - Thanks. Please help, Thankies!
  10. Hello people! I want a thing that installs a pic you choose as the boot screen. (My Girl friend, for example.) I also want the possibility to make it so, I choose the pic, that is set for anyone who runs it. Is there any possible way to make this in autoit? Thanks in advance.
  11. Yep, Exactly! ... I have the code now, I made it even better If you want I can send it to you over MSN ^^
  12. Okey guys, I will just re-write the code, thanks for the info!
  13. Hey, I made this bot some time ago I was thinking of adding something to it, but my code file is gone because I re-formated my PC... Is there any way that I can get my code back, or do I have to write the code up again? (There were some really good code methods in this suchass: Opening your standard browser instead of using Run("C:\Program Files\Internet Explorer\iexplore.exe"). I just don't remember the stuff. Hope someone can help me! WinneR_s_Search_Is_easy_bot.exe
  14. Working, thanks!
×
×
  • Create New...