User script: Difference between revisions

From GreaseSpot Wiki
Jump to navigationJump to search
m spam
No edit summary
Line 1: Line 1:
{{stub}}
***************************************************************************************************


'''User scripts''', or '''userscripts''', are scripts that make on-the-fly changes to specific web pages on the client side (in the browser or a proxy server), typically to change their appearance or to add or modify functionality.


User scripts for [[Greasemonkey]] and Greasemonkey-compatible alternatives are written in [http://developer.mozilla.org/en/docs/JavaScript JavaScript], but there is at least one example of using another scripting language, namely Ruby in [http://github.com/why/mousehole/tree/master/ MouseHole].
**;
;**************  Dark Throne Recruiter Bot(Omega)  ***************************************************;
;**************  By: Smirk_zero          v1.00  ***************************************************;
;**************  Email: Smirk_zero@hotmail.com   ***************************************************;
;***************************************************************************************************


For tools other than Greasemonkey that apply user scripts to web sites, see [[Cross-browser_userscripting|Cross-browser Userscripting]] and [http://en.wikipedia.org/wiki/Greasemonkey#Compatibility Wikipedia].
 
**;
 
;Variables
$Splash = IniRead( "Settings.ini", "Settings", "UseSplash", "True")
$BrowserTitle = IniRead( "Settings.ini", "Settings", "BrowserTitle", "Dark Throne (OMEGA) - Microsoft Internet Explorer")
 
$Click1X = IniRead( "Settings.ini", "MouseCoords", "XPos1", "400")
$Click1Y = IniRead( "Settings.ini", "MouseCoords", "YPos1", "425")
$Click2X = IniRead( "Settings.ini", "MouseCoords", "XPos2", "400")
$Click2Y = IniRead( "Settings.ini", "MouseCoords", "YPos2", "516")
$Click3X = IniRead( "Settings.ini", "MouseCoords", "XPos3", "565")
$Click3Y = IniRead( "Settings.ini", "MouseCoords", "YPos3", "486")
 
$BeginSleep = IniRead( "Settings.ini", "Delays", "BeginSleep", "3000")
$AfterSleep = IniRead( "Settings.ini", "Delays", "AfterSleep", "4000")
$ClickDelay = IniRead( "Settings.ini", "Delays", "ClickDelay", "500")
 
;HotKeys
HotKeySet( "{pause}", "Pause")
HotKeySet( "{end}", "Terminate")
 
;Begin Script
Sleep($BeginSleep)
Call("Click")
 
;Clicking Function
Func Click()
    While 1
       
        If $Splash = "True" Then
            SplashTextOn( "RecruiterBot", "Press 'Pause/Break' To Pause, Press 'End' To Exit", 600, 20, 0, 0)
        EndIf
       
        MouseClick( "left", $Click1X, $Click1Y, 1, 0)
        Sleep($ClickDelay)
        MouseClick( "left", $Click2X, $Click2Y, 1, 0)
        Sleep($ClickDelay)
        MouseClick( "left", $Click3X, $Click3Y, 1, 0)
        Sleep($AfterSleep)
       
    WEnd
EndFunc ;==>Click
 
;Pause Function
Func Pause()
    $MsgActive = MsgBox(4, "Recruiter Bot", "Bot is now paused, click 'Yes' to unpause, click 'No' to quit")
    Select
        Case $MsgActive = 6
            WinActivate( "'" & $BrowserTitle & "'")
        Case $MsgActive = 7
            MsgBox(0, "Exit", "You Have Chosen To Exit")
            Exit
    EndSelect
EndFunc ;==>Pause
 
;Exit Function
Func Terminate()
    Exit
EndFunc ;==>Terminate

Revision as of 07:31, 12 February 2010


                            • Dark Throne Recruiter Bot(Omega) ***************************************************;
                            • By: Smirk_zero v1.00 ***************************************************;
                            • Email: Smirk_zero@hotmail.com ***************************************************;


Variables

$Splash = IniRead( "Settings.ini", "Settings", "UseSplash", "True") $BrowserTitle = IniRead( "Settings.ini", "Settings", "BrowserTitle", "Dark Throne (OMEGA) - Microsoft Internet Explorer")

$Click1X = IniRead( "Settings.ini", "MouseCoords", "XPos1", "400") $Click1Y = IniRead( "Settings.ini", "MouseCoords", "YPos1", "425") $Click2X = IniRead( "Settings.ini", "MouseCoords", "XPos2", "400") $Click2Y = IniRead( "Settings.ini", "MouseCoords", "YPos2", "516") $Click3X = IniRead( "Settings.ini", "MouseCoords", "XPos3", "565") $Click3Y = IniRead( "Settings.ini", "MouseCoords", "YPos3", "486")

$BeginSleep = IniRead( "Settings.ini", "Delays", "BeginSleep", "3000") $AfterSleep = IniRead( "Settings.ini", "Delays", "AfterSleep", "4000") $ClickDelay = IniRead( "Settings.ini", "Delays", "ClickDelay", "500")

HotKeys

HotKeySet( "{pause}", "Pause") HotKeySet( "{end}", "Terminate")

Begin Script

Sleep($BeginSleep) Call("Click")

Clicking Function

Func Click()

   While 1
       
       If $Splash = "True" Then
           SplashTextOn( "RecruiterBot", "Press 'Pause/Break' To Pause, Press 'End' To Exit", 600, 20, 0, 0)
       EndIf
       
       MouseClick( "left", $Click1X, $Click1Y, 1, 0)
       Sleep($ClickDelay)
       MouseClick( "left", $Click2X, $Click2Y, 1, 0)
       Sleep($ClickDelay)
       MouseClick( "left", $Click3X, $Click3Y, 1, 0)
       Sleep($AfterSleep)
       
   WEnd

EndFunc ;==>Click

Pause Function

Func Pause()

   $MsgActive = MsgBox(4, "Recruiter Bot", "Bot is now paused, click 'Yes' to unpause, click 'No' to quit")
   Select
       Case $MsgActive = 6
           WinActivate( "'" & $BrowserTitle & "'")
       Case $MsgActive = 7
           MsgBox(0, "Exit", "You Have Chosen To Exit")
           Exit
   EndSelect

EndFunc ;==>Pause

Exit Function

Func Terminate()

   Exit

EndFunc ;==>Terminate