Jump to content

Recommended Posts

  • Developers
Posted

I can replicate the hard-crash and is related to AutoIt3Help.exe getting very confused about the number of parameters.

Will have a detailed look when I have some time to kill.

Jos

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

Posted

I have following code in scite4autoit.

#include <Screencapture.au3>
#include <File.au3>

Const $AimFrames = 15

;Create a temp folder in script dir if it does not exist
Const $CaptureFolder = @ScriptDir & "\capture\"
If Not FileExists($CaptureFolder) Then
    DirCreate($CaptureFolder)
EndIf

$ShotTime = _AvarageScreenshotTime(100)

$Tune = 1;$ShotTime / 1.2

For $n = 10 To 70
    _Main($n, $ShotTime, $Tune)
    ;Sleep(1000)
Next

Func _Main($TargetFramesPerSecond, $AvaerageShotTime, $FineTune)
    ;Some variables
    Const $OneSecond = 1000

    $Iterator = 1


    ;Some Calculations.

    ;_Debug($AvaerageShotTime, "$AvaerageShotTime")
    $Calc1 = $AvaerageShotTime * $TargetFramesPerSecond
    ;_Debug($Calc1, "$Calc1")
    $Calc2 = 1000 - $Calc1
    ;_Debug($Calc2, "$Calc2")
    $Calc3 = $Calc2 / $TargetFramesPerSecond
    ;;_Debug($Calc3, "$Calc3")
    $Sleep = Ceiling($Calc3 - $FineTune)
    ;_Debug($Sleep, "$Sleep")

    If $TargetFramesPerSecond >= 40 Then
        $AvaerageShotTime += 2
    ElseIf $TargetFramesPerSecond >= 30 Then
        $AvaerageShotTime += 1
    EndIf

    ;Loop for approx one second
    $Timer = TimerInit()
    While TimerDiff($Timer) <= $OneSecond
        ;$hAnotherTimer = TimerInit()
        $Cap = _ScreenCapture_Capture($CaptureFolder & $Iterator & ".bmp", 0, 0, 100, 100)

        ;Just for file name
        $Iterator += 1
        ;Sleep(1000 / $TargetFramesPerSecond - TimerDiff($hAnotherTimer))

        $sTimer = TimerInit()
        Do
        Until TimerDiff($sTimer) >= (1000 / $TargetFramesPerSecond) - $AvaerageShotTime
        ;Sleep(66 - 15)
    WEnd

    Local $aFiles = _FileListToArray($CaptureFolder, "*.bmp", 1)
    If @error Then

        ;Remove files and folders
        If Not _RemoveDir() Then
            Exit MsgBox(0, 0, "Error _RemoveDir")
        EndIf
        Exit MsgBox(0, 0, "Error _FileListToArray")
    EndIf

    ;Amount of images created
    $CURRENT_FPS = Int($aFiles[0])
    ConsoleWrite("Target = " & $TargetFramesPerSecond & " - Captured " & $CURRENT_FPS & @LF)

    _RemoveDir()
EndFunc   ;==>_Main

Func _Debug($val, $varname)
    ConsoleWrite($varname & " = " & $val & @LF)
EndFunc   ;==>_Debug

Func _RemoveDir()
    FileDelete($CaptureFolder & "*")
    #cs
        For $i = 1 To 10
        $Removed = DirRemove($CaptureFolder)
        If $Removed Then
        ExitLoop
        EndIf
        Sleep(100)
        Next
        Return ($Removed = 0)
    #ce
EndFunc   ;==>_RemoveDir

Func _AvarageScreenshotTime($NunShots)
    Local $aShots[$NunShots]

    For $i = 0 To $NunShots - 1
        $Timer = TimerInit()
        _ScreenCapture_Capture("pic.bmp", 0, 0, 100, 100)
        $Diff = TimerDiff($Timer)
        $aShots[$i] = $Diff
    Next

    FileDelete("pic.bmp")

    $Total = 0

    For $i = 0 To $NunShots - 1
        $Total += ($aShots[$i])
    Next

    $average = $Total / $NunShots

    Return Floor($average)

EndFunc   ;==>_AvarageScreenshotTime

