tag:blogger.com,1999:blog-4451657389087868432.post2855141190764142488..comments2023-05-29T02:10:01.374-06:00Comments on sworldwatch: getting a list of all users currently connected to SmallworldAlfred Sawatzkyhttp://www.blogger.com/profile/15845723068853240174noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-4451657389087868432.post-42050339591029416562009-02-05T12:56:00.000-07:002009-02-05T12:56:00.000-07:00_block # returns all the users currently connected..._block<BR/> # returns all the users currently connected to<BR/> # c:\smallworld41\product\data\message.ds<BR/> #<BR/> # modify as required<BR/> <BR/> _local str << system.input_from_command({"swmfs_list","-full","c:\smallworld41\product\data","message.ds"})<BR/><BR/> _local a_line<BR/> _local users << equality_set.new()<BR/><BR/> _loop<BR/> _if (a_line << str.get_line()) _is _unset <BR/> _then<BR/> _leave <BR/> _endif<BR/><BR/> # we are only interested in the lines that have @ in them<BR/> # because those are the ones that indicate user information. <BR/> _if a_line.index_of(%@) _isnt _unset <BR/> _then<BR/> # if we are on a user line, then take the string up to the<BR/> # first space_char as the user ID.<BR/> users.add(a_line.split_by(space_char).first) <BR/> _endif<BR/> _endloop<BR/><BR/> # show results<BR/> print(users)<BR/> <BR/>_endblock <BR/>$Alfred Sawatzkyhttps://www.blogger.com/profile/15845723068853240174noreply@blogger.comtag:blogger.com,1999:blog-4451657389087868432.post-57534031339434100772009-02-05T02:37:00.000-07:002009-02-05T02:37:00.000-07:00Nice.. script is there a Magik equavalent method t...Nice.. script is there a Magik equavalent method to get connected users and add them to a rope??Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4451657389087868432.post-61855246028562474072007-04-10T10:35:00.000-06:002007-04-10T10:35:00.000-06:00Nice script, Alfred. Should come in handy! Thanks!...Nice script, Alfred. Should come in handy! Thanks!Anonymousnoreply@blogger.com