Sign in to follow this  
Followers 0
idoru

Benchmarking Tool

5 posts in this topic

Hi Guys,

This is my forst post to this forum so Hello all :mellow:

Normally I would sit and work this kind of thing out for myself but I'm under some time contraints so basically I need your help. I'm writing (my first ever autoit) script to benchmark the compilation times of wsi installer projects. The problem I'm having is with the actually timer itself. I've read the help files and these forums from top to bottom but Im no clearer on how Im going to do this. Heres what I have so far.

$message = "Select file to benchmark."
$var = FileOpenDialog($message, @ComputerName & "\", "All Files (*.*)")
Run("W:\WisePkgStudio\Wise Package Studio\Windows Installer Editor\WfWI.exe")

If @error Then
    MsgBox(4096,"","No File(s) chosen")
Else
    WinWaitActive("SQL Server Login")
    Send("{TAB 5}")
    Send("{NUMPADADD}")
    Send("{enter}")
    Send("^{o}")
    WinWaitActive("Open")
    Send($var)
    Send("{enter}")
    Send("{F7}")
    WinWaitActive("Saving Installation")
    

EndIf

Basically it opens the files navigates the Wise menus and loads the desired file. what I need now is, after

WinWaitActive("Saving Installation")
to start a timer then stop it once that window is no longer active. Preferably the script would then write the time to a text file named after the computer name and copy it to a file share however that im sure I'll be able to figure out for myself.

Anyone think they can help with this?

Thanks in advance

Share this post


Link to post
Share on other sites



I had noticed both of those in the helpfile but the example given isnt very clear. I cracked it just before you posted although ive taken a slightly differant approach which seems to work fine.

WinWaitActive("Saving Installation")
    $starttime = _Timer_Init()
    WinWaitClose("Saving Installation")
    $endtime = _Timer_Diff($starttime)

I then output $endtime to a text file. I think I was trying to make it more complicated than it actually is. Thanks for your help though.

Share this post


Link to post
Share on other sites

Yeah, Sorry. I typo'd.

Shouldve been MsgBox(0, "", TimerDiff($Timer))


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

OK I now have another problem :mellow: I can copy over the directory containing all the files for the benchmark however I need to pause the script until this has completed. I dont want to just use a sleep(xxx) cos the time to copy will vary with network conditions. I'm reasonably sure the answer lies in spawning a progress bar for the file copy however I dont know how to feed the progress of the copy to the bar.

Any ideas?

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