If I select test starting at line 4 Const $AimFrames = 15

It's fine, I can select text from line 4 upto and including line 7 Const $CaptureFolder = @ScriptDir & "capture"

If I select any more, help will not open, it has not crashed again yet, the help file is what crashed (help has stopped working etc...)

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

  • Developers
Posted

  On 9/13/2014 at 12:28 PM, jpm said:

I cannot reproduce with Standard or Beta release ...

jp, the issue is that when you select multiple lines and these also contain double quotes, the parameter lexing assumes it are multiple parameters.

As you know, the second parameter is assumed to be the helpfilename override, so when that is invalid it would crash.

Jos

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

Posted

I understand, it looks good whatever I don't understand when selection of more than a word is very useful

Cheers

  • Moderators
Posted

Jos,

With that new AutoIt3Help.exe it seems that you always get the release version of Help opened when you select F1 - even if you are running the Beta and have the Beta Help already open. :(>

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

  • Developers
Posted

  On 9/15/2014 at 1:20 PM, Melba23 said:

Jos,

With that new AutoIt3Help.exe it seems that you always get the release version of Help opened when you select F1 - even if you are running the Beta and have the Beta Help already open. :(>

M23

Doesn't F1 always open production and Alt-F1 Beta?

Did the behaviour change in this last modified version of autoit3help.exe?

Jos

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

Posted
  On 9/15/2014 at 1:43 PM, Jos said:

Doesn't F1 always open production and Alt-F1 Beta?

That's what I've always experienced but you know where I live...

  Reveal hidden contents

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

  • Moderators
Posted

Jos,

As far as I can remember pressing F1 has always opened the Beta Help if it was already open. I always have the Beta Help open when I am using SciTE (all done via a script of course) and it has always been that version which shows the page for the selected function. The new version you posted opened an instance of the release Help even though the Beta Help was already open. Reverting to the installed Autoit3Help.exe returned to the behaviour I had been expecting - Beta Help with both F1 & Alt-F1. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

  • Developers
Posted (edited)

  On 9/15/2014 at 2:07 PM, Melba23 said:

Jos,

As far as I can remember pressing F1 has always opened the Beta Help if it was already open. I always have the Beta Help open when I am using SciTE (all done via a script of course) and it has always been that version which shows the page for the selected function. The new version you posted opened an instance of the release Help even though the Beta Help was already open. Reverting to the installed Autoit3Help.exe returned to the behaviour I had been expecting - Beta Help with both F1 & Alt-F1. :)

M23

ahh... You remember correctly and I fixed that issue also on July 26 to allow for opening both Production and Beta and being able to work with the correct version of the helpfile.

Jos

Edited by Jos

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

Posted

So much for me. Must be eating frogs & snails.

  Reveal hidden contents

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

  • Developers
Posted
  On 9/15/2014 at 2:24 PM, jchd said:

So much for me. Must be eating frogs & snails.

I thought the same until somebody told me that the Beta Helpfile wouldn't open when the production Helpfile was already opened and visa versa.

Back to the burgers and blooming onions. :)

Jos

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

Posted

Jos, something up with the way the last two versions of the help file EXE have been compiled. ESET NOD32 complains of a trojan or some such nonsense. Do you have it UPX'd or otherwise compressed? Compiler / language?

Posted

I also run Nod32 (currently v7.0.302.26) but I never experienced any interference with the help nor with compiled au3.

  Reveal hidden contents

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Posted

I don't see that; btw I'm using FF.

  Reveal hidden contents

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

  • Developers
Posted (edited)

I am using out standard C++ project file for the build which doesn't do any UPX compression. This version is build by VC11.

Just did a scan on virustotal.com and ESET-NOD32 was indeed the only one indicating this as : "a variant of Win32/Injector.ANNX".

All others stated it is Clean.

Jos

Edited by Jos

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

  • 2 weeks later...
Posted (edited)

au3abbrev.properties proposals:

include=#include <GUIConstants.au3>\n|

change to this:

include=#include <|.au3>\n

or add new

incl=#include <|.au3>\n

EDIT:

I do not know where to report such suggestions, and so far I reported here, if it is any other place please indicate.

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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