Skip to content

Instantly share code, notes, and snippets.

@LeCoupa
Last active August 12, 2022 10:47
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save LeCoupa/06e878fd331c36c550eb to your computer and use it in GitHub Desktop.
Save LeCoupa/06e878fd331c36c550eb to your computer and use it in GitHub Desktop.
iMacros Bootstrap. Write your Macros with JavaScript --> https://github.com/LeCoupa/awesome-cheatsheets
// iMacros Bootstrap - Write your macros with JavaScript.
// Be careful, you need to rename and set the extension of your macro to ".js".
// 1. Variables Initialization.
var variable1, variable2, variable3;
macro = "";
variable1 = "";
variable2 = "";
variable3 = "";
// 2. Built-in Variables & Macro Initialization.
macro += "CODE:" + "\n";
macro += "SET !TIMEOUT_STEP 2" + "\n";
macro += "SET !TIMEOUT_TAG 2" + "\n";
macro += "SET !TIMEOUT_PAGE 45" + "\n";
macro += "SET !ERRORIGNORE YES" + "\n";
// 3. Clear Cookies, Cache and Set a Proxy
macro += "CLEAR" + "\n";
macro += "PROXY ADDRESS=" + proxy + "\n";
// 4. Action 1.
macro += "TAB T=1" + "\n";
macro += "TAB CLOSEALLOTHERS" + "\n";
macro += "WAIT SECONDS=5" + "\n";
macro += "URL GOTO=https://gentlenode.com/" + "\n";
// 5. Action 2.
macro += "URL GOTO=http://journal.gentlenode.com/" + "\n";
macro += "WAIT SECONDS=5" + "\n";
// 7. Clear Browser.
macro += "WAIT SECONDS=1" + "\n";
macro += "CLEAR" + "\n";
// 8. Run the Macro.
iimDisplay("iMacro is now running.");
iimPlay(macro);
@RajeshAppu
Copy link

Hi,

Can any one help with CLEAR command, since its not working in JAVA script in imacro

macro += "CLEAR" + "\n";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment