Jump to content

Why can I compile my project on one pc but not another?!


Recommended Posts

Without seeing the code, that would be impossible to answer.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

I have 3.5.4 on my working pc (where the project works no problems)

And 3.7.3 on my laptop (where the same project doesn't work).

 

I'm also noticing that global variables I create in my Main script aren't recognised in my header file function scripts

EG.

Local $EliteWindow = "Elite Enterprise 3.11" ; create a variable to point at different versions of Elite
WinActivate($EliteWindow) ; Focus Elite window

Did they change how the scripts work or something?

Link to comment
Share on other sites

How about not making us guess and post your code that doesn't work so we can SEE what you did wrong?

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Here's one of the header files

 

;/******************************************************************************************************/
;/*TEST2_Add_A_Matter******/
;/******************************************************************************************************/

$TestCount =1


Func Test2_Add_A_Matter($ClientNumber,$MatterNumber)

While 1
   Local $ActiveTitle = WinGetTitle("[ACTIVE]")
   if StringInStr($ActiveTitle, "Not Responding") then
      ;Wait 10 seconds before killing the application
      Sleep(10000)
      if StringInStr($ActiveTitle, "Not Responding") then
         ;restart elite
        ProcessClose("Enterprise.exe")
        Else
         EndIf
      Else

Local $TestResult = False
 WinActivate("Elite Enterprise 3.11")
;/****** Click on Billing Manager/MasterFiles/Matter**/
Navigation_Click_Billing_Manager()
Navigation_Click_BillingManager_MasterFiles()
Navigation_Click_BillingManager_MasterFiles_Matter()

Sleep(10000)
WinWait("[CLASS:SysTreeView32]", "", 10)

Navigation_Click_BillingManager_MasterFiles_Matter_MatterField()
Sleep(10000)
WinWait("[CLASS:SysTreeView32]", "", 10)
Send($ClientNumber)
Sleep(2000)
SEND("{TAB}")
Sleep(2000)
SEND("{TAB}")
Sleep(2000)
SEND($MatterNumber)
Sleep(2000)
SEND("{TAB}")

Local $Success = WinWait("[CLASS:Static2]", "", 10)

Sleep(3000)
    ; Retrieve the text of the Description box on the Matter/General Info 1 page
;Local $NewMatterNumber = ControlGetText($hWnd, "", "ThunderRT6TextBox87")
ControlClick("", "", "[CLASS:ABSDActiveBarDockWND; INSTANCE:1]", "Left", 1, 78, 39)
SEND("^s")
WinWait("[CLASS:Static2]", "", 10)
Sleep(3000)

; Wait for Window that confirms Matter was successfully saved
Local $hWnd = WinWait("Elite Enterprise Matter", "", 10)
;obtain the text in that window which should be "Successfully Saved Matter MATTERNUMBER"
Local $RecordSaveSuccess = ControlGetText($hWnd, "", "Static2")

WinWaitActive("Elite Enterprise Matter")
sleep(500)
ControlClick("Elite Enterprise Matter", "", "[CLASS:Button; INSTANCE:1;]")  ;click ok
Navigation_Click_OK_To_Saved_Matter() ; click ok
WinClose ( "Eliter Enterprise Matter") ; close window

;Check inside the string pulled from the Elite Enterprise Matter window to see if it contains Successfully saved
;If it does : pass test and output to a text file

if StringInStr($RecordSaveSuccess, "Successfully saved") then
   MsgBox($MB_SYSTEMMODAL, "Test" & $TestCount & "  Result", "Test Passed, Matter Saved" & $RecordSaveSuccess, 4)
      FileWrite($hFilehandle, @CRLF & "Test" & $TestCount & " Create a new matter using " & $MatterNumber & "as a model matter  Ensure matter saves     " & $RecordSaveSuccess)
      FileWrite($hFilehandle, @CRLF & "Test" & $TestCount & " Create a new matter using " & $MatterNumber & "as a model matter  Ensure Matter has incremented   Test Passed")

   Else
   MsgBox($MB_SYSTEMMODAL, "Test" + $TestCount & " Result", "Test Failed", 4)
         FileWrite($hFilehandle, @CRLF & "Test" & $TestCount & " Create a new matter using " & $MatterNumber & "as a model matter   Ensure matter saves     Test Failed")
         FileWrite($hFilehandle, @CRLF & "Test" & $TestCount & " Create a new matter using " & $MatterNumber & "as a model matter   Ensure Matter has incremented   Test Failed")

EndIf

Sleep(5000)

WinActivate($EliteWindow)
Navigation_Click_BillingManager_MasterFiles()
Navigation_Click_Billing_Manager()

         EndIf
      ExitLoop
   WEnd

EndFunc

 

 

Edited by CaptainBeardsEyesBeard
Link to comment
Share on other sites

Now here's the Main file (I have about 20 headers in this project)

 

; Test includes
#include "C:\EliteAutomation\Framework\Tests\TEST2_Add_A_Matter.au3"
#include "C:\EliteAutomation\Framework\Tests\Test3_Search_For_A_Matter_And_Verfiy_The_Description_Box.au3"
#include "C:\EliteAutomation\Framework\Tests\Test4_Click_GeneralInfo2_And_Verify_Against_An_existing_Matter.au3"
#include "C:\EliteAutomation\Framework\Tests\Test5_Verify_Billing2_Tab.au3"
#include "C:\EliteAutomation\Framework\Tests\TEST6_Add_Time_To_A_Matter.au3"
#include "C:\EliteAutomation\Framework\Tests\Test7_Add_A_TimeKeeper.au3"
#include "C:\EliteAutomation\Framework\Tests\Test8_Add_A_Client.au3"
#include "C:\EliteAutomation\Framework\Tests\Test9_Create_A_Voucher.au3"
#include "C:\EliteAutomation\Framework\Tests\Finalise_Time_On_A_Matter.au3"

;Navigation Includes
#include "C:\EliteAutomation\Framework\Navigation\Navigation.au3"
#include "C:\EliteAutomation\Framework\Navigation\BillingManager\MasterFiles\Navigation_Client.au3"
#include "C:\EliteAutomation\Framework\Navigation\BillingManager\MasterFiles\Navigation_Timekeeper.au3"
#include "C:\EliteAutomation\Framework\Navigation\Navigation_Accounts_Payable.au3"

;Page functions
#include "C:\EliteAutomation\Framework\PageFunctions\PageFunctions_BillingManagerMaster.au3"

;Handle Elite functions
#include "C:\EliteAutomation\Framework\HandleEliteCrashFunction\StartEliteAsAdmin.au3"

;AutoIT includes
#include <FileConstants.au3>
#include <MsgBoxConstants.au3>
#include <WinAPIFiles.au3>

$TestCount =1
$RandomClientNumber = 45

;/******************************************************/
;/*****************Main Program*************************/
;/******************************************************/



AutoItSetOption('MouseCoordMode', 0)

AutoItSetOption('SendKey', 10)
Sleep(300)


Global $EliteWindow = "Elite Enterprise 3.11" ; create a variable to point at different versions of Elite
WinActivate($EliteWindow) ; Focus Elite window

Global $sFileName = "C:\EliteAutomation\TestResults.txt" ; Open file - deleting any existing content
Global $hFilehandle = FileOpen($sFileName, $FO_OVERWRITE)






;/************ Working Tests ******************/

Test8_Add_A_Client("TestClient5" + Random(100,10000,1) + "", "Bread Test Client", "Redacted", "Redacted", "Redacted", "Redacted", "Redacted", "01/01/2018", "01/01/2025","10", "ZZZ", "Redacted", "Redacted", "Redacted", "Redacted", "04", "N" )
Exit

 

Edited by CaptainBeardsEyesBeard
Link to comment
Share on other sites

And here's the compiler errors

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\EliteAutomation\Framework\TestMain.au3" /UserParams    
+>09:50:38 Starting AutoIt3Wrapper v.17.224.935.0 SciTE v.3.7.3.0   Keyboard:00000809  OS:WIN_10/  CPU:X64 OS:X64  Environment(Language:0809)  CodePage:0  utf8.auto.check:4
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper
>Running AU3Check (3.3.14.5)  from:C:\Program Files (x86)\AutoIt3  input:C:\EliteAutomation\Framework\TestMain.au3
"C:\EliteAutomation\Framework\Tests\TEST2_Add_A_Matter.au3"(74,29) : warning: $hFilehandle: possibly used before declaration.
      FileWrite($hFilehandle,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\EliteAutomation\Framework\Tests\TEST2_Add_A_Matter.au3"(86,25) : warning: $EliteWindow: possibly used before declaration.
WinActivate($EliteWindow)
~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\EliteAutomation\Framework\Tests\Test4_Click_GeneralInfo2_And_Verify_Against_An_existing_Matter.au3"(34,8) : error: syntax error
ElseIf Then
~~~~~~~^
"C:\EliteAutomation\Framework\Tests\TEST6_Add_Time_To_A_Matter.au3"(1,10) : error: can't open include file "C:\EliteAutomation\Navigation\BillingManager\Time\Navigation_BillingManager_Time.au3".
#include "C:\EliteAutomation\Navigation\BillingManager\Time\Navigation_BillingManager_Time.au3"
~~~~~~~~~^
"C:\EliteAutomation\Framework\Tests\TEST6_Add_Time_To_A_Matter.au3"(2,10) : error: can't open include file "C:\EliteAutomation\Navigation\BillingManager\Time\TimeEntryWindow\Navigation_Time_Entry_Window.au3".
#include "C:\EliteAutomation\Navigation\BillingManager\Time\TimeEntryWindow\Navigation_Time_Entry_Window.au3"
~~~~~~~~~^
"C:\EliteAutomation\Framework\Tests\Test7_Add_A_TimeKeeper.au3"(54,20) : warning: $DateBarPassed: possibly used before declaration.
Send($DateBarPassed)
~~~~~~~~~~~~~~~~~~~^
"C:\EliteAutomation\Framework\Tests\Test9_Create_A_Voucher.au3"(13,15) : warning: $VendorID: possibly used before declaration.
Send($VendorID)
~~~~~~~~~~~~~~^
"C:\EliteAutomation\Framework\TestMain.au3"(40,30) : error: AutoItSetOption() called with illegal argument 1: "SendKey".
AutoItSetOption('SendKey', 10)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\EliteAutomation\Framework\Tests\Test7_Add_A_TimeKeeper.au3"(54,20) : error: $DateBarPassed: undeclared global variable.
Send($DateBarPassed)
~~~~~~~~~~~~~~~~~~~^
"C:\EliteAutomation\Framework\Tests\Test9_Create_A_Voucher.au3"(13,15) : error: $VendorID: undeclared global variable.
Send($VendorID)
~~~~~~~~~~~~~~^
"C:\EliteAutomation\Framework\Tests\TEST6_Add_Time_To_A_Matter.au3"(11,39) : error: Navigation_Click_Billing_Manager_Time(): undefined function.
Navigation_Click_Billing_Manager_Time()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\EliteAutomation\Framework\Tests\TEST6_Add_Time_To_A_Matter.au3"(12,49) : error: Navigation_Click_Billing_Manager_Time_TimeEntry(): undefined function.
Navigation_Click_Billing_Manager_Time_TimeEntry()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\EliteAutomation\Framework\Tests\TEST6_Add_Time_To_A_Matter.au3"(43,70) : error: Navigation_Click_Billing_Manager_Time_TimeEntry_Tickbox_For_Timecard(): undefined function.
Navigation_Click_Billing_Manager_Time_TimeEntry_Tickbox_For_Timecard()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\EliteAutomation\Framework\Tests\TEST6_Add_Time_To_A_Matter.au3"(44,65) : error: Navigation_Click_Billing_Manager_Time_TimeEntry_Action_Dropdown(): undefined function.
Navigation_Click_Billing_Manager_Time_TimeEntry_Action_Dropdown()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\EliteAutomation\Framework\Tests\Test7_Add_A_TimeKeeper.au3"(64,77) : error: Navigation_Click_BillingManager_MaterFiles_Timekeeper_AccountingInformation(): undefined function.
Navigation_Click_BillingManager_MaterFiles_Timekeeper_AccountingInformation()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\EliteAutomation\Framework\Tests\Test7_Add_A_TimeKeeper.au3"(66,91) : error: Navigation_Click_BillingManager_MaterFiles_Timekeeper_AccountingInformation_EffectiveDate(): undefined function.
Navigation_Click_BillingManager_MaterFiles_Timekeeper_AccountingInformation_EffectiveDate()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\EliteAutomation\Framework\Tests\Test7_Add_A_TimeKeeper.au3"(71,90) : error: Navigation_Click_BillingManager_MaterFiles_Timekeeper_AccountingInformation_StandardRate(): undefined function.
Navigation_Click_BillingManager_MaterFiles_Timekeeper_AccountingInformation_StandardRate()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\EliteAutomation\Framework\Tests\Test7_Add_A_TimeKeeper.au3"(76,61) : error: Navigation_Click_BillingManager_MaterFiles_Timekeeper_Rates(): undefined function.
Navigation_Click_BillingManager_MaterFiles_Timekeeper_Rates()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\EliteAutomation\Framework\Tests\Finalise_Time_On_A_Matter.au3"(14,62) : error: Navigation_TabAndTickCheckBox_Billing_Manager_Time_TimeEntry(): undefined function.
Navigation_TabAndTickCheckBox_Billing_Manager_Time_TimeEntry()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\EliteAutomation\Framework\Tests\Finalise_Time_On_A_Matter.au3"(70,76) : error: Navigation_Tab_Exit_Timecard_And_Timecard_Adjustment_Group_Finalise_Cancel(): undefined function.
Navigation_Tab_Exit_Timecard_And_Timecard_Adjustment_Group_Finalise_Cancel()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\EliteAutomation\Framework\TestMain.au3 - 16 error(s), 4 warning(s)
!>09:50:39 AU3Check ended. Press F4 to jump to next error.rc:2
+>09:50:39 AutoIt3Wrapper Finished.
>Exit code: 2    Time: 1.106

 

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