any function can load a saved colour file

Posted by Unia_nt on Wed 06 Jan 2016 09:07 AM — 4 posts, 17,182 views.

#0
Is there any function can load a saved colour.mcc file from script? Thanks.
Australia Forum Administrator #1
This is close:

http://www.gammon.com.au/scripts/doc.php?function=ImportXML

You need to do the file reading yourself.
Australia Forum Administrator #2
Something like this:


f = io.input (GetInfo (66) ..  "test.mcc")
s = f:read ("*a") -- read the file
f:close ()  
count = ImportXML (s)  -- import XML data
if count < 0 then
  print "Error importing"
else
  print "Imported colours"
end -- if
#3
Got it, thanks Nick!