Jump to content
Sign in to follow this  
Rex

Help Please slow script

Recommended Posts

Rex

Hi.

first sorry for my bad english. :)

second i know thet the Tropic Titel dont say motch about my problem, but i dont know what to call the problem.

I'm a totaly newbe at autoIt scripting. :D

OK Now my problem.

I have tryed to create a GUI, to create user directorys on a new installed PC.

The function should be somthing like this.

drive:\Folder\User name\Folder (wery simpel) but... my GUI alows me to create upto 8 users and 4 standart folders + 4 extra folders.

In the script i check for how menny users chosen, and witch folders is enabled, that in total gives me about > 2000 lines of code. i have tryed to syntax check the code but there is no errors, and still the script wont work properly - it's slow very slow, and even i have added exit to then end of my functions i have to close the gui by klicking on exit ;-)

Please some on help me with this problem.

File attached (contens is in danish)

:EDIT

translated (i hope) into english and attached this thread http://www.autoitscript.com/forum/index.ph...st=0#entry68245

Edited by Rex

Share this post


Link to post
Share on other sites
Jos

Hi.

I have tryed to create a GUI, to create user directorys on a new installed PC.

The function should be somthing like this.

drive:\Folder\User name\Folder (wery simpel) but... my GUI alows me to create upto 8 users and 4 standart folders + 4 extra folders.

In the script i check for how menny users chosen, and witch folders is enabled, that in total gives me about > 2000 lines of code. i have tryed to syntax check the code but there is no errors, and still the script wont work properly - it's slow very slow, and even i have added exit to then end of my functions i have to close the gui by klicking on exit ;-)

<{POST_SNAPBACK}>

Your "afbryd" works fine as far as i can tell.

Think you have an error with Func Brugere(). it starts on line 712 and EndFunc on line 713. shouldnt the EndFunc be on line 882 in stead ??

Could you explain when the script is slow ?


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Rex

Hi thanks for the fast reply.

i only use the he func Bruger() to send the script to my creat users, cource i keep getting error if i use the func inside the loop, and i dont know how to it else.

The script i slow when i Click "Opret" actely nothing happens before i click "Afslut" (Exit) :-(.

If ther is a nother way to run the creat user folders inside the loop, it might correct my problem, but i dont know how to do that.

If it can help i could translate the script into english

/Rex

Share this post


Link to post
Share on other sites
Jos

i only use the he func Bruger() to send the script to my creat users, cource i keep getting error if i use the func inside the loop, and i dont know how to it else.

<{POST_SNAPBACK}>

I mean that this looks wrong starting at line 752:

Func Brugere()
    EndFunc
#region Bruger 1

try running your script through Tidy ... that will show what i mean!.

The script i slow when i Click "Opret" actely nothing happens before i click "Afslut" (Exit) :-(.

<{POST_SNAPBACK}>

When i start the script and click on "Opret" the Case is correctly run so still don't understand when it goes wrong....

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Rex

U'r right it's wrong, i'd move the endfunc to line 926.

in line 882 is in the middel of a if form (not sure hwat the english word for it is), and now it not slow eny more and the script closes it self.

But it dont creat eny folders ;-(.

Well back to the drawing board, and start debugging :-) how tough can it be :-)

But i stil dont get it, ass u cansee i have comment out a lot of if $User = x then Bruger(), and when i used them it worked fine, problem was then that i should copy/paste al whole lot of lines to get the bruger1 included in bruger2 a.s.o

maby there is a nother way to work around the problem to get all users included ?

Edited by Rex

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  

×