Author Topic: Can GR3 web publishing be set to start automatically?  (Read 16518 times)

0 Members and 1 Guest are viewing this topic.

Offline ctccbc

  • Senior Contributor
  • ****
  • Posts: 276
  • Acurite 01035, Weather Display
    • Chris Collins Morehead City, NC Weather
Can GR3 web publishing be set to start automatically?
« on: June 09, 2011, 09:34:51 PM »
After a computer reboot or crash, when I am away, is there any to have web publishing on GR3 to start automatically when the program starts? It seems like it has to be restarted by hand, after I can get back to the computer.

Thanks

Offline SteveFitz1

  • Forecaster
  • *****
  • Posts: 521
    • Tyler Texas Weather
Re: Can GR3 web publishing be set to start automatically?
« Reply #1 on: June 09, 2011, 10:47:48 PM »
I use a great free program called AUTOIT to automatically start everything in GRLEVEL3. A script is built to open GRLEVEL3, maximize the window, rename the window (I run 3 instances), center the radar exactly where I want it, then start the FTP process. The script can then be saved as an EXE, so it gets started automatically when Windows comes up. Once the script is done, no human intervention is required.

You can find AUTOIT at http://www.autoitscript.com/site/autoit/.

Steve

Offline ctccbc

  • Senior Contributor
  • ****
  • Posts: 276
  • Acurite 01035, Weather Display
    • Chris Collins Morehead City, NC Weather
Re: Can GR3 web publishing be set to start automatically?
« Reply #2 on: June 10, 2011, 06:28:21 AM »
Hey thanks,
I downloaded AutoIt, but I'm a novice when it comes to writing this sort of script. Could you please share
your script to help get me started.

Thanks,
Chris

Offline mackbig

  • Forecaster
  • *****
  • Posts: 4128
    • Mackie's Main Street, Unionville, ON Canada Weather
Re: Can GR3 web publishing be set to start automatically?
« Reply #3 on: June 13, 2011, 09:06:57 PM »
Chris,
I just downloaded autoit this evening.  Found a starter script somewhere, then modified it at bit for my needs.

The lines with "KBUF Buffalo, NY - GRLevel3" have to match your site exactly.

The MouseClickDrag("left", 100, 165, 666, 825) line was hardest to config.  The original author had way different values.  I just started playing with the values.  The 825 is y axis, and 666 is x axis.  Not sure what the other numbers do, but it works perfectly for me, so I wont change.

Andrew

Code: [Select]
; Start GRLevel 3
; Note the value for WinWaitActive must match the text in the title
; bar of the GRLevel 3 window
Run("C:\Program Files\GRLevelX\GRLevel3\grlevel3.exe")
WinWaitActive("KBUF Buffalo, NY - GRLevel3")
WinSetState("KBUF Buffalo, NY - GRLevel3", "", @SW_MAXIMIZE)
; Open the View menu
Send("!V")
; Zoom in one level
Send("{ENTER}")
Send("!V")
Send("{ENTER}")
; Center the image where I want it
MouseClickDrag("left", 100, 165, 666, 825)
; Open the file menu
Send("!F")
; Go down to the Web Publishing selection
Send("{DOWN}")
Send("{DOWN}")
Send("{DOWN}")
Send("{DOWN}")
Send("{DOWN}")
; Start the web publishing
Send("{ENTER}")
Send("{ENTER}")
Send("{ENTER}")

Andrew - Davis VP2+ 6163, serial weatherlink, wireless anemometer, running Weather Display.  Boltek PCI Stormtracker, Astrogenic Nexstorm, Strikestar - UNI, CWOP CW8618, GrLevel3, (Station 2 OS WMR968, VWS 13.01p09), Windows 7-64

Offline ctccbc

  • Senior Contributor
  • ****
  • Posts: 276
  • Acurite 01035, Weather Display
    • Chris Collins Morehead City, NC Weather
Re: Can GR3 web publishing be set to start automatically?
« Reply #4 on: June 14, 2011, 10:07:45 AM »
So you just load this script into your startup file to run it after a reboot?

Offline mackbig

  • Forecaster
  • *****
  • Posts: 4128
    • Mackie's Main Street, Unionville, ON Canada Weather
