Project Merger: No Renaming of 2nd Project's "Screen1"

I am testing the AI2 Project Merger Tool. I use 2 projects with a “screen1” in each. The tool documentation says, that one can rename the 2nd “screen1” (if one checks the screen1 in both projects). But the merger does not allow a check on the 2nd “screen1”. Artificially I added a blank screen2, but again no check of “Screen1” is possible.

I use the Merger Tool v.1.1 (from 2014?)

Within the 2nd project, there is no way to rename “Screen1”. So, what is wrong??

Thanx for any hint in advance…

I just added a screenshot as attachment…

Your main Project goes to Screen1; your second Project goes into Screen2. You cannot use this tool to merge two Projects into Screen1 (why you cannot check Screen1; you already will have a Screen1 and a Project can only have ONE Screen1.

A work around: Merge as suggested. When merged, use the Screen2 blocks and Backpack to move these Blocks to Screen1. Unfortunately, you cannot move the Screen2 components to Screen1…which means you will have to provide them manually.

If you rather have WhereAreYouNow on Screen1 entirely, switch the Main and Scecond Project links.

Regards,
Steve

Thank you Steve. I know, that I can’t use two times a Screen1. The AI2-Merger-Doc speaks about a name change of the 2nd Screen1, look at the attachment. But the merger tool does not accept a check on the 2nd Screen1. Of course, there is always the possibility to repair it manually with plenty of time dublicating the components…

The tool (in your example case) uses the file for President’s Quiz and names it Screen1 (yes it is already Screen1). The tool uses the file for the second Project (WhereAreYou…) and names it’s original Screen1 to Screen2.

It has been a long while since I have used this tool but expect that when you merge the Project, you get a new Project that has two screens (Screen1 and Screen2). After your two projects are merged, you can rename Screen2 anything you want I expect).

Of course, ‘But the merger does not allow a check on the 2nd “screen1”’ because you cannot not name the second project to a screen1). You cannot have two projects with Screen1.

Why not just merge the two Projects and see what happens? Does the new Project now have a Screen1 and and a Screen2.

Thank you Steve,
merging the two apps as shown above results in a new app, but there is only the content of the first app available. The original screen2 of the 2nd app is blank, so it contains nothing and after the merge there is of course also nothing. The 2nd screen1 contains everything but is no longer in the merged app.

The tool documentation speaks about renaming the 2nd screen1, but in reality the tool does not work!!

Sorry for the repetation, but the question is only: how can I rename a 2nd screen1 into another screen-name before merging

meanwhile I got some progress, using the tool Renombrar_2.zip from http://kio4.com/appinventor/126_renombrar_pantallas.htm:

  • I could open the tool
  • I could choose the archive (see attachment: WhereAreYouNow_copy)
  • The window shows the two screens: screen1 with all the content, screen2 with nothing in it
  • Then I changed the name “screen1” into “WhereAreYouNow” , saved the file and quit the tool
  • I imported the renamed file into the app inventor, but there the file could not be opened
  • I repeated the procedure, but instead of renaming screen1 I copied screen1. So I got 3 screens at least
  • I imported the new file and App Inventor could work with it.
  • Conclusion: If there is only 1 screen with content, it is necessary to copy this screen with another name instead of renaming screen1. That’s the point and should be mentioned in the docs…
  • Now I thought, that I am ready to merge this app with another app (using AI Merger Tool, because screen1 is replaced by a screen copy), but there are error messages both
    • In the App Inventor (when changing the screens) but at least it worked
    • In the Merger Tool (when trying to save the merged file) Every filename is called incorrect. A file with my used name is recorded, but the import in App Inventor is refused

So, at the moment, the ball is on the Merger Tool side…

Just the attachments:
WhereAreYouNow_copy.aia (89.0 KB) WhereAreYouNow_copy_ren.aia (96.8 KB)

Maybe someone will look at your files. I expect that projects more complex than the example shown here will have issues following the merger, especially if the individual projects have code to make screen changes. You might try the exact example that is shown in the link and see if it works as ‘advertised’.

Interesting detective work .

