[Open] Mass Export/Import to sync Macros on two machines

Ideas for new features & functions

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

[Open] Mass Export/Import to sync Macros on two machines

Post by jpuziano » Sun Jan 17, 2010 10:48 pm

Hi Marcus and all,

I'm posting this in "Enhancement Suggestions" as I think a new Export feature that would work with an enhanced Import feature would be great... however I am also wondering if anyone already has a solution... please read on.

I write macros on the work PC and at home on the home PC.

Sometimes, while I am at one place, some code I'd like to re-use is at the other place. If I'm at home, I can usually VPN in to work and get what I need but if the other way around, no dice.

Ideally, I'd like it so that any macros I save in MS at work, would be visible in MS at home and vice versa.

What I have been doing up to now is emailing .scp files to a web email account... then retrieving those emails when I am at the other place and manually copy/pasting/re-creating scripts.

Does anyone have a better (more automated) way of accomplishing this?

I believe all the macros in MS are represented by the .scp files in a particular directory and the contents of the macros.dat file. My directory here in a new Windows 7 install seems to be:
C:\Users\Owner\My Documents\Macro Scheduler 11

Could a macro be written such that, when I closed MS at home, it zipped up all these files and stored the zip file on the web somewhere? Maybe even in an attachment in an email if need be.

Then, when I got to work and opened MS, a macro would run (set to run when MS opens) and retrieve the zipped file, unzip it and add/overlay all the macros in there... into the proper groups in my work MS install.

Marcus, any guidance? I know MS has File/Import but in the help it says:
out-take from Help File on Import wrote:Allows macros from an external directory or another Macro Scheduler installation to be imported into the currently selected group.
So if I had 10 new macros I wanted to import but each one was in a different group on the exporting machine, I'd have to manually select each group first on the importing machine, import one macro, repeat until done... arg.

Would you consider adding a new "Export" feature that would take all .scp files, backup files .001, .002, etc. and the macros.dat file and put it all into one zipped file. Maybe it could have a special extension, .xpt for export file? Then we could save that file to a USB memory stick or send it off in an email as an attachment, etc. Then when we're at the other machine, we could use the import feature, give it just that one .xpt file to import and it would see that it was a special export file, and automatically know in which groups to import all the macros into. If the group does not yet exist on the importing machine, it creates the group... but if its there already, it just imports the macro. If the macro being imported is the same as what's already there (possible to check by date or checksum on .scp file contents) then it skips it... but if something has been changed, it would go with the newer version (or perhaps alert the user and let them choose).

For the future, I think a smart export/import feature would be great. Does anyone else out there think this would be useful?

And if anyone has any ideas about how to achieve this with what we have now... please jump right in.

Thanks and take care
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Mon Jan 18, 2010 4:19 am

Short term solution: Use UltraVNC for connections between home and work. Free Remote Connection software, can be executed with Macro Scheduler, also has command line capabilities. Supports File Transfers, File/Folder creation/deletion/renaming as well as desktop operations.

More info at: http://www.uvnc.com/
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Mon Jan 18, 2010 8:17 am

Hi Bob,

Thanks but remote control is not a problem, I quite often control the work PC from home. However, when I am at work, the home PC is off so there's not much chance of controlling it remotely.... and I don't want to leave it on all the time.

When Macro Scheduler exits, I want to create an Export file that contains all macros on that machine and info about what groups they are in... so I can store that file in a place that can be accessed from anywhere. At the moment, I'm thinking perhaps in an attachment I could email to myself.

Then when I start Macro Scheduler on another machine, it might run a macro that offers to do an import. If I know there isn't one, I could just decline. If I click OK, I'd like it to retrieve the attached file, extract the macros (and group info) and add or update macros as appropriate.

Has anyone ever tried to keep macros in sync across two machines? If so, how did you do it?
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Jan 19, 2010 8:15 pm

Don't have access now, but could you copy the group.dat and/or groups.ini and/or macros.dat files? I think those three files will contain all the info you need plus the macro files themselves.

In version 11 these are located in My Documents\Macro Scheduler\ folder.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Tue Jan 19, 2010 8:55 pm

Bob Hansen wrote:Don't have access now, but could you copy the group.dat and/or groups.ini and/or macros.dat files? I think those three files will contain all the info you need plus the macro files themselves.

In version 11 these are located in My Documents\Macro Scheduler\ folder.
Hi Bob,