Re: Can GR3 web publishing be set to start automatically?
« Reply #5 on: June 14, 2011, 10:18:51 AM »
If you paste that text into the autoit script editor, then save it, it will then run if you start the autoit run script application.

I did not go any further than getting it to work from there.

I believe the next step is to use the editor to turn that into an EXE file.
Once that is done you should be able to put that EXE in your startup folder.

I am installing a new UPS tonight, I will create an EXE, plop it in startup and see if it works after by reboot.

Andrew

So you just load this script into your startup file to run it after a reboot?

Andrew - Davis VP2+ 6163, serial weatherlink, wireless anemometer, running Weather Display.  Boltek PCI Stormtracker, Astrogenic Nexstorm, Strikestar - UNI, CWOP CW8618, GrLevel3, (Station 2 OS WMR968, VWS 13.01p09), Windows 7-64

Offline mackbig

  • Forecaster
  • *****
  • Posts: 4128
    • Mackie's Main Street, Unionville, ON Canada Weather
Re: Can GR3 web publishing be set to start automatically?
« Reply #6 on: June 14, 2011, 08:17:12 PM »
It kind of worked....  Created the exe fine.  It launched from startup, but got stuck in the middle.

I guess between initiated the run command, and WinWaitActive("KBUF Buffalo, NY - GRLevel3")
another app started, so because GR3 was no longere the active window it stopped.   As soon as I single clicked the gr3 app, the rest of the script ran, ftp started, etc.

So I'll need to figure that out.  I guess I need to use something other than the usual windows start-up.

Andrew

Andrew - Davis VP2+ 6163, serial weatherlink, wireless anemometer, running Weather Display.  Boltek PCI Stormtracker, Astrogenic Nexstorm, Strikestar - UNI, CWOP CW8618, GrLevel3, (Station 2 OS WMR968, VWS 13.01p09), Windows 7-64

Offline mackbig

  • Forecaster
  • *****
  • Posts: 4128
    • Mackie's Main Street, Unionville, ON Canada Weather
Re: Can GR3 web publishing be set to start automatically?
« Reply #7 on: June 16, 2011, 06:15:57 AM »
I threw my script (exe file) into my StartWatch routine, its now set to fire up 5 minutes after the rest of the apps start, so hopefully that will solve the issue I had using regular windows startup folder.

Andrew

Andrew - Davis VP2+ 6163, serial weatherlink, wireless anemometer, running Weather Display.  Boltek PCI Stormtracker, Astrogenic Nexstorm, Strikestar - UNI, CWOP CW8618, GrLevel3, (Station 2 OS WMR968, VWS 13.01p09), Windows 7-64

Offline AWL

  • Forecaster
  • *****
  • Posts: 727
    • Ardmore Weather Live
Re: Can GR3 web publishing be set to start automatically?
« Reply #8 on: July 02, 2011, 04:59:59 PM »
I threw my script (exe file) into my StartWatch routine, its now set to fire up 5 minutes after the rest of the apps start, so hopefully that will solve the issue I had using regular windows startup folder.
Wondering how this worked out for you. I run 3 instances of GR3 and was thinking of trying auto it.

Offline mackbig

  • Forecaster
  • *****
  • Posts: 4128
    • Mackie's Main Street, Unionville, ON Canada Weather
Re: Can GR3 web publishing be set to start automatically?
« Reply #9 on: July 02, 2011, 09:04:38 PM »
Working great.  Flawless now that I put in the 5 minute delay.

Not sure how you could do it with 3 instances though.  :-k
Because each would start with the default radar site.  Unless your 3 are just different zooms of the same site...

Andrew

Wondering how this worked out for you. I run 3 instances of GR3 and was thinking of trying auto it.

Andrew - Davis VP2+ 6163, serial weatherlink, wireless anemometer, running Weather Display.  Boltek PCI Stormtracker, Astrogenic Nexstorm, Strikestar - UNI, CWOP CW8618, GrLevel3, (Station 2 OS WMR968, VWS 13.01p09), Windows 7-64

Offline LFWX

  • Forecaster
  • *****
  • Posts: 1089
  • Liberty Township, Butler County, Ohio
    • Liberty Fairfield Weather Center
Re: Can GR3 web publishing be set to start automatically?
« Reply #10 on: July 06, 2011, 12:16:00 AM »
Working great.  Flawless now that I put in the 5 minute delay.

