Page 1 of 1 1
Topic Options
#212205 - 2017-01-10 01:44 PM different command
Powerdrib Offline
Fresh Scripter

Registered: 2016-12-14
Posts: 26
Loc: Holland
Hello is there another way to write this line
 Code:
$=Execute($Form.DoEvents())

I hope that you guys will help me

Top
#212206 - 2017-01-10 03:53 PM Re: different command [Re: Powerdrib]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4545
Loc: USA
No.
Top
#212210 - 2017-01-11 04:42 PM Re: different command [Re: Allen]
AndreLuiz Offline
Getting the hang of it

Registered: 2015-10-07
Posts: 89
Loc: Brasil, João pessoa
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?


Edited by AndreLuiz (2017-01-11 04:44 PM)

Top
#212211 - 2017-01-11 04:58 PM Re: different command [Re: AndreLuiz]
Powerdrib Offline
Fresh Scripter

Registered: 2016-12-14
Posts: 26
Loc: Holland
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

Top
#212214 - 2017-01-12 10:42 AM Re: different command [Re: Powerdrib]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4672
Loc: The Netherlands
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.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#212216 - 2017-01-15 07:42 PM Re: different command [Re: Mart]
AndreLuiz Offline
Getting the hang of it

Registered: 2015-10-07
Posts: 89
Loc: Brasil, João pessoa
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.

Top
#212217 - 2017-01-16 08:11 AM Re: different command [Re: Powerdrib]
Powerdrib Offline
Fresh Scripter

Registered: 2016-12-14
Posts: 26
Loc: Holland
 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

Top
#212218 - 2017-01-16 11:29 AM Re: different command [Re: Powerdrib]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
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.


Edited by Jochen (2017-01-16 11:46 AM)
_________________________



Top
#212232 - 2017-01-19 08:30 AM Re: different command [Re: Jochen]
Powerdrib Offline
Fresh Scripter

Registered: 2016-12-14
Posts: 26
Loc: Holland
This can be closed
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.059 seconds in which 0.023 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org