Discuss Scratch
- Discussion Forums
- » Requests
- » Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!
- kRxZy_kRxZy
-
1000+ posts
Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!
- kRxZy_kRxZy
-
1000+ posts
Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!
- Dagriffpatchfan
-
1000+ posts
Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!
done(#319)AboveW old you like the banner above or beneath? Sure
⭐️ScratchWorks Programming, Art, Audio, Brainstorming and Images⭐️⭐️[b][i][color=#ff0000]ScratchWorks[/color] [color=#FF035B]Programming,[/color] [color=#DB06B1]Art,[/color] [color=ff00ff]Audio,[/color] [color=#9A03FF]Brainstorming[/color] [color=#AE06EA]and[/color][color=#0000ff] Images[/color]⭐️[/b][/i]
- mcgdj
-
73 posts
Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!
- Dagriffpatchfan
-
1000+ posts
Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!
- Dagriffpatchfan
-
1000+ posts
Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!
- Dagriffpatchfan
-
1000+ posts
Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!
- kRxZy_kRxZy
-
1000+ posts
Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!
- Dagriffpatchfan
-
1000+ posts
Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!
- mcgdj
-
73 posts
Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!
- king123abc_tutor
-
8 posts
Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!
- Dagriffpatchfan
-
1000+ posts
Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!
- Dagriffpatchfan
-
1000+ posts
Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!
- kRxZy_kRxZy
-
1000+ posts
Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!
doneThe Gemstone Federation | Shop activity check
TGF has moved to a new topic permanently. Please respond on Our Topic to the activity check.
- kRxZy_kRxZy
-
1000+ posts
Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!
- Dagriffpatchfan
-
1000+ posts
Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!
- kRxZy_kRxZy
-
1000+ posts
Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!
syncing between tw and scratch, idk if it works
import scratchattach as sa session = sa.login("USERNAME", "PASSWORD") index = 1 cloud1 = session.connect_cloud("project_id") # connects any cloud (by default Scratch one's). Returns a sa.ScratchCloud object by default cloud2 = session.connect_tw_cloud("project_id", purpose="(optional) your use case", contact="(optional) your Scratch account or other contact info") while True: variables1 = cloud.get_all_vars() # returns a dict with the current values of all cloud variables. In v2.0, you can safely use this method in a loop without spamming the API variables2 = cloud2.get_all_vars() # returns a dict with the current values of all cloud variables. In v2.0, you can safely use this method in a loop without spamming the API cloud1.set_var(f"Cloudvar1", "{variables1[index]}") # Remove until next note for turbowarp vars set to scratch vars. index += 1 cloud1.set_var(f"Cloudvar2", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar3", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar4", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar5", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar6", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar7", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar8", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar9", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar10", "{variables1[index]}") # stop deleteing here index = 1 cloud2.set_var(f"Cloudvar1", "{variables2[index]}") # Remove all of this to the end for scratch vars to be set to turbowarp vars index += 1 cloud2.set_var(f"Cloudvar2", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar3", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar4", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar5", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar6", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar7", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar8", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar9", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar10", "{variables2[index]}") if index == 10: index = 1
Last edited by kRxZy_kRxZy (Jan. 29, 2025 21:56:59)
- 50_scratch_tabs
-
1000+ posts
Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!
(#338)Take a look at dagriffpatchfan's cloud syncing project and try to modify that to work with turbowarp instead; it'll work better.
syncing between tw and scratch, idk if it worksimport scratchattach as sa session = sa.login("USERNAME", "PASSWORD") index = 1 cloud1 = session.connect_cloud("project_id") # connects any cloud (by default Scratch one's). Returns a sa.ScratchCloud object by default cloud2 = session.connect_tw_cloud("project_id", purpose="(optional) your use case", contact="(optional) your Scratch account or other contact info") while True: variables1 = cloud.get_all_vars() # returns a dict with the current values of all cloud variables. In v2.0, you can safely use this method in a loop without spamming the API variables2 = cloud2.get_all_vars() # returns a dict with the current values of all cloud variables. In v2.0, you can safely use this method in a loop without spamming the API cloud1.set_var(f"Cloudvar1", "{variables1[index]}") # Remove until next note for turbowarp vars set to scratch vars. index += 1 cloud1.set_var(f"Cloudvar2", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar3", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar4", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar5", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar6", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar7", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar8", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar9", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar10", "{variables1[index]}") # stop deleteing here index = 1 cloud2.set_var(f"Cloudvar1", "{variables2[index]}") # Remove all of this to the end for scratch vars to be set to turbowarp vars index += 1 cloud2.set_var(f"Cloudvar2", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar3", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar4", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar5", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar6", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar7", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar8", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar9", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar10", "{variables2[index]}") if index == 10: index = 1
- Dagriffpatchfan
-
1000+ posts
Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!
Yea - it doesn’t require code to set each cloud variable individually. I would do it myself but for some reason I couldn’t figure out how to get it to connect to tw cloud servers(#338)Take a look at dagriffpatchfan's cloud syncing project and try to modify that to work with turbowarp instead; it'll work better.
syncing between tw and scratch, idk if it worksimport scratchattach as sa session = sa.login("USERNAME", "PASSWORD") index = 1 cloud1 = session.connect_cloud("project_id") # connects any cloud (by default Scratch one's). Returns a sa.ScratchCloud object by default cloud2 = session.connect_tw_cloud("project_id", purpose="(optional) your use case", contact="(optional) your Scratch account or other contact info") while True: variables1 = cloud.get_all_vars() # returns a dict with the current values of all cloud variables. In v2.0, you can safely use this method in a loop without spamming the API variables2 = cloud2.get_all_vars() # returns a dict with the current values of all cloud variables. In v2.0, you can safely use this method in a loop without spamming the API cloud1.set_var(f"Cloudvar1", "{variables1[index]}") # Remove until next note for turbowarp vars set to scratch vars. index += 1 cloud1.set_var(f"Cloudvar2", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar3", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar4", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar5", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar6", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar7", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar8", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar9", "{variables1[index]}") index += 1 cloud1.set_var(f"Cloudvar10", "{variables1[index]}") # stop deleteing here index = 1 cloud2.set_var(f"Cloudvar1", "{variables2[index]}") # Remove all of this to the end for scratch vars to be set to turbowarp vars index += 1 cloud2.set_var(f"Cloudvar2", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar3", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar4", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar5", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar6", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar7", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar8", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar9", "{variables2[index]}") index += 1 cloud2.set_var(f"Cloudvar10", "{variables2[index]}") if index == 10: index = 1