Not sure how you could do it with 3 instances though.  :-k
Because each would start with the default radar site.  Unless your 3 are just different zooms of the same site...

Andrew

Wondering how this worked out for you. I run 3 instances of GR3 and was thinking of trying auto it.

I've got a similar situation, 3 instances, 2 radars, various products and methods.

#1 KILN = Closeup of the county, br1 only, publishing with the station prefix, not creating a sequence.
#2 KILN = Wider view of the area, many products, publishing with the station prefix, creating a sequence.
#3 roaming radar, typically KIND = br1 only, not publishing with the station prefix, creating a sequence.

I also have a placefile that only shows on the county view, but I can handle that by changing the threshold.

Not sure how I would handle the products situation (the products active when you start seem to depend on how the last instance was set up, assuming another instance hasn't crashed).

Sure would be great to have it all start automatically! :grin:
Station: Davis Vantage Pro2 Fan Aspirated
Software: Virtual Weather Station V14.00p64
www.LFWeatherCenter.com
CWOP: DW1039
CoCoRaHS: OH-BT-1
Weather Underground: KOHHAMIL7
Weather For You: DW1039
Midwestern Weather Network

Offline mackbig

  • Forecaster
  • *****
  • Posts: 4128
    • Mackie's Main Street, Unionville, ON Canada Weather
Re: Can GR3 web publishing be set to start automatically?
« Reply #11 on: July 06, 2011, 09:15:33 AM »
There must be a way to do it, but no idea how.  And I doubt you would get help over at the forum.  There's gotta be someone out there that has broken the secret....

If I were you I would set up what you consider your core instance with autoit, then if you get booted, at least one of your three will be up till you or your tech support (my wife in my case) could do the clicks.  But your setup sounds like you would need a pretty detailed manual to go through start sequence.

Andrew

Andrew - Davis VP2+ 6163, serial weatherlink, wireless anemometer, running Weather Display.  Boltek PCI Stormtracker, Astrogenic Nexstorm, Strikestar - UNI, CWOP CW8618, GrLevel3, (Station 2 OS WMR968, VWS 13.01p09), Windows 7-64

Offline derekm22098

  • Member
  • *
  • Posts: 38
    • GRLevelXMods
Re: Can GR3 web publishing be set to start automatically?
« Reply #12 on: July 06, 2011, 05:33:22 PM »
I could help you guys out if you are still having trouble or need something custom? I recently wrote a very similar script for Steve Crews, who brought this forum topic to my attention.

Well take it easy,

Derek

Offline ocala

  • Forecaster
  • *****
  • Posts: 4396
  • The blues had a baby and named it rock n roll
Re: Can GR3 web publishing be set to start automatically?
« Reply #13 on: July 06, 2011, 05:41:59 PM »
I could help you guys out if you are still having trouble or need something custom? I recently wrote a very similar script for Steve Crews, who brought this forum topic to my attention.

Well take it easy,

Derek

You have our attention. :-)

Offline svcrews

  • Member
  • *
  • Posts: 41
    • Southeastern Kentucky Weather
Re: Can GR3 web publishing be set to start automatically?
« Reply #14 on: July 06, 2011, 06:23:42 PM »
I could help you guys out if you are still having trouble or need something custom? I recently wrote a very similar script for Steve Crews, who brought this forum topic to my attention.

Well take it easy,

Derek

You have our attention. :-)

Derek wrote this program a few months ago at my request, it works perfect.  I am not a programmer, but when I am out of town, and there is a loss of power, this will auto-start GR3 for me, and publish it.
Thanks Derek for the follow-up.
Steve

Offline PSJohn

  • Senior Contributor
  • ****
  • Posts: 157
    • DesertWeather.com
Re: Can GR3 web publishing be set to start automatically?
« Reply #15 on: July 16, 2011, 05:56:07 PM »
Another option: GRLevel3 Script Processor:

http://wd5eae.org/GRLevelX_Lib.html
John Slama
Palm Springs, California
Davis Vantage Pro 2, FARS

Offline ctccbc

  • Senior Contributor
  • ****
  • Posts: 276
  • Acurite 01035, Weather Display
    • Chris Collins Morehead City, NC Weather
