Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » I need help with parsing 'system account' data in a list of such.
- UserUser510
-
Scratcher
3 posts
I need help with parsing 'system account' data in a list of such.
My browser / operating system: Windows NT 10.0, Firefox 143.0, No Flash versions detected

I am making an operating system project and I want to parse three properties of a ‘user account’ into three variables.




Each element holds the information about the ‘operating system account’, such as the account name, account picture, and password.
I need to split them into 3 properties: name, picture/costume name, and ‘password’, shown below.

Please help.

I am making an operating system project and I want to parse three properties of a ‘user account’ into three variables.




Each element holds the information about the ‘operating system account’, such as the account name, account picture, and password.
I need to split them into 3 properties: name, picture/costume name, and ‘password’, shown below.

Please help.
Last edited by UserUser510 (Oct. 5, 2025 10:09:17)
- kemlevor
-
Scratcher
81 posts
I need help with parsing 'system account' data in a list of such.
let's suppose that the list item is a variable (that is)
your var contains : Name:“Guest”;PFP:“005”,Password:“”
As you have already use a separator ( “;” ), the recuperation/interpretation will be easier.
in your decoding block :
def new block (item_list) #enter an element of the Gondwana_account list
“”“ possibly local variables ”“”
set name to #void
set PFP to #void
set password to #void
set c to 1 #conter var used for decoding the list
repeat until letter c of item_list = “ :
c=c+1
#normaly, letter c of item_list correspond to the 1st letter of username
repeat until letter c of item_list = ” :
name=join (name) and (letter c of item_list)
c=c+1
#name variable should have all username letter
c=c+1 #in order to begin at the “;” letter
repeat until letter c of item_list = “ :
c=c+1
#normaly, letter c of item_list correspond to the 1st letter of PFP
repeat until letter c of item_list = ” :
PFP=join (PFP) and (letter c of item_list)
c=c+1
#name variable should have all PFPletter
c=c+1 #in order to begin at the “;” letter
repeat until letter c of item_list = “ :
c=c+1
#normaly, letter c of item_list correspond to the 1st letter of password
repeat until letter c of item_list = ” :
password=join (password) and (letter c of item_list)
c=c+1
#name variable should have all password letters
# letter c of item_list should be a "
This code should works. You can reduce this code by creating a decoding list and set the 1st part of code in a while loop, which will stop when c=lengh of item_list. Then setting your variable at decodinglist(1), decodinglist(2), decodinglist(3).
your var contains : Name:“Guest”;PFP:“005”,Password:“”
As you have already use a separator ( “;” ), the recuperation/interpretation will be easier.
in your decoding block :
def new block (item_list) #enter an element of the Gondwana_account list
“”“ possibly local variables ”“”
set name to #void
set PFP to #void
set password to #void
set c to 1 #conter var used for decoding the list
repeat until letter c of item_list = “ :
c=c+1
#normaly, letter c of item_list correspond to the 1st letter of username
repeat until letter c of item_list = ” :
name=join (name) and (letter c of item_list)
c=c+1
#name variable should have all username letter
c=c+1 #in order to begin at the “;” letter
repeat until letter c of item_list = “ :
c=c+1
#normaly, letter c of item_list correspond to the 1st letter of PFP
repeat until letter c of item_list = ” :
PFP=join (PFP) and (letter c of item_list)
c=c+1
#name variable should have all PFPletter
c=c+1 #in order to begin at the “;” letter
repeat until letter c of item_list = “ :
c=c+1
#normaly, letter c of item_list correspond to the 1st letter of password
repeat until letter c of item_list = ” :
password=join (password) and (letter c of item_list)
c=c+1
#name variable should have all password letters
# letter c of item_list should be a "
This code should works. You can reduce this code by creating a decoding list and set the 1st part of code in a while loop, which will stop when c=lengh of item_list. Then setting your variable at decodinglist(1), decodinglist(2), decodinglist(3).
- UserUser510
-
Scratcher
3 posts
I need help with parsing 'system account' data in a list of such.
Thanks a bunch for the help, kind Scratcher!
Last edited by UserUser510 (Oct. 5, 2025 10:57:33)
- Discussion Forums
- » Help with Scripts
-
» I need help with parsing 'system account' data in a list of such.