remote sensors is basically mesh. So you want to host a mesh session.
You want to run "Scratch-Networking>ScratchServerV1>server>openServerSocket" I belive, so goto "Scratch-UI-Panes>ScratchFrameMorph>startup>startup" and add this line under 'ScratchFrameMorph readShareServerEntry.": "ScratchNetworking ScratchServerV1 server openServerSocket."
It should work, i'm not exactly sure
EDIT: Okay, it didn't work. So don't use that method.
Last edited by DigiTechs (2013-02-02 11:49:39)
Offline
sdmeijer wrote:
@DigiTechs: Thanks for the effort.
Somebody else a solution?
There is a way to change the default project that opens up (I forgot how) but if you look around you may be able to find it. If you enable remote sensors in the default project and then save it, it should automatically enable remote sensors every time you open Scratch.
Last edited by Magnie (2013-02-06 10:13:49)
Offline
roijac wrote:
the method to enable it is enableRemoteSensors at ScratchFrameMorph, you can add it to its initialize method
I'm not quite sure whether it will definitely work in the initialize method. To be sure I would personally put it in ScratchFrameMorph's startup method.
Offline
Thank you for the replies.
I'm not that good with SquakVM.
@roijac and/or LS97, is it possible to write a small how-to for me? I know how to get into the image, but what code should I put at which place?
Offline
sdmeijer wrote:
Ok, solved it.
I've added the code from enableRemoteSensors to startup.
Then in startup-startup I've added the line
self enableRemoteSensors.
after the line
self updateProjectName.
Should be:
I've added the code from enableRemoteSensors to startup.
Offline
I've enabled remote sensors through scratch.ini:
Add the following to scratch.ini
remote=1 (or 0)
Add the following to [Scratch-UI-Panes] - [ScratchFrameMorph] - [startup]
enableRemoteSensorsStartup | t1 | workPane scratchServer ifNil: [t1 _ ScratchServer new userName: 'Scratch'. t1 stage: workPane. workPane scratchServer: t1]. workPane scratchServer startHosting
Add the following to [Scratch-UI-Panes] - [ScratchFrameMorph] - [startup] -> [processSettingsFile]:
t3 = 'remote' ifTrue: [t4 value = '1' ifTrue: [self enableRemoteSensorsStartup]].
Offline