Sign in to follow this  
Followers 0
ramonzitoo

How to Compile 2 au3 in 1 exe?

9 posts in this topic

what is the easiest way to do this?

Share this post


Link to post
Share on other sites



Use "#include" to include the 2nd script into the first and then compile the first.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Thanks for the help, but there is another form of two AU3 equipment and turn it into one exe!?

Share this post


Link to post
Share on other sites

Can you please describe what you want to achieve so that "#include" doesn't help?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

I tested the #include, but my frist scrit is a file verification Serial Online ... out instead to check if the serial is right or not, it opens the second script without checking!

Share this post


Link to post
Share on other sites

I tested the #include, but my frist scrit is a file verification Serial Online ... out instead to check if the serial is right or not, it opens the second script without checking!

Of course you must change your second script before including, for example use functions

and from first script call these functions when needed.

You will get more when you post your script(s).

Share this post


Link to post
Share on other sites

How would the following script?

#include "OtherFile.au3"
Global $page = "www.xl.lc/check.php"
; Check for valid code, if not then exit
if validate("12345") = 1 then
   MsgBox(4096, "Message", "Serial Valid, Welcome!")
   Runp()
   EndIf
if validate("BLOCK") = 1 Then
        MsgBox(4096, "Massage", "Product Suspense")
        Exit
    EndIf 
Exit
Func validate($iLicense)
    Local $o_IE
    Dim $html_text
 
    ; Create IE obect
    $o_IE = ObjCreate("Shell.Explorer.2")
    ; Create Validation GUI
    GuiCreate("Licensing", 300, 45,-1, -1)
    ; Create IE object in the GUI
    GUICtrlCreateObj($o_IE, 0, 0, 1, 1)
 
    ; Load Validation URL into object
    $o_IE.navigate2($page & "?ilicense=" & $iLicense)
 
    ; Wait for IE Object to load page
    While $o_IE.Busy
        Sleep(10)
    WEnd
 
    ; Split HTML source return by "~"
    $html_text = StringSplit($o_IE.document.body.innerHTML, "~")
 
    ; Fire notification if stringsplit failed due to page not loading.
    If @error Then
        MsgBox(4096, "Error", "Cannot connect to page!")
        Exit
    EndIf
 
    ; Delete GUI since we are no longer using it.
    GUIDelete()
 
    ; Check for return by PHP page
    If $html_text[2] = "yes" Then
        return 1
    Else
        return 0
    EndIf
EndFunc ; Address of webpage, must be globaled in main script
Func Runp() ;
  Run("OtherFile.au3");
EndFunc

Share this post


Link to post
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
Sign in to follow this  
Followers 0