Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Updating one macro on multiple computers
#1
I have the exported macro file on the server currently.

Whenever I update my macro and export it, is there a way to have it automatically update on the two other computers I have it imported on or do I have to manually import it again?
#2
On client computers import the file as shared file (the 3-rd button in the file viewer).

However on client computers it will be updated not immediately. When QM restarted or main QM file reloaded. To immediately reload main QM file, click menu File -> Recent -> first item.

To automatically reload main QM file when a shared file modified, can be used macro with file trigger, like this:
Function reload_qm_shared_file
Trigger $f 0x3F8 "\\server\sharesfolder" "shared.qml"     Help - how to add the trigger to the macro
Code:
Copy      Help
function event $name [$newname]
;event: 1 added, 2 removed, 4 renamed, 8 modified
;out F"{event} {name}"

MES m.style="YNn"; m.x=-1
sel mes("Shared file modified on server computer. Update it here in QM? It will reload your main QM file.[][]%s" "Quick Macros" m name)
,case 'Y'
,shutdown -5


;Also check 'Allow single instance' in Properties -> Function properties.
#3
Awesome thanks! My next question is that if they have custom settings to each of the computers like a different file path or slight changes to the macro, will I have to redo them every time something is uploaded to the server?
#4
They should not make changes to shared macros. If they need different data in shared macros, the macros should get data from eg a local file. Or the macro can select different values depending on user (if all users are known), like this:

Macro Macro1776
Code:
Copy      Help
str data user
GetUserInfo &user
sel user 1
,case "user1"
,data="data1"
,case "user2"
,data="data2"


Forum Jump:


Users browsing this thread: 1 Guest(s)