Jump to content

Gather all functions and Vars into main code


Recommended Posts

I've recently been getting hammered by Symantec SEP deleting all of my compiled scripts so I'm trying to figure out how I could run my scripts uncompiled.

Problem is, these scripts are typically launched from inside Citrix sessions that I don't have control of so I can't install AutoIT in there to get all the #Include files that my scripts are using.

I tried to use AU3Stripper and while, yes that did create a single file and I could run it. it put it in a state that I couldn't easily maintain going forward.

 

Is there any existing way to pull all the functions and drop them at the end of the main script?  Not sure about the Globals and Constants though, I guess they would have to go to the top which shoves everything else down.  I also need to maintain the current script spacing and comments as I often have to update older scripts and need the comments to help with that.

Link to comment
Share on other sites

  • Developers

Trying to understand what the issue is using au3stripper for this purpose, could you explain?

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

This subject is realy realy interesting me.... Can i ask you some @BigDaddy0 ?

I mean can you lead me on how to learn to do that ?

 

Cause i wonder how to protect my source from getting stolen by someone... I was wondering about run a script in AU3 with crypt UDF. Just thinking atm but thought it was impossible to run AU3 with includes etc...and without compil....

This is interesting.....:o

Edited by caramen

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

  • Developers
28 minutes ago, BigDaddyO said:

maybe I'm missing some switches or something, but au3stripper removes all the line spacing and comments, packing everything into a really tight file that makes it difficult for me to figure out later.

 

Just use the /MO (MergeOnly)  and run Tidy to reformat it again. You should never maintain the output from au3stripper, just use it to run the script, and maintain the original master.

... but why not compiling the sources as A3X and run it with AutoIt3?

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

Haha nice hit ! @Jos Me too i was like... Wtf why i understand nothing... haha

8 minutes ago, BigDaddyO said:

uuuhhhh...  since when was there an a3x?  I had no idea that even existed...

Feel like better now :P

 

I've got some reading to do for this week thx @Jos :lmao:

My video tutorials : ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

 Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
Tutorials:

ADO - Wiki

 

Link to comment
Share on other sites

  • Developers
10 minutes ago, BigDaddyO said:

since when was there an a3x? 

mm... not that long yet:

Quote

3.2.0 (12th August, 2006) (Release)
AutoIt:
- Changed: #include search algorithm modified.
- Changed: The /c command line option has been replaced by /AutoIt3ExecuteLine.
- Changed: RegEnumKey() and RegEnumVal() return more precise @error to help diagnostic.
- Changed: Return @error, @extended have to be explicit to be return by an UDF.
- Changed: FileFindFirstFile() no longer returns "." or "..".
- Changed: Set _ to be a continuation character ONLY after whitespace.
- Changed: FileClose() with an invalid handle no longer triggers an AutoIt runtime error.
- Changed: Fatal error message is now displayed if DllCall() cannot be executed.
- Changed: The default setting on Au3Info was changed so that it doesn't highlight controls.
- Changed: RegEnumKey and RegEnumVal return more precise @error values to help diagnostics.
- Changed: "OnAutoItExit" function is now called on system shutdown or user logoff.
- Changed: Opt() with just the "option" will now return the current value for that option.
- Changed: DllCall @error is set when function not found.
- Changed: SplashTextOn() opt=32 to center vertically.
- Changed: GUICtrlCreateList() now forces the style $LBS_NOTIFY.
- Changed: GUICtrlCreateIcon() default size is 32x32.

- Added: COM object support.
- Added: Aut2Exe can now created .a3x encoded files (similar to .zip for .au3).

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

  • 2 months later...

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

×
×
  • Create New...