Jump to content

How often does this happen?


Recommended Posts

$num1 = InputBox("","Input First Number")
$num2 = InputBox("","Input Second Number")

ProgressOn("","Calculating")
Sleep(5000)
ProgressSet(25)
Sleep(5000)
ProgressSet(50)
Sleep(5000)
ProgressSet(75)
Sleep(5000)
ProgressSet(100)
ProgressOff()

$num3 = $num1 + $num2

MsgBox(0,"","Your result = " & $num3)

Just wondering how often this sort of thing is used in proprietary software, i.e. just putting in sleeps to make it look like the software is doing something really complicated, when in fact the 'outcome' could be reached in milliseconds.

I'm sure the lay-person would pay much more money for something they thought was doing a complicated job, than for something that really "didn't try".

Is this sort of thing common? is it frowned upon?

Mods - if this is in the wrong section pls move it, ta.

- Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!
Link to comment
Share on other sites

For the presentational effect and saving CPU cycles it is done. The Sleep(5000) is too long with your example and wants the end-user to wait patiently for what is a simple calculation. Sleep() is added into loops to keep the script from using high amount of cycles.

AutoIt goes like a car with the accelerator peddle pressed to the floor and it is up to you to travel at a speed which is more desirable. A magician may take 10 minutes to do in an act which could be done in a minute but the 10 minutes is worth the extra time. But remember that computer orientated people are not so patient and so the presentation is limited to much less time.

Adding small amounts of Sleep() is better some times then a CPU generating excessive heat and the progress shown in the GUI is over before you got to focus on what is happening. It is up to you to manage the resources to balance the task.

:)

Link to comment
Share on other sites

For the presentational effect and saving CPU cycles it is done. The Sleep(5000) is too long with your exam....................

....................the task.

:)

Thanks for the reply, I know what you're saying and agree, but that wasn't the question I was asking - my fault, I wasn't clear enough. :)

What I meant was, is it common to purposefully deceive the user that something technical is going on in the program, when in fact there are just sections of long sleeps.

For example if I compared two virus checkers; Program A, and Program B, and because the programmer of A was so efficient and talented his program scanned my computer in 10 seconds. Program B however, took 10 minutes, not because the programmer wasn't as good, but because he put a sleep command in after the scan for 9 mins 50 seconds.

The perception is that program B is doing a more 'thorough' job of scanning the computer for viruses because it takes longer, but in reality it just goes to sleep for 10 minutes.

- Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!
Link to comment
Share on other sites

Thanks for the reply, I know what you're saying and agree, but that wasn't the question I was asking - my fault, I wasn't clear enough. :)

What I meant was, is it common to purposefully deceive the user that something technical is going on in the program, when in fact there are just sections of long sleeps.

For example if I compared two virus checkers; Program A, and Program B, and because the programmer of A was so efficient and talented his program scanned my computer in 10 seconds. Program B however, took 10 minutes, not because the programmer wasn't as good, but because he put a sleep command in after the scan for 9 mins 50 seconds.

The perception is that program B is doing a more 'thorough' job of scanning the computer for viruses because it takes longer, but in reality it just goes to sleep for 10 minutes.

I have used a BS progressbar for an update that actually takes less than a second, which spanned it out to about 15 seconds purley so the user saw something visible and felt that the update had actually happened.

Link to comment
Share on other sites

I have used a BS progressbar for an update that actually takes less than a second, which spanned it out to about 15 seconds purley so the user saw something visible and felt that the update had actually happened.

Yeah that's what I mean!

Heh, this could turn into a 'programmers anonymous' session, :) and while we're there...

I once had problems with the autoit date functions within a UDF but couldn't figure out why, so instead I invoked the following message every time that UDF was used:

Func _TimeFunction()

msgbox(16,"Error","Windows has encountered an error and cannot complete the current request")

EndFunc

I can just imagine someone using my program: ....dum dee dum....click click..... ERROR....<tut> "bloody windows"

:)

Thank you for sharing. :)

- Table UDF - create simple data tables - Line Graph UDF GDI+ - quickly create simple line graphs with x and y axes (uses GDI+ with double buffer) - Line Graph UDF - quickly create simple line graphs with x and y axes (uses AI native graphic control) - Barcode Generator Code 128 B C - Create the 1/0 code for barcodes. - WebCam as BarCode Reader - use your webcam to read barcodes - Stereograms!!! - make your own stereograms in AutoIT - Ziggurat Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Box-Muller Gaussian Distribution RNG - generate random numbers based on normal/gaussian distribution - Elastic Radio Buttons - faux-gravity effects in AutoIT (from javascript)- Morse Code Generator - Generate morse code by tapping your spacebar!
Link to comment
Share on other sites

I once had problems with the autoit date functions within a UDF but couldn't figure out why, so instead I invoked the following message every time that UDF was used:

Func _TimeFunction()

msgbox(16,"Error","Windows has encountered an error and cannot complete the current request")

EndFunc

I can just imagine someone using my program: ....dum dee dum....click click..... ERROR....<tut> "bloody windows"

:)

LOL , now i understand what is going wrong, i tried reinstalling the workstations, restoring the domain from backup, but its your freaking script thats fooling me :) :)
+==================================================================+| The Definition of Madness: Creating a GUI, with GUI automation scripts |+==================================================================+
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...