herworth Posted March 11, 2004 Posted March 11, 2004 Is there a way to set up some of the OBJn parameters more easily where they are the same? I've tried a loop but it doesn't seem to work. For exampleenvset(Gui etc) for $x = 1 to 5 envset(OBJ$x set standards) next envset(OBJ1 set additional standards) etc I hope this makes sense to you. That doesn't work for me and I was wondering if anyone had anything worked out that made it a little simpler to set up a GUI [u][font="Arial"]Pete[/font][/u]
Developers Jos Posted March 11, 2004 Developers Posted March 11, 2004 (edited) for $x = 1 to 5 envset("OBJ" & $x, 'value to be set') next Edited March 11, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
herworth Posted March 12, 2004 Author Posted March 12, 2004 Sorry, I expressed it badly. I had written it correctly in my script: envset("OBJ" & $x, "etc") My point is that when you set further parameters for OBJ1 it wipes out the parameters set in the loop. It seems a waste of effort to keep repeating parameters that are standard for each OBJ and I wondered if there was another way of shortcutting the process for parameters eg "fontsize =10|fontweight=600", where these will apply to each OBJ. [u][font="Arial"]Pete[/font][/u]
Valik Posted March 12, 2004 Posted March 12, 2004 Then use a function like this to set environment variables. (NOTE: Untested) Func EnvAppend($var, $text) $__ret = EnvGet($var) EnvSet($var, $__ret & $text) EndFunc
herworth Posted March 12, 2004 Author Posted March 12, 2004 Thanks. I haven't tested it yet either but I understand it and it seems like a great scheme. Why didn't I think of it? (You dfon't need to answer that! [u][font="Arial"]Pete[/font][/u]
herworth Posted March 13, 2004 Author Posted March 13, 2004 One final note on this subject. I have now tried Valik's function and it works great. So thanks again. I use them for setting up CD data collections and desktop shortcut to common folders so it's useful to be able to make them up quickly. I just love this Autoit V3. [u][font="Arial"]Pete[/font][/u]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now