Sign in to follow this  
Followers 0
herworth

Au3guixp - Shortcuts

6 posts in this topic

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 example

envset(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]

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

for $x = 1 to 5
   envset("OBJ" & $x, 'value to be set')
next

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

Then use a function like this to set environment variables. (NOTE: Untested)

Func EnvAppend($var, $text)
    $__ret = EnvGet($var)
    EnvSet($var, $__ret & $text)
EndFunc

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0