Powerdrib
(Fresh Scripter)
2017-01-10 01:44 PM
different command

Hello is there another way to write this line
 Code:
$=Execute($Form.DoEvents())

I hope that you guys will help me


AllenAdministrator
(KiX Supporter)
2017-01-10 03:53 PM
Re: different command

No.

AndreLuiz
(Getting the hang of it)
2017-01-11 04:42 PM
Re: different command

PTBr:
E qual o problema com esta linha.
Porque você precisaria escreve-la de um outro modo?

Eng(Google translate):
And what's the problem with this line.
Why do you need to write the other way?


Powerdrib
(Fresh Scripter)
2017-01-11 04:58 PM
Re: different command

por esta http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=212182#Post212182

google translate
for this
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=212182#Post212182


Mart
(KiX Supporter)
2017-01-12 10:42 AM
Re: different command

That line does most likely not cause the error. Can you post the complete script you use?

The $form.DoEvents part is used in kixforms. To be able to see what goes wrong it would be very helpful to see the entire script.


AndreLuiz
(Getting the hang of it)
2017-01-15 07:42 PM
Re: different command

PTBR:
Bom o problema é estar na implementação da função ou no parâmetro da mesma.

Tem que debugar, mas segue o que Mart disse, poste o código inteiro, ou pelo menos partes do código que use esta função.


Eng (Google Translate):
Well the problem is to be in the implementation of the function or in the parameter of the same.

It has to debug, but follow what Mart said, post the whole code, or at least parts of the code that uses this function.


Powerdrib
(Fresh Scripter)
2017-01-16 08:11 AM
Re: different command

 Code:
Function Progress( $ProgressText, optional $Step )
	If $Step=""
		$Step=$progressstep
	EndIf
	$ProgressTextBox.Text = $ProgressText
	If $ProgressBar.Value + $Step < 101
		$ProgressBar.Value = $ProgressBar.Value+$Step
		If $DebugFlag = $TRUE		 
			Sleep $sleeptime
		EndIf
	Else
		$ProgressBar.Value=100
	EndIf
	$=Execute($Form.DoEvents())
EndFunction
this is a part of the code that is use


JochenAdministrator
(KiX Supporter)
2017-01-16 11:29 AM
Re: different command

just one shot in the dark without seeing the complete script...

try to replace
$=Execute($Form.DoEvents())

with
$=Execute($Form.DoEvents(1))
at this place.. the 1 is optional for NoWait.

The best practice is to use the Form event handling in just one place, right between making your Form visible and the end of the script like
 Code:
$Form.Visible
while $Form.Visible
    $ = execute($Form.DoEvents)
loop
exit 1


If you cannot do this, eg. preventing the form to freeze while doing other things, use the central loop without NoWait, and all the other places with the NoWait option.


Powerdrib
(Fresh Scripter)
2017-01-19 08:30 AM
Re: different command

This can be closed