Re: Can GR3 web publishing be set to start automatically?
« Reply #16 on: July 19, 2011, 01:45:08 AM »
To follow up, I was able to get the AutoIt script running and it runs perfectly on startup. It loads the radar,
centers it and turns on web publishing. Thanks alot for the script.

Chris
moreheadcityweather.com

Offline DaculaWeather

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3206
    • North Georgia Weather
Re: Can GR3 web publishing be set to start automatically?
« Reply #17 on: July 19, 2011, 11:11:10 AM »
You could use a batch file, one for each instance. You then load each batch file with StartWatch. If you need help with a batch file, let me know.
« Last Edit: July 19, 2011, 11:17:01 AM by DaculaWeather »

Offline DaculaWeather

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3206
    • North Georgia Weather
Re: Can GR3 web publishing be set to start automatically?
« Reply #18 on: July 19, 2011, 12:03:17 PM »
Or why can't you create 3 different au3 files? I've got one working on mine, should have the others done shortly.

Offline mackbig

  • Forecaster
  • *****
  • Posts: 4128
    • Mackie's Main Street, Unionville, ON Canada Weather
Re: Can GR3 web publishing be set to start automatically?
« Reply #19 on: July 19, 2011, 12:08:27 PM »
Actually your last post made me think a little longer.   It is possible just requires a more complex script.  Need a few lines in there to select the site, where I was focussed on the default site, and how gr3 behaves doing its "save" on shutdown.  So with that logic, and a lot of trial and error you could do it.

Andrew

Or why can't you create 3 different au3 files? I've got one working on mine, should have the others done shortly.

Andrew - Davis VP2+ 6163, serial weatherlink, wireless anemometer, running Weather Display.  Boltek PCI Stormtracker, Astrogenic Nexstorm, Strikestar - UNI, CWOP CW8618, GrLevel3, (Station 2 OS WMR968, VWS 13.01p09), Windows 7-64

Offline DaculaWeather

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3206
    • North Georgia Weather
Re: Can GR3 web publishing be set to start automatically?
« Reply #20 on: July 19, 2011, 12:42:13 PM »
I had a script run away on me a few minutes ago... loaded who knows how many GRL3's before I shut the computer off!  :grin:

Yes, a LOT of trial and error. I use to have an app that recorded my mouse clicks and keystrokes, all I had to do was go through the motions and then save it.

Offline DaculaWeather

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3206
    • North Georgia Weather
Re: Can GR3 web publishing be set to start automatically?
« Reply #21 on: July 19, 2011, 12:51:06 PM »
This seems to be much easier to use and will record your actions. I have one script setup to change the default radar site, publish, just do the whole thing.

Oops! Here's the link: http://www.autohotkey.com/
« Last Edit: July 19, 2011, 01:00:37 PM by DaculaWeather »

Offline mackbig

  • Forecaster
  • *****
  • Posts: 4128
    • Mackie's Main Street, Unionville, ON Canada Weather
Re: Can GR3 web publishing be set to start automatically?
« Reply #22 on: July 19, 2011, 01:04:33 PM »
That sounds cool.  It even mentions autoit, if you already have some base scripts.

Quote
Run existing AutoIt v2 scripts and enhance them with new capabilities.

Andrew

Andrew - Davis VP2+ 6163, serial weatherlink, wireless anemometer, running Weather Display.  Boltek PCI Stormtracker, Astrogenic Nexstorm, Strikestar - UNI, CWOP CW8618, GrLevel3, (Station 2 OS WMR968, VWS 13.01p09), Windows 7-64

Offline DaculaWeather

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3206
    • North Georgia Weather
Re: Can GR3 web publishing be set to start automatically?
« Reply #23 on: July 19, 2011, 01:06:39 PM »
It's so easy. Load the recorder and go to work. It's better to use keystrokes if possible. When I selected a site to load instead of the default, I used Page Up/Page down and arrow keys instead of scrolling and clicking. And it too makes an executable!

Offline weathergirl

  • Forecaster
  • *****
  • Posts: 677
    • Beamsville Weather Station
Re: Can GR3 web publishing be set to start automatically?
« Reply #24 on: July 19, 2011, 01:11:24 PM »
Andrew: I don't want the GRLevel3 window to "maximize" upon start up. What do I replace this with?
Ann-Marie
Beamsville, Ontario, Canada