I myself would not use this method with several multiscreen projects. You just spent more time trying to get it to almost work than it would take to use Backpack to copy code from the second project to the first project, then reproduce all the Designer components. After a merger using this tool everything does not work like magic. The developer has to take what is provided and make the new Project work. Evidently not fun in your case. :cry:

I flagged this post for the developers attention. Sorry this tool is not meeting your expectations.

MIT is working on a system where a Backpack could also be used with the Designer screen; but it is not ready yet. Soon, there might be a better method for using components from previous projects more seamlessly.

Hi Joachim,

use the AI ​​Merge version AI2Mergerapp.jar (v 1.2), you can download it from here:
http://kio4.com/appinventor/127J_unir_aplicaciones_app_inventor.htm

thank you Juan,

I am using this version of AI2 Merger Tool. The dates in the zip file says: 2014-06-02. The tool promises a rename, but it does not rename…(see my 3rd reply above…Your own tool allows to copy the screen1 with another name. But the Merger Tool shows a problem with the name of the merged file. Totally silly each feature…

This is a really old question that pops up now and then. There have been versions of the merger tool that could rename Screen1, but somehow they seem to disappear again. The best way to merge projects is to use 7zip and notepad++ (only on Window I believe). Do this:

You open an .aia file with 7zip (do not rename to .zip and do not extract all files) Navigate in the src folder to the Screen1 files (there are 3), select and drag them to a temp folder. You have now unzipped copies in that folder, the originals are still there. You rename the three files to Screen2.bky (or some other screen name) etc. AND you edit the files with notepad++ to replace all occurrences of Screen1 with Screen2. Finally, you drag the files back into the open archive. 7zip will complain, but if you click OK it will add the new files to the archive. Now you have a project with 2 screens which are identical, except the name. You should be able to merge this now with another project from which you want to use the Screen1.

My merge trick is this: instead of using the merge tool (which fails for me), you open the .aia for which you want to use the Screen1 with 7zip, and you drag the renamed files into the folder where Screen1 is found. You can also drag assets into the assets folder (or even the whole assets folder if you do not have one in the other project). Click OK at the 7zip question and close. As a result you have a merged project.

For me, it worked great and much faster than the merge tool. I had three really complicated screens that I did not want to redo.

This is old text which I found. Make backups of your .aia’s first and experiment. And remember to just open the .aia, do not unzip it and re-zip it, because that will upset the folder structure.
But the best way is just to redo your stuff, it will eventually be better.

Cheers, Ghica.

2 Likes

Thank you Ghika! I started with your checklist and got the following result:

• You open an .aia file with 7zip (do not rename to .zip and do not extract all files)
• Navigate in the src folder to the Screen1 files (there are 3), I only found 2 Screen1s
• select and drag them to a temp folder.
• You have now unzipped copies in that folder, the originals are still there.
• You rename the three files to Screen2.bky (or some other screen name) etc. I renamed 2 Screen1s
• AND you edit the files with notepad++ to replace all occurrences of Screen1 with Screen2. For what occurrences should I search? notepad-search does not find “Screen1” nor “Titel”.

Cheers/opowoj

Done in less than 2 minutes:

1 Like

Thank you Anke. How can I reproduce your tutorial from the beginning with much slower speed?

Here you go, you can reduce the playback speed to 0.5 or 0.25 on YouTube:

AIMergerApp v1.2 has the capability of renaming Screen1 if there is a collision. This feature wasn’t available in v1.1. It looks like the page on the App Inventor site points to an older version. We will fix that. Download link for v1.2.

Edit: The page has been updated.

Thank you all for help. Meanwhile I can rename via Renombrar_2. I tried the 7zip approach, but could not find any Screen1 in the copys with Notepad++ to replace.
I will test the new version of AI Merger Tool 1.2

My tutorial assumes that there are 2 projects (Project1, Project2), each with 1 screen (Screen1). Screen1 from Project2 should be moved to Project1 as Screen2:

With Renombrar_x64.exe, the process is automatic.



http://kio4.com/appinventor/126_renombrar_pantallas.htm

  • Renombrar_x64.exe is done with AutoIt
    (AutoIt v3 is a freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting.)
    https://www.autoitscript.com/site/

http://kio4.com/autoit/index.htm (sp)

1 Like