View Full Version : how can i save shape color ?
ButtonMaker
04-23-2008, 06:26 AM
is it possible to save shape color in a file (txt, ini, inc) ?
TimeSurfer
04-23-2008, 07:18 AM
is it possible to save shape color in a file (txt, ini, inc) ?
im not sure i understand what your wanting to do this for but if you must then youll have to set the value you want manually as their is no way to actually retrieve the shapes color.
So lets say you want your shape to be filled with red [which is 255] then youd set a variable which we'll call scolor to 255. Then set the fillcolor for the shape [which we'll call shape1] to the var, and finally output the variable to an inifile. A small example is below. Hope it helps ;)
sColor = 255
Shape.SetFillColor("Shape1", sColor);
INIFile.SetValue("AutoPlay\\Docs\\Settings.ini", "Shape1", "Color", sColor);
p.s.
a more practical use would be to set the scolor variable with a dialog.input or perhaps a input object.
ButtonMaker
04-23-2008, 07:21 AM
@TimeSurfer
i want to save color of the shape for next time use...
look at the example please...
TimeSurfer
04-23-2008, 07:31 AM
i gotcha here is a revised copy of your apz. You'll notice i added 1 line to your label code [at the bottom] and added a line in page preload and a conditional statement in page on show. :yes
ButtonMaker
04-23-2008, 07:37 AM
thanks alot TimeSurfer :yes
TimeSurfer
04-23-2008, 07:41 AM
thanks alot TimeSurfer :yes
no problem m8, alot of us kinda just drift around here at the forum looking for people to help ;)
ButtonMaker
04-23-2008, 08:46 AM
why can i not set pluging invisible ? if no color make it invisible...
if scolor ~= nil then
Shape.SetFillColor("Plugin1", scolor);
else
Shape.SetVisible("Plugin1", false)
end
ButtonMaker
04-23-2008, 09:33 AM
isnt that correct ? if no color make it invisible...
if scolor ~= nil then
Shape.SetFillColor("Plugin1", scolor);
else
Plugin.SetVisible("Plugin1", false);
end
TimeSurfer
04-23-2008, 12:39 PM
yes your correct, problem is that scolor is set by the inifile. if the inifile were empty it would work or if the color value in the ini was blank it would work.
ButtonMaker
04-24-2008, 02:01 AM
TimeSurfer
when i click cancel on color dialog i get an error !!! with ur last example
TimeSurfer
04-24-2008, 02:30 AM
TimeSurfer
when i click cancel on color dialog i get an error !!! with ur last example
whats the error it give's you and i will fix
ButtonMaker
04-24-2008, 02:39 AM
when i click cancel on color dialog shape goes black color and i get that error...
TimeSurfer
04-24-2008, 02:58 AM
it has something to do with the chcolor.dll give me a few ill try to have a solution for you.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.