Discuss Scratch

kRxZy_kRxZy
Scratcher
1000+ posts

Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!

mcgdj wrote:

Dagriffpatchfan wrote:

kRxZy_kRxZy
Scratcher
1000+ posts

Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!

Dagriffpatchfan wrote:

Dagriffpatchfan
Scratcher
1000+ posts

Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!

cool-shop-dude wrote:

Dagriffpatchfan wrote:

(#319)

cool-shop-dude wrote:

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]
W old you like the banner above or beneath?
Above
done
mcgdj
Scratcher
73 posts

Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!

Dagriffpatchfan wrote:

Dagriffpatchfan
Scratcher
1000+ posts

Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!

Dagriffpatchfan wrote:

Dagriffpatchfan
Scratcher
1000+ posts

Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!

Dagriffpatchfan wrote:

Dagriffpatchfan
Scratcher
1000+ posts

Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!

Dagriffpatchfan wrote:

kRxZy_kRxZy
Scratcher
1000+ posts

Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!

Dagriffpatchfan wrote:

Dagriffpatchfan
Scratcher
1000+ posts

Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!

kRxZy_kRxZy wrote:

Dagriffpatchfan wrote:

mcgdj
Scratcher
73 posts

Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!

Dagriffpatchfan wrote:

king123abc_tutor
Scratcher
8 posts

Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!

mcgdj wrote:

Dagriffpatchfan wrote:

Dagriffpatchfan
Scratcher
1000+ posts

Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!

mcgdj wrote:

Dagriffpatchfan wrote:

Dagriffpatchfan
Scratcher
1000+ posts

Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!

Dagriffpatchfan wrote:

mcgdj wrote:

Dagriffpatchfan wrote:

2016s4m29
Scratcher
1000+ posts

Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!

The Gemstone Federation | Shop activity check

TGF has moved to a new topic permanently. Please respond on Our Topic to the activity check.
kRxZy_kRxZy
Scratcher
1000+ posts

Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!

2016s4m29 wrote:

The Gemstone Federation | Shop activity check

TGF has moved to a new topic permanently. Please respond on Our Topic to the activity check.
done

mcgdj wrote:

Dagriffpatchfan wrote:


kRxZy_kRxZy
Scratcher
1000+ posts

Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!

kRxZy_kRxZy wrote:

Dagriffpatchfan wrote:

Dagriffpatchfan
Scratcher
1000+ posts

Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!

kRxZy_kRxZy wrote:

kRxZy_kRxZy wrote:

Dagriffpatchfan wrote:

kRxZy_kRxZy
Scratcher
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
Scratcher
1000+ posts

Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!

kRxZy_kRxZy wrote:

(#338)
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
Take a look at dagriffpatchfan's cloud syncing project and try to modify that to work with turbowarp instead; it'll work better.
Dagriffpatchfan
Scratcher
1000+ posts

Use Text ML, Sync ☁️Cloud☁️ Variables between projects, host code, and more!

50_scratch_tabs wrote:

kRxZy_kRxZy wrote:

(#338)
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
Take a look at dagriffpatchfan's cloud syncing project and try to modify that to work with turbowarp instead; it'll work better.
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

Powered by DjangoBB