An example using nextplugin
Written by: webDOMinator 3 years and 2 months ago
Okay, so sometimes you have multiple campaigns you're running on multiple sites and you want one webDOM process to automatically refresh itself and add 100 friends on each site on a consistent rotation over 10 sites?
Here's an example of how that could be done (this code is not tested)
Code
globalQuick Reference for "global"
Click on command to see examples & comments
Variable Setting Commands
Usage: global:variable-name = expression
Description: Sets the variable specified variable-name to expression on a global scope. Expression can be any concatenated string, literal text, or Mathematical expression, and can include other variables, DOM elements, or webDOM settings. Any script or page action script can access a global as long as webDOM is still running.:startupscript=
script.fileQuick Reference for "script.file"
Click on command to see examples & comments
Script Variables
Description: Returns the filename (full path) of the script this variable is used in.
loadpluginQuick Reference for "loadplugin"
Click on command to see examples & comments
Program Level Commands
Usage: loadplugin:filename
Description: Load the site plugin specified by filename. The deprecated version of this command is loadprofile which will still work as an alias to loadplugin.:shared.curplugin
nextpluginQuick Reference for "nextplugin"
Click on command to see examples & comments
Program Level Commands
Usage: nextplugin
Description: Makes webDOM load the next plugin in your Site Plugin list. If webDOM reaches the end of the plugin list, it will start at the beginning.
loginQuick Reference for "login"
Click on command to see examples & comments
Program Level Commands
Usage: login
Description: Perform the login action on the currently loaded site plugin. A site plugin must be loaded, with a username and password entered for this to work.
wait:8
sharedQuick Reference for "shared"
Click on command to see examples & comments
Variable Setting Commands
Usage: shared:variable-name = expression
Description: Sets the variable specified variable-name to expression on a shared scope. Expression can be any concatenated string, literal text, or Mathematical expression, and can include other variables, DOM elements, or webDOM settings. Any current or future instance of webDOM running on your computer will have access to this variable. Note: Do not store valuable information here as variable values are not encrypted and will be written to your hard drive.:curplugin=
wd.pluginQuick Reference for "wd.plugin"
Click on command to see examples & comments
WebDOM Program Variables
Description: Returns the name of the currently loaded plugin
navigateQuick Reference for "navigate"
Click on command to see examples & comments
Browser Level Commands
Usage: navigate:url
Description: Makes the browser navigate to the URL specified.:global.searchurl
setlistfileQuick Reference for "setlistfile"
Click on command to see examples & comments
Program Level Commands
Usage: setlistfile:filename
Description: Sets the list file to save to. This is for use when the automatic list saving option is activated. In your script, before performing the autogather function when you're starting a brand new list, use this command to make it so that webDOM doesn't pop up a "save list" dialogue and halt automation.:workinglist
auto
gatherQuick Reference for "gather"
Click on command to see examples & comments
Program Level Commands
Usage: gather
Description: Gathers all possible items to all used lists. This command will gather from one page only To gather multiple pages, use autogather.:100
add_allQuick Reference for "add_all"
Click on command to see examples & comments
Program Level Commands
Usage: add_all[:number]
Description: Start the automation process of adding all of the people on the currently loaded user ID list as friends. If number is used, then automation will only add that number of friends.:100
shellQuick Reference for "shell"
Click on command to see examples & comments
Filesystem and Shell Commands
Usage: shell:command
Description: Runs a shell command specified by command.:
sys.basedirQuick Reference for "sys.basedir"
Click on command to see examples & comments
System Variables
Description: The webDOM installation directory or base directory.^webDOM.exe -startup="^global.startupscript^"
quitQuick Reference for "quit"
Click on command to see examples & comments
Script Level Commands
Usage: quit
Description: Quits webDOM directly. Note, this does not prompt the user to save progress, so if there is no savelist command being used in the scripts, webDOM will quit without saving.
As the code suggests, it switches to the next plugin and remembers where it left off using shared variables. Then, it logs in, sets up a working list, gathers and adds 100 friends from the search page on each site (must have the default global variable "searchurl" set up in the plugin), and then launch a whole new webDOM to pick up where it left of, and quit the current process, thus freeing up any memory on leaky websites like last.fm.
This code is good for the latest beta builds 15 and up of version 2.5.1 of webDOM, what will be publicly released version 2.5.2 and up.