Jump to content

Recommended Posts

Posted
On 3/12/2020 at 1:37 PM, argumentum said:

You should be able to run your setup, without necessarily having to have a full SciTE setup but just the components you actually use.

Now I have successfully integrated the AutoIt3Wrapper.au3 and its dependencies into PSPad for testing. I copied the needed files into the PSPad folder and adjusted the paths in the AutoIt3Wrapper.au3. Technically this works great, and the version checker doesn't care which version of SciTE4AutoIt3 is installed on a computer. In fact, there would be no need to install SciTE at all.

After that I checked the legal aspects. Unfortunately it seems that Jos doesn't agree to deliver the files in a foreign package. This is a pity, but I respect that. I'm glad that Jos gave me permission to use the AutoIt3Wrapper.au3 in the SciTE directory. So I go back to your idea:

On 6/10/2020 at 1:09 AM, argumentum said:

I would still insist on not looking at SciTE version and expectations the way you do but after changing the SciTE4AutIt3 4.2 check to 4.1 on your distro.

For the next release of PSPad4AutoIt3 I'll try to change the version checker to check the version of AutoIt3Wrapper.au3 instead of SciTE. Also it needs to check if SciTE4AutoIt3 is installed and the dependencies for AutoIt3Wrapper.au3. It's a bit complicated, but I think it could work.

Regards, Bernd.

 

Posted
MsgBox(0, "WrapperVerGetter()", WrapperVerGetter(), 60)
Func WrapperVerGetter()
    Local $wrapperFN = StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", 0, -1)) & "SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3"
    Local $n, $chunk = StringSplit(FileRead($wrapperFN, 10240), @CRLF & "=")
    For $n = 2 To UBound($chunk) -1
        If $chunk[$n - 1] = "#AutoIt3Wrapper_Res_Fileversion" Then Return $chunk[$n]
    Next
    SetError(1, 0, "")
EndFunc

...if this returns the minimum version of the wrapper, the rest will be there too :) 

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted

@argument

An update of VersionsChecker is ready. As you suggested, it no longer checks the version number of SciTE, but AutoIt3Wrapper.au3. The check for SciTE is disabled. The minimum version numbers are now in a separate list "VersionsChecker.lst". So you can lie to the code much easier! :D

Can you test this? Copy the folder PSPad4Au3 into the PSPad directory (PSPad4AutoIt3) and overwrite existing files.

Bernd.

VersionsChecker v42b 2020-06-13 - Check for SciTE disabled..zip

Posted (edited)
---------------------------
AutoIt3_CompilerRunner: - Error -
---------------------------
The process did not react. An abrupt termination was forced!
"C:\Users\Tester\Downloads\PSPad4AutoIt3 v1.1.0 beta without setup\PSPad4AutoIt3\PSPad4Au3\Au3 scripts\StringSize.au3"
---------------------------
OK
---------------------------

...so I Ctrl - F9, look at it for a few seconds and get the above error. The console output is:

>"C:\ProgFilesSelf\AutoIt3\AutoIt3.exe" "C:\ProgFilesSelf\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /prod /in "C:\Users\Tester\Downloads\PSPad4AutoIt3 v1.1.0 beta without setup\PSPad4AutoIt3\PSPad4Au3\Au3 scripts\StringSize.au3" /ShowGui
+>         PSPadDir => C:\Users\Tester\Downloads\PSPad4AutoIt3 v1.1.0 beta without setup\PSPad4AutoIt3\    SciTEDir => C:\ProgFilesSelf\AutoIt3\SciTE\   SCITE_USERHOME => C:\Users\Tester\AppData\Local\AutoIt v3\SciTE 
+>11:37:14 Starting AutoIt3Wrapper (19.1127.1402.0} from:PSPad.exe (5.0.4.505)  Keyboard:00000409  OS:WIN_10/  CPU:X64 OS:X64  Environment(Language:0409)
>Exit code:     Time: 11.8225

Maybe because I have almost no standard paths, or maybe something else. No clue. I'm just the "test guy". :) 

Edit: the info. was misleading, as it was not all from the same script. It now is exact.

Edited by argumentum
..the info. was misleading

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted

Can you describe the steps to reproduce? From opening PSPad. Which script did you use, which commands were executed, etc.

What special features do you have? You once told me something about a protected zone, does PSPad have enough rights?

What is written in the "...\PSPad4AutoIt3\PSPad4Au3\PSPad4AutoIt3.ini", are the paths to AutoIt3_Dir and SciTE_Dir correct?

12 minutes ago, argumentum said:

I'm just the "test guy". :) 

Yes, I am happy to have a "test guy". :)

Posted
2 minutes ago, Professor_Bernd said:

What is written in the "...\PSPad4AutoIt3\PSPad4Au3\PSPad4AutoIt3.ini"

[Paths]
AutoIt3_Dir=C:\ProgFilesSelf\AutoIt3\
SciTE_Dir=C:\ProgFilesSelf\AutoIt3\SciTE\
[General]
P4A3_FirstStartAfterInstallIsDone=True
[Config]
; ColorSchemes 2020-06-07: White_Black_Red, Gray_White_Blue
ColorScheme=White_Black_Red

 

2 minutes ago, Professor_Bernd said:

are the paths to AutoIt3_Dir and SciTE_Dir correct?

yes

2 minutes ago, Professor_Bernd said:

What special features do you have? You once told me something about a protected zone, does PSPad have enough rights?

should be all good.

3 minutes ago, Professor_Bernd said:

Can you describe the steps to reproduce? From opening PSPad. Which script did you use, which commands were executed, etc.

I opened PSPad, ... drag'n'drop a script ( StringSize.au3 was right there, so I used that ), ... Ctrl-F9 to bring up the wrapper,  ... look at it for a moment ...then I get the popup error.

On 6/11/2020 at 5:00 PM, argumentum said:

...if this returns the minimum version of the wrapper

That was a way of speech. What I mean is that, at times code can say, what words don't clearly explain.
But the code I posted was a simple example to explain what I meant. But a better code would be:

MsgBox(0, "WrapperVerGetter()", WrapperVerGetter(), 60)
Func WrapperVerGetter()
    Local $wrapperFN = StringLeft(@AutoItExe, StringInStr(@AutoItExe, "\", 0, -1)) & "SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3"
    
;~  Local $n, $chunk = StringSplit(FileRead($wrapperFN, 10240), @CRLF & "=")
;~  For $n = 2 To UBound($chunk) -1 ; simple
;~      If $chunk[$n - 1] = "#AutoIt3Wrapper_Res_Fileversion" Then Return $chunk[$n]
;~  Next
;~  SetError(1, 0, "")

    Local $b, $n, $chunk = StringSplit(FileRead($wrapperFN, 10240), @CRLF)
    For $n = 1 To UBound($chunk) -1 ; more thoughtful
        $b = StringSplit($chunk[$n], "=;")
        If UBound($b) < 3 Then ContinueLoop
        If StringStripWS($b[1], 3) = "#AutoIt3Wrapper_Res_Fileversion" Then
            Return StringStripWS($b[2], 3)
        EndIf ; #AutoIt3Wrapper_Res_Fileversion = 1.2.3.4 ; comment
    Next
    Return SetError(1, 0, "")
EndFunc

it is a more ( probably ) uselessly complicated code, but it takes into account possibilities. In this case, that of having spaces and comments.
So while coding, take into consideration what even not expected, possible.
This trend of thought/coding, makes a more stable product/script. :)

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted

30 minutes after you post, I get a notification from the forum. Sorry for the delay.

Do you mean with your code that the recognition of the wrapper MinVer fails? I took your first suggestion as a basis and developed my own routine to check the MinVer of the wrapper.

If _WinAPI_PathStripPath($_sFilePath) = "AutoIt3Wrapper.au3" Then

        $aChunks = StringSplit(FileRead($_sFilePath, 10240), @CRLF & "=") ; Die ersten 10.240 Zeichen auslesen.

        For $n = 2 To UBound($aChunks) -1

          ; There are beta versions in which "...Res_Fileversion" does not exist.
          ; If "Global Const $VERSION" is given, return VerNum and leave function.
          If StringStripWS($aChunks[$n - 1], $STR_STRIPALL) = "GlobalConst$VERSION" Then _
            Return StringStripWS(StringReplace($aChunks[$n], '"', ''), $STR_STRIPALL)

          ; If "...Res_Fileversion" is given, return VerNum and leave the function.
          If $aChunks[$n - 1] = "#AutoIt3Wrapper_Res_Fileversion" Then Return $aChunks[$n]
        Next
      Else ; Meine eigenen au3 Scripts.

Does VersionsChecker show that all MinVers are correct? Have you ever tried to compile another script? What could be the reason for the error? <_<

 

 

Posted

..I, ... I am not a right to the point kind of person. I tend to ramble in my speech.
I was pointing to a trend in coding. As coded your script, regarding the line:
If $aChunks[$n - 1] = "#AutoIt3Wrapper_Res_Fileversion" Then Return $aChunks[$n]
should have no problem but shows that you code under exact expectations.
I believe that the style of coding can, if that is the way you code everything, lead to unexpected results.
So is more of a point of view in coding style than an error.
 

9 minutes ago, Professor_Bernd said:

What could be the reason for the error?

No clue. I would have to load the code in my head and debug. But is not as easy as in the movies.
I'm dealing with my projects but if you get stuck, like really stuck, then I guess I'll take a go at troubleshooting the code.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Posted (edited)
24 minutes ago, argumentum said:

should have no problem but shows that you code under exact expectations.

I understand. Before your answer can came, (sorry for typo) I already had the same thought and had also changed the second check to that effect. :)

; There are beta versions in which "...Res_Fileversion" does not exist.
          ; If "Global Const $VERSION" is given, return VerNum and leave function.
          If StringStripWS($aChunks[$n - 1], $STR_STRIPALL) = "GlobalConst$VERSION" Then _
            Return StringStripWS(StringReplace($aChunks[$n], '"', ''), $STR_STRIPALL)

          ; If "...Res_Fileversion" is given, return VerNum and leave the function.
          If $aChunks[$n - 1] = "#AutoIt3Wrapper_Res_Fileversion" Then _
            Return StringStripWS(StringReplace($aChunks[$n], '"', ''), $STR_STRIPALL)

 

I'm sorry that checking the MinVer for AutoIt3Wrapper.au3 does not work. I will run some more tests, but if I don't find the error, I will have no choice but to go back to the old state and check the MinVer of SciTE.

In any case, thank you very much for sharing your information and I am very happy that you tested my code! :thumbsup:

Edited by Professor_Bernd
Posted
2 minutes ago, argumentum said:

It does work. Never meant to say that it did not.

My understanding is that the error occurs when the MinVer for AutoIt3Wrapper.au3 is checked, but that the error does not occur when the MinVer for SciTE is checked. Is this wrong?

Posted (edited)

Now I have tested it on my test PC and the error does not occur there. On my test PC AutoIt 3.3.14.5 is installed and only SciTE Lite. In the SciTE folder I have copied the AutoIt3Wrapper folder, the AutoIt3Wrapper.au3 and the Directives.au3.

Do you also have the Directives.au3 in the AutoItWrapper folder?

2080272156_SciTELite1.png.3283e5f3e978242dfa366e79867c3dc5.png

Ok, that was the last question, I don't want to bother you too much. You were a really good "test guy". :) Thanks a lot!

Edited by Professor_Bernd
Edit: Image inserted.
Posted
3 hours ago, argumentum said:
---------------------------
AutoIt3_CompilerRunner: - Error -
---------------------------
The process did not react. An abrupt termination was forced!
"C:\Users\Tester\Downloads\PSPad4AutoIt3 v1.1.0 beta without setup\PSPad4AutoIt3\PSPad4Au3\Au3 scripts\StringSize.au3"
---------------------------
OK
---------------------------

...so I Ctrl - F9, look at it for a few seconds and get the above error.

That is the error.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

  • 1 month later...
Posted (edited)

New version PSPad4AutoIt3 v1.2.0 beta (2020-08-03). Download in Posting # 1 

The highlights of the new features:

Improvement kit

The biggest innovation is the "killer feature" CallTips for OUDFs .

The CallTipViewer has only shown Au3Api functions so far, now CallTips are also implemented for OUDFs!

Au3Api functions are the official AutoIt functions, which are either "built in" or delivered with AutoIt. In short, all functions that can be found in the au3.api or the AutoIt help.

OUDF stands for "own user defined function", which is NOT found in the AutoIt help, but is in an Au3 script that you are currently working with, or which are in the included Au3 scripts. These can be functions that you or someone else wrote, everything that is not in the AutoIt help is displayed in the CallTipViewer as OUDF. Even volatile functions are displayed.

 

Display in the CallTip

A CallTip has two lines. For Au3Api functions, the syntax of the corresponding function is displayed in the first line and a description of this function in the second line. For OUDFs, the first line also shows the syntax of the corresponding function, but the second line shows the path to the Au3 script in which this function is located.

 

Invalid functions

Valid functions and also most invalid functions are displayed in the CallTip. There are only a few criteria with which invalid functions are filtered out and therefore no CallTip is displayed. It is e.g. checked whether there is an associated function foot for a function head and whether there is an opening and an associated closing parenthesis after the function name. But don't worry, the compiler takes care of invalid functions! 8o

 

Monitoring

CallTips for OUDFs are only displayed for saved files! That means, if you are working in a script and e.g. have just written a new function, it will not be displayed in the CallTip until you have saved the script. This is because the files are monitored for changes via folder monitoring. This means that the CallTips are automatically updated when a file is saved, even live* while a CallTip is currently visible. (* Delay by Windows ShellChangeNotify of about 1 second.) Also external changes, thus outside PSPad, are detected. So the CallTips for OUDFs are always up-to-date!

 

Color Scheme "auto"

The Color Scheme of the CallTip is now automatically adapted to the current PSPad skins. If a light skin is selected the CallTip will also be shown with the light color scheme, if a dark skin is selected the CallTip will automatically be shown with a dark color scheme.

88527-calltip-with-color-scheme-light-pn

88528-calltip-with-color-scheme-dark-png

 
The previous features for Au3Api functions also apply to OUDFs.
 
Spoiler

- Call CallTipViewer with Shift + Ctrl + Space if the caret is behind an opening parenthesis of a valid function.

- There are 2 color schemes: 1 light, 1 dark (and "auto").

- Multiline-capability: CallTip is also displayed for function calls over several lines, which logically belong to the FuncName by line continuation characters.

- A hint is shown if there are too many parameters in the function call. "Too many params".

- If a CallTip is displayed and current parameters change, the new current parameter is automatically displayed in red.

- If a CallTip is displayed and the function changes in the current line, the CallTip also changes automatically. (Even with function-in-function.)

 

Credits

Spoiler

This time my thanks go to:

Bitnugger (suggestions, ideas and code snippets) - Your demos and tips were very helpful especially in folder monitoring!: thumbup:

AspirinJunkie (RegExp pattern, ideas and code snippets) - Your tireless work on RegEx patterns, some of which you took from the bottom of your bag of tricks, and your explanations were super helpful!: thumbup:

alpines (suggestions, ideas, testing, develop routines) - Your ideas and suggestions and especially your help with debugging were invaluable!: thumbup:

BugFix - Your explanations were also very useful, especially your confirmation when I wasn't sure if my intended path was going in the right direction.: thumbup:

For all those mentioned, there was a lot more, for which I am grateful. But that would go beyond the scope of this article ;) If I have forgotten someone, please let me know. : saint:

 

And as always: I would be happy if you have a look at the program and write your opinion about it. Praise, criticism, ideas, tips and hints on bugs are welcome. Have fun with the new features! :)

Prof Bernd.

Edited by Professor_Bernd
  • 2 months later...
Posted (edited)

@argumentum @Bilgus

Hello, how are you? Do you want to test a new PSPad4AutoIt3 version?

The new version should now be independent of any SciTE installation and independent of the user's installed AutoIt version.

I can provide you with a trial version that will not be officially released. It is a pure test version, which has no version number and is still incomplete in some areas, e.g. error messages, but functionally the version should be ok. ;)

I would be glad if you test it. Of course, this also applies to all other users. Anyone who is interested in testing this version is welcome to do so.

Download PSPad4AutoIt3 version for tester 2020-10-10.zip

Edited by Professor_Bernd

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
×
×
  • Create New...