I am looking for the moste efficient way to do this. I admit to being a bit lazy and putting the task here....
I run a webserver and have a page:
http://newyorksecure.com/command.htm
I would like a macro to check that page every minute, read the text, analyze it for any of a number of strings, and execute a macro based on result. Then open that html page locally and replace with "Waiting on Command". That page locally is at D:\server\www\command.htm.
Each check writes to a log text file "No Command" or "Executed XXX". All behind the scenes (nothing visible).
Any help would be appreciated. I am quite new at this, but have a programming mind.
Web Server - Read Command
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Here is a quick and dirty structure to start from. Syntax is definitely no good, just trying to get you started. I think this covers most of the steps.
Not clear on how you are refreshing page on website, but could use Macro Scheduler FTP to do that.
Sorry if I missed anything, again, just an off the top of my head approach to work from.
You probably need to SetFocus to Save Page. Just noted your invisible requirement. May need to resize the browser window so it appears invisible.Label>Start
Run Program>Open Browser to web page
Let>RP_WINDOWMODE =0
SavePage locally
ReadLn from saved page, start at line #9 (after the start of "body")
If> line = open pcAnywhere,DoPCA
If> line = open Exel,Excel
If line> = something else,Others
Let>Action=No Command
Goto>Finish
Label>DoPCA
Let>Action=Executed pcAnyWhere
DeleteFile>D:\server\www\command.htm
WriteLn>D:\server\www\command.htm,Waiting On Command
...
...
Goto>Finish
Label>Excel
Let>Action=Executed Excel
DeleteFile>D:\server\www\command.htm
WriteLn>D:\server\www\command.htm,Waiting On Command
...
...
Goto>Finish
Label>Others
DeleteFile>D:\server\www\command.htm
WriteLn>D:\server\www\command.htm,Waiting On Command
Let>Action=Executed Other Actions
...
...
Goto>Finish
Label>Finish
GetDate>Date
TimeStamp>Drive:\path\filename.txt,%Date% -- %Action%
Wait>60
Goto>Start
Not clear on how you are refreshing page on website, but could use Macro Scheduler FTP to do that.
Sorry if I missed anything, again, just an off the top of my head approach to work from.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!