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 post
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 post
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 post
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 post
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 post
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 post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Exit
      Au3toCmd  ---  Avoid false virus positives
      Since many virus scanners sometimes prevent a "compiled autoit EXE" from being executed as "false positive", the "*.A3X" format is a suitable format to avoid this problem.
      In order to simplify this procedure, I wrote the Au3toCmd script. Here a *.Cmd file is generated from a *.Au3 file. The necessary files Autoit3.exe and *.A3x are added to the "*.Cmd" file as "alternate data streams" "Base64" encoded data.
      Now the Autoit Script can be called by clicking on the cmd file and the anti-virus scanners do not recognize the "false positive".
      If the short-term flashing of the CMD window bothers you, you can click the desktop shutcut that runs in a minimized window.
      Unfortunately, because the "alternate data streams", this CMD file cannot be distributed via FTP or email.
      Only a USB sti ck or removable disk formatted with NTFS can be used.
      As the new version now uses Base64 data instead of ADS, this statement is out of date.
      For reasons of compatibility, the old version was sunk into the spoiler here.
       
       
      The script can be called with a file name of an AU3 script as a parameter.
      If no name is entered, a query is made.
      For more information, see the header of the script. 
      Suggestions, improvements and bug reports are welcome.
      Here the version using base64 data
      Version: 2022.05.12  (Support blanks in pathnames)
      Au3toCmd.au3
    • By AutoJohn
      Hi,
      Part of my standard template for a new project is including the lines:
          #AutoIt3Wrapper_Run_Au3Stripper=y ;Run Au3Stripper before compilation (Default=n)
          #Au3Stripper_Parameters=/mo ;     Use the parameters as listed above
      I extensively use bookmarks to jump back and forth between sections of code while debugging and I am experiencing an annoyance that I'm hoping someone could steer me towards a "better" solution.
      The problem is when I go to compile code, all of my bookmarks get deleted.
      I have determined that if I comment out the line    #AutoIt3Wrapper_Run_Au3Stripper then the issue no longer happens and my bookmarks remain.
      Are there some other properties I could be setting somewhere to keep the line in place yet not destroy my bookmarks on every compile?
      Thanks
      SciTE Version 3.7.3     Feb 16 2017 21:41:17
      AutoIT 3.3.14.5
    • By PoojaKrishna
      Hi,
      I am trying to print items from Outlook in a Citrix machine. I am printing the items into PDF files using ‘Microsoft Print to PDF option’. I am using OutlookEX.au3 for printing items.
      Everything is working fine except handling the ‘Save Print Output As’ dialog appearing while trying to print the file to PDF.
      I have set the default printer to ‘Microsoft Print to PDF’ from the control panel ( Control Panel\All Control Panel Items\Devices and Printers) and using the following method to print the item.
      _OL_ItemPrint($oOutlook, $OL_Item) ;print item I am not able to handle the ‘Save Print Output As’ dialog initiated by the print statement in the Citrix machine. The WinActive method always returns false. I have tried with ControlSetText, ControlClick and Send methods also.
      Can anyone please help?
      Func _SavePDF($sFilePath) WinActivate ( "Save Print Output As", "") WinWaitActive ( "Save Print Output As", "",5 ) If WinActive("Save Print Output As") Then sleep(500) Send($sFilePath) sleep(500) Send("{ENTER}") sleep(500) EndIf EndFunc;=>_SavePDF  
    • By MarkIT
      Hi AutoIT masters,
      Good day! Sorry to have bothered this forum but we really need help. We are working on an automation project that is running on VDI server. The BOTS are in .exe are running fine until AV detected them and deleted the files. The files were re-compiled and AV kept on deleting them. The copy of the .exe BOT deleted were sent to Symantec for whitelisting. After whitelisting, it is no longer deleted but no longer working as designed (showing Line script error). We checked the scripts and there were no issues since we run it using SciTE editor and it performed the desired task. Good thing we found on this thread the solution using .a3x and the BOTS worked fine and no longer deleted. Now, the problem is they are asking why the BOTS won't run in .EXE and what is the reason behind Symantec AV deleting them. We raised a case with Symantec but they cannot provide further information as they are always seeing the file as "False Positive". We even tested with Symantec turned off and those .EXE files are working fine, however, after re-enabling, it got deleted.
      Just seeking help on how to better convince them that it is really Symantec causing the issue and the .a3x file.
    • By ajorgensen
      Hi, I am trying to get logged into our Citrix Storefront, we had this working on an older version but it was using "forms" and now it has changed.
      Here is the html for logon page, I need to select the username, password and then click the login button. I have been able to get to this page but do not know how to population these variables. Thanks for any help.
       
      citrix-logon.txt
×
×
  • Create New...