Help with browser script.
Moderators: Dorian (MJT support), JRL
-
- Newbie
- Posts: 11
- Joined: Sun Mar 06, 2011 11:06 pm
Help with browser script.
I have been trying my hardest to figure out the missing pieces in this macro...
I cannot figure out how to add the window event trigger.
Basically it should wait until the google chrome crashes (and it will) and once the crash box appears, restart it and restore the page automatically, then go back into monitor mode...
I recorded the strokes via recorder and i thought it would be simple as adding the window trigger via properties but no luck there what am I missing here?
//12\ChromeAssure27.scp
// Recorded on Sunday, March 6, 2011, at 02:59 PM
//Recorded Events
Let>WW_TIMEOUT=5
CapsOff
WaitWindowOpen>Workspace Macro Pro - Automation Edition
MoveWindow>Workspace Macro Pro - Automation Edition,604,2
ResizeWindow>Workspace Macro Pro - Automation Edition,800,533
MouseMove>734,574
Wait>3.61
LDown
WaitWindowOpen>Google Chrome
MoveWindow>Google Chrome,530,452
ResizeWindow>Google Chrome,347,145
Wait>0.14
LUp
WaitWindowOpen>New Tab - Google Chrome
MoveWindow>New Tab - Google Chrome,-3,421
ResizeWindow>New Tab - Google Chrome,1402,576
Wait>2.63
MouseMove>677,517
Wait>1.93
LClick
WaitWindowOpen>Blogspot - Google Chrome
MoveWindow>Blogspot - Google Chrome,-3,421
ResizeWindow>Blogspot - Google Chrome,1402,576
Wait>3.73
MouseMove>671,477
Wait>9.93
LClick
Wait>4.36
Press Backspace
I cannot figure out how to add the window event trigger.
Basically it should wait until the google chrome crashes (and it will) and once the crash box appears, restart it and restore the page automatically, then go back into monitor mode...
I recorded the strokes via recorder and i thought it would be simple as adding the window trigger via properties but no luck there what am I missing here?
//12\ChromeAssure27.scp
// Recorded on Sunday, March 6, 2011, at 02:59 PM
//Recorded Events
Let>WW_TIMEOUT=5
CapsOff
WaitWindowOpen>Workspace Macro Pro - Automation Edition
MoveWindow>Workspace Macro Pro - Automation Edition,604,2
ResizeWindow>Workspace Macro Pro - Automation Edition,800,533
MouseMove>734,574
Wait>3.61
LDown
WaitWindowOpen>Google Chrome
MoveWindow>Google Chrome,530,452
ResizeWindow>Google Chrome,347,145
Wait>0.14
LUp
WaitWindowOpen>New Tab - Google Chrome
MoveWindow>New Tab - Google Chrome,-3,421
ResizeWindow>New Tab - Google Chrome,1402,576
Wait>2.63
MouseMove>677,517
Wait>1.93
LClick
WaitWindowOpen>Blogspot - Google Chrome
MoveWindow>Blogspot - Google Chrome,-3,421
ResizeWindow>Blogspot - Google Chrome,1402,576
Wait>3.73
MouseMove>671,477
Wait>9.93
LClick
Wait>4.36
Press Backspace
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
I'm not sure what you are trying to achieve. It may help to just explain what you want to do. Your script just appears to wait for some windows to appear and then press keys like Up. Why would this cause Chrome to crash? What window are you wanting to set up a trigger for?
Maybe go back to basics, show us some screenshots and instead of posting a script explain the process you are following, the keys you need to press and the outcome you are looking for.
Maybe go back to basics, show us some screenshots and instead of posting a script explain the process you are following, the keys you need to press and the outcome you are looking for.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Newbie
- Posts: 11
- Joined: Sun Mar 06, 2011 11:06 pm
no the macro doesn't cause chrome to crash, i want it to start up when chrome crashes,
When chrome crashes a dialogue box appears asking you to restart? you click yes, it restarts then it ask you to restore lest session, so that is another click. the backspace just clears whatever was in the URL address bar.
For some reason though when the browser crashes the macro isn't starting.
When chrome crashes a dialogue box appears asking you to restart? you click yes, it restarts then it ask you to restore lest session, so that is another click. the backspace just clears whatever was in the URL address bar.
For some reason though when the browser crashes the macro isn't starting.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Please send a screenshot of the message that appears when Chrome crashes.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Newbie
- Posts: 11
- Joined: Sun Mar 06, 2011 11:06 pm
here is the images
http://img121.imageshack.us/i/screen1m.gif/
then
http://img233.imageshack.us/i/screen3.gif/
hope this helps[/img]
http://img121.imageshack.us/i/screen1m.gif/
then
http://img233.imageshack.us/i/screen3.gif/
hope this helps[/img]
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Could you send a capture showing the first window in full, so that we can see the window title.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Newbie
- Posts: 11
- Joined: Sun Mar 06, 2011 11:06 pm
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
So it looks like you want your trigger settings as follows:
Trigger Type: Window Event
Trigger: Window Opened
Window Title: Google Chrome
Only When Visible: Checked
Now this assumes there is no other window precisely entitled "Google Chrome" already on the system that is visible.
I have Chrome but I can't find a way to make it crash, nor have I seen it crash for months, so I'm not sure how I can test it out.
Trigger Type: Window Event
Trigger: Window Opened
Window Title: Google Chrome
Only When Visible: Checked
Now this assumes there is no other window precisely entitled "Google Chrome" already on the system that is visible.
I have Chrome but I can't find a way to make it crash, nor have I seen it crash for months, so I'm not sure how I can test it out.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Newbie
- Posts: 11
- Joined: Sun Mar 06, 2011 11:06 pm
-
- Newbie
- Posts: 11
- Joined: Sun Mar 06, 2011 11:06 pm
-
- Newbie
- Posts: 11
- Joined: Sun Mar 06, 2011 11:06 pm
-
- Newbie
- Posts: 11
- Joined: Sun Mar 06, 2011 11:06 pm
OKAY it turned out to be much simpler:
WaitWindowOpen>Google Chrome
SetFocus>Google Chrome
Press Enter
WaitWindowOpen>New Tab - Google Chrome
SetFocus>New Tab- Google Chrome
Wait>2
Mousemove>662,493
LClick
Now the only problem i have is that once it completes it turns off the macro how can i make it go back to a monitor state?
WaitWindowOpen>Google Chrome
SetFocus>Google Chrome
Press Enter
WaitWindowOpen>New Tab - Google Chrome
SetFocus>New Tab- Google Chrome
Wait>2
Mousemove>662,493
LClick
Now the only problem i have is that once it completes it turns off the macro how can i make it go back to a monitor state?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
You can use the trigger settings. Or you can use a loop.
1. Using the trigger settings:
In macro properties, click on Triggers then set the trigger up as I suggested previously:
Trigger Type: Window Event
Trigger: Window Opened
Window Title: Google Chrome
Only When Visible: Checked
2. Using a continually looping script:
Change your code as follows:
And then set the macro to run on startup in macro properties run when settings.
1. Using the trigger settings:
In macro properties, click on Triggers then set the trigger up as I suggested previously:
Trigger Type: Window Event
Trigger: Window Opened
Window Title: Google Chrome
Only When Visible: Checked
2. Using a continually looping script:
Change your code as follows:
Code: Select all
Label>start
WaitWindowOpen>Google Chrome
SetFocus>Google Chrome
Press Enter
WaitWindowOpen>New Tab - Google Chrome
SetFocus>New Tab- Google Chrome
Wait>2
Mousemove>662,493
LClick
Wait>0.2
Goto>start
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Newbie
- Posts: 11
- Joined: Sun Mar 06, 2011 11:06 pm