Jump to content

Recommended Posts

Posted

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

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

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

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

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!

Posted

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

Posted

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

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