Just straight copying wouldn't be enough. For instance, if I were to copy all my home MS files over into the appropriate folders on my work PC, MS might not know about my macros that only existed at work... because I believe it knows they are there due to an entry in the macros.dat file. The work macros.dat file would have been overwritten with the one from home so...

Marcus, any thoughts?
Last edited by jpuziano on Tue Jan 26, 2010 3:54 pm, edited 1 time in total.
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

kriemer
Pro Scripter
Posts: 57
Joined: Fri Oct 30, 2009 2:59 pm

Have you considered DropBox?

Post by kriemer » Tue Jan 26, 2010 3:31 pm

DropBox offers a free (up to 2GB) sync folder service. Additional DropBox capacity can be had at a fee. Anything on Machine A would be copied to Machine B once that machine is turned on.

I suppose in the extreme, the DropBox folder could even be made into the working folder/subfolder for your Macros scripts.

Curious to know if this meets your requirements.

k

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Tue Jan 26, 2010 4:09 pm

Hi kriemer,

Thanks for that... dropbox.com looks interesting and if it were just the .scp files themselves, I think it would work.

However Macro Scheduler's "groups", even though they look like discrete folders in the main MS window... are not actual separate folders on the hard drive. The macros.dat file holds entries specifying (among other things) to what group (if any) each macro belongs to.

Marcus, could you please shed some light? With what we have today, what would be the best way to "sync" the macros on two separate machines... such that group names are respected?

Also, is the idea of a mass export/import capability on the wish list?

Thanks for any guidance.
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

kriemer
Pro Scripter
Posts: 57
Joined: Fri Oct 30, 2009 2:59 pm

Post by kriemer » Tue Jan 26, 2010 4:27 pm

jpuziano

Unless I did something odd in my installation of MS I am not sure where the problem is as the "macros.dat" and "groups.dat" files reside in the MyDocuments folder along with the script files, etc.

It would seem to me that if all these folders were sub-directories of DropBox, everything would sync as you require. Space may be an issue depending on the number of scripts and files you have, but I am well below the 2GB Free DB size.

As to your point of overwriting the macro.dat files; if the two machines used what were essentially the same MS Directories/Files, there would not be a problem. The problem only occurs when your home and work computers are sorta the same.

k

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Tue Jan 26, 2010 6:44 pm

Hi kriemer,

On further thought, the method you suggest might work if I started with brand new MS install on the two separate machines (i.e. no pre-existing macros).

As long as we followed these rules:

- On closing Macro Scheduler on either machine, push out all .scp files and the "macros.dat" and "groups.dat" files to DropBox.

- On starting Macro Scheduler on either machine, pull in all .scp files and the "macros.dat" and "groups.dat" files from DropBox.

That might give me a way to work from "one set of files".

However, what about snippets? Perhaps that's just one more file to sync?

The bigger problem (i.e. work) comes when you already have two separate machines with hundreds of macros on each, some macros being copies of the same macro from the other, some groups the same, some different, etc.

I'd like some way of merging the two worlds (sets of files) without loosing anything or laboriously hand-importing each one.

Marcus, any thoughts?
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

kriemer
Pro Scripter
Posts: 57
Joined: Fri Oct 30, 2009 2:59 pm

Post by kriemer » Tue Jan 26, 2010 7:57 pm

jpuziano

I think the point you are missing is that all the folders under "Macro Scheduler 11" could be inside the DropBox folder. No rules to follow, any folder, or file changed on one machine is synced to the other machine.

It just happens.

k

sarver311
Pro Scripter
Posts: 84
Joined: Tue Jun 17, 2008 6:37 pm

Post by sarver311 » Fri Sep 24, 2010 10:27 pm

I would like to point out that you need to make sure that your username or your profile paths to the my documents folders are the same. Because groups.ini uses literal paths.

So if your login at home is homeuser then in the groups.ini path is
Name=General
Path=C:\Users\homeuser\Documents\Macro Scheduler 12\
[{AAB85F4A-58F6-4DCA-B40E-1D2D3F737D30}]


Whereas if your username at work was "workuser" the path would be
Name=General
Path=C:\Users\workuser\Documents\Macro Scheduler 12\
[{F453F5DD-9796-48DB-9ECE-66CD312E94D7}]

So just be careful because i use windows live sync and i ran into issues with this due to differing userprofile path names. So once those groups.ini files overwrite with the wrong path then things get haywire. Nothing more frustrating then opening MS scheduler and seeing all your scripts gone. :)

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts