Jump to content

AutoIt3Wrapper - "run" with stop on error by parameter


Recommended Posts

Perhaps my statements were misleading, especially the use of the word "simultaneously" ?

In his post  Post  @Professor_Bernd describes problems if both editors are open and Ctrl+Break is used. I just wanted to confirm your statement : 

3 hours ago, Jos said:

Don't expect to be able to run a script both in SciTE and pspad at the same time with the same shortcuts as that is expected to give strange results.

I should have written more precisely :
"But as soon as the user has made the decision to work with PsPad instead of SciTE, there is actually no reason to open PsPad AND SciTE at the same time anymore."

1 hour ago, Jos said:

This doesn't currently work with just SciTE either!  

From the Helpfile SetHotKey():  ...

I'm aware of that ;).

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

  • Developers

The Second ran Autoit3Wrapper actually is unable to perform the HotKeySet() and a 0 is returned, so I will reflect that in the next version of Autoit3Wrapper to indicate it did fail and not show those shortcuts for Stop and Restart. :)

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.
  :)

Link to comment
Share on other sites

  • Developers

@Professor_Bernd,

I've played a little with the logic in Autoit3Wrapper for HotKeySet() and now only enable the HotKeys when the Editor that was used to start Autoit3 has the focus in the latest Beta version.
This allows multiple instances of Autoit3Wrapper in case one wants to test 2 scripts at the same time.

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.
  :)

Link to comment
Share on other sites

Hi Jos.

I'm not at home today and should have left already, so just briefly: Please don't switch off the features of Autoit3Wrapper (VERSION = "19.102.1901.11"), because 99% of all functions work. :thumbsup:

In CompilerRunner I don't use a HotKey! That's all Autoit3Wrapper does and it works great! 👍

Only Ctrl+Break doesn't work under certain, very rare circumstances that a user might never see.

- - - -

I'm just seeing your new posting and I'm happy about it! :)

But I have to leave now. I will be back tonight and will answer in detail.

Here the adapted AutoIt3_CompilerRunner.au3. Just replace in "...PSPad\Script\AutoIt helper scripts\"

There is no hotkey set, just a security check with "_IsPressed" (you can search in the script for "_IsPressed" to find my workaround). ;)

Bernd.

Link to comment
Share on other sites

  • Developers
57 minutes ago, Professor_Bernd said:

Please don't switch off the features of Autoit3Wrapper (VERSION = "19.102.1901.11"), because 99% of all functions work

Not sure I understand because I am not switching off anything, just doing some code cleanup and looking at things that are on my "checklist" since a while.
Just finished fixing the _RefreshSystemTray() Function as that was clearly not working anymore since a while and all dead icons were left in the System tray.
 

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.
  :)

Link to comment
Share on other sites

  • Developers

Just uploaded the latest beta version which now has all these changes applied:

- 19.102.1901.8-11 Changes to allow the program to be run by other editors.
    - 19.102.1901.12 Updates Stop and Restartconsole message to indicate in case the HotKeys aren't set in case of second instance
                     HotKeys are ony set when the Editor program has the focus to allow for multiple instances.
    - 19.102.1901.13 Updated _RefreshSystemTray, which wasn't working anymore since a long time
    - 19.102.1901.14 Added WinClose for the Shelled Script to nicely close that process before ultimately killing it when still needed. 
                     This avoids having dead icon in systemtray.

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.
  :)

Link to comment
Share on other sites

@Musashi Many thanks for your posts. :)

@Jos I tested version 19.102.1901.14 and everything works fine. The output lands in the right editor, and the script for the respective editor is terminated. :king: For my work on PSPad4AutoIt3 it is important that I can work with SciTE and PSPad in parallel. That's why I'm happy that it works now.

That was good work! Thanks a lot! :thumbsup:

...

I think PSPad4AutoIt3 is far, far from being a replacement for SciTE4AutoIt3. SciTE has been adapted for AutoIt for years, it has many features for AutoIt and many good people are working on it.

PSPad itself has been around for many years, but it's only been 2 months since I've been working on customizing PSPad for AutoIt. And I am only 1 man. If PSPad ever has half the features of SciTE, I'm happy! ... Until then it's my little project and it's just fun to develop and work with nice people in the forum.

Also Jan Fiala, the developer of PSPad, has already fulfilled some of my feature requestsfor AutoIt3. That's very nice and encouraging to continue.

 

Professor Bernd. :graduated:

 

 

Link to comment
Share on other sites

46 minutes ago, Professor_Bernd said:

Until then it's my little project and it's just fun to develop and work with nice people in the forum.

That's probably the best reason of all. Regardless of what comes out in the end, your horizons have widened :thumbsup:.

This thread also seems to bring some momentum into the general development of SciTE4AutoIt ;). Thanks to @Jos !

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

Hi, Jos.

On Saturday I posted a download of PSPad4AutoIt3 for you in the forum. This was a "light" version to test my CompilerRunner with AutoIt3Wrapper. Unfortunately I mixed 2 versions in a hurry, so CompilerRunner was switched off and the old commands for AutoIt3Wrapper were used (F5 - F7).

Here is a (hopefully) correct version of PSPad4AutoIt3 'light' for Jos 2019-11-18 17.16.zip. You can see that CompilerRunner works by the fact that PSPad is operable even while AutoIt3Wrapper is running. (And you can see the additional icon in the SysTray.) ;)  I tested it with AutoIt3Wrapper and the good result remains: Everything works fine when using SciTE and PSPad in parallel.

Since you installed PSPad in the Windows Programs folder, I have adapted my package. In the "ReadMe" are instructions where to put the files.

I'd be happy if you would test it. :)

Available shortcuts:

F1:            AutoIt-Help
Ctrl+L:        Log-Window show / hide
Shift+Ctrl+L:  Log Window clear

F5:       AutoIt3Wrapper "Run"
Ctrl+F5:  AutoIt3Wrapper "Check"
F7:       AutoIt3Wrapper "Compile"
Ctrl+F7:  AutoIt3Wrapper "Compile Dialog"

 

Bernd.  :graduated:

Link to comment
Share on other sites

  • Developers

I had only loaded the initial one you provided and everything was working fine.  :) 
Merged the changes you have in this latest zip except making it a multiuser setup, so all config remains in the PSPAD directory as it was.
Tried all different options and all is looking goood except one minor issue: F1 opens both Autoit3 and Pspad helpfiles and pspad has Alt+F1 reserved for the language helpfile which is working fine. 

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.
  :)

Link to comment
Share on other sites

Thank you very much for testing!

The following you know for sure, but only to show the details:

In Win 10 in the Applications folder no program has write permission. That's why every write operation is either rejected or redirected, depending on the software.

PSPad writes to INI files, so it can't store its INI files in the Windows programs folder. The standard installation (non-protable) creates a storage folder "C:\Users\<UserName>\AppData\Roaming\PSpad\" and in the Programs folder creates the "PSPad_MU.ini" which instructs PSPad to use its INIs in AppData.

If you turn off the multiuser setting in "PSPad_MU.ini" (MultiUser=0) then PSPad will use the INIs in the Applications folder. This works as long as the settings are read only. As soon as a setting is to be saved, an exception is raised.  Therefore it is better with a standard installation to enable multi-users and save the INIs in AppData.

If you don't want that (and at the moment I prefer that) you can use PSPad portable. Select any folder where you have write access and copy all files and folders from PSPad to it. Before starting PSPad for the first time, set MultiUser=0 in "PSPad_MU.ini".

Now no files outside this folder will be used. For example, I use several PSPad portables next to each other for testing purposes. If you don't necessarily need the standard installation of PSPad, I recommend the portable version. It's easier to use and easier to update.

This is just for explaining the background. I'm happy that everything works and that you tested my CompilerRunner!

Bernd.

Link to comment
Share on other sites

  • Developers

Oh yes..fully aware how it should be, it is just how it was installed already and didn't want to change it, so simply changed the folder access to make it work for testing. ;)

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.
  :)

Link to comment
Share on other sites

14 minutes ago, Professor_Bernd said:

If you don't want that (and at the moment I prefer that) you can use PSPad portable.

I would always prefer to use the portable version. Unwanted side effects with already existing versions of PsPad are thereby excluded.
Even the download page of PsPad itself clearly states :
PSPad does not require installation, it can be simply unpacked into any directory.
[...]
Desktop and Start menu links, as well as system integration can be created later.
[...]
Everything is user controllable. The ZIP distribution does not contain spellcheck dictionaries, but these can freely downloaded and added later.

(BTW : User friendly solved by PsPad)

@Professor_Bernd :

Therefore you can provide a version of PsPad optimized for AutoIt (including modified Ini files), because this cannot harm other installations.

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Link to comment
Share on other sites

Hello, Musashi.

You're right, I also prefer the portable version. Not having any side effects is a nice thing. ;)

Actually, PSPad can be downloaded from developer website as portable version, but it only becomes really portable when the " PSPad_MU.ini" is created and you have set MultiUser=0.
 
That's why I keep saying for the portable version of PSPad4AutoIt3: DO NOT start PSPad before all files from my Improvement Kit have been copied into it!  :graduated:

Link to comment
Share on other sites

  • 2 weeks later...
  • Developers
7 hours ago, Professor_Bernd said:

This makes version checking in my PSPad4AutoIt3 project easier than with the AutoIt3Wrapper.au3 versions.

The SciTE version follows the same pattern as the official SciTE releases.
All other utilities have a generated versionnumber from the Date/Time it was made:

v19.1127.1402.0 _  0 = new release. Next Beta will increment this until next release.
 ++ ==-- ==--
  |  |     |_____ Time : 14:02
     |___________ Date:  -- Day 27
                         == Month 11
                         ++ Year 2019

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.
  :)

Link to comment
Share on other sites

 
 
 
1
1 hour ago, Jos said:

All other utilities have a generated versionnumber from the Date/Time it was made:

v19.1127.1402.0 _  0 = new release. Next Beta will increment this until next release.
 ++ ==-- ==--
  |  |     |_____ Time : 14:02
     |___________ Date:  -- Day 27
                         == Month 11
                         ++ Year 2019

Jos

Is this any type of global standard like ISO or any other similar ?

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:

Spoiler

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

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

  • Developers

This is what I selected a while back so it is easy to see the age of the version people are running, instead of a sequence versionnumber like mostly is used.

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.
  :)

Link to comment
Share on other sites

Hi Jos.

Thanks for the info, that helps a lot.

I thought to myself that block 1 is the year, block 2 is month and day, and in the end a sequential number that is increased with each beta. But I didn't think about the time in block 3. And if a part is missing, it's like an email address missing one sign: it doesn't work. 😁

So thank you very much for solving the riddle.

 

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...