Jump to content

Compiler not Working


Moose_
 Share

Recommended Posts

I have a bunch of scripts that I had written and compiled a long time ago that were working fine at the time. Recently, I made some edits to one script and tried to compile. The file would compile successfully, but the script would not do anything. I then tried recompiling the original script, and the same issue. In fact, any script that I compile will do this. I uninstalled and reinstalled the program several times. One time, this did fix the problem, but then it came back again. One of the scripts is shown below, along with the output when compiling. I don't think the problem is with the script since it was working fine previously. Any help would be greatly appreciated.

 

HotKeySet("{F10}", "mainp")
HotKeySet("{ESC}", "term")

Func mainp()
   $pos = MouseGetPos()
   $pos2 = MouseGetPos()

   Global $xcords[10]
   Global $ycords[10]
  For $k = 0 to 1 Step 1
      $pos2[0] = $pos[0] + $k*430
      For $i = 0 to 4 Step 1
         $pos2[1] = $pos[1] + $i*110
         $xcords[$k*5+$i] = $pos2[0]
         $ycords[$k*5+$i] = $pos2[1]
      Next
   Next
   $j = 0
   While 1
      $j = $j + 1
      If $j > 10 Then
         $j = 1
      EndIF

      For $q = 0 to 1 Step 1
         earth($pos, $j)
         ;$pos2[0] = $pos[0] + 210
         ;$pos2[1] = $pos[1] + 502
         ;MouseMove($pos2[0], $pos2[1])
         ;MouseClick ( "left", $pos2[0], $pos2[1], 1)
         ;Sleep(100)
         ;$pos2[0] = $pos[0] - 57
         ;$pos2[1] = $pos[1] + 436
         ;MouseMove($pos2[0], $pos2[1])
         ;MouseClick ( "left", $pos2[0], $pos2[1], 1)
         ;Sleep(500)
         ;$pos2[0] = $pos[0] + 562
         ;$pos2[1] = $pos[1] + 447
         ;MouseMove($pos2[0], $pos2[1])
         ;MouseClick ( "left", $pos2[0], $pos2[1], 1)
         ;Sleep(2865000)
      Next
   WEnd
 EndFunc

Func term()
   Exit 0
EndFunc

While 1
   ToolTip("Press F10 to start script, ESC to close")
   Sleep(1000)
WEnd

Func earth($p, $t)
   $pos = $p
   $pos2 = MouseGetPos()

   $pos2[0] = $pos[0] - 421
   $pos2[1] = $pos[1] + 152
   MouseMove($pos2[0], $pos2[1])
   MouseClick ( "left", $pos2[0], $pos2[1], 1)
   Sleep(100)
   $pos2[0] = $pos[0] + 370
   $pos2[1] = $pos[1] + 329
   MouseMove($pos2[0], $pos2[1])
   MouseClick ( "left", $pos2[0], $pos2[1], 1)
   Sleep(100)
   $pos2[0] = $pos[0] + 634
   $pos2[1] = $pos[1] - 110
   MouseMove($pos2[0], $pos2[1])
   MouseClick ( "left", $pos2[0], $pos2[1], 1)
   Sleep(100)

   $pos2[0] = $pos[0] + 653
   $pos2[1] = $pos[1] - 150
   MouseMove($pos2[0], $pos2[1])
   For $j = 0 to 2 Step 1
      MouseClick ( "left", $pos2[0], $pos2[1], 1)
      Sleep(100)
   Next

   For $j = $t to 10 Step 1
      $pos2[0] = $xcords[$j-1]
      $pos2[1] = $ycords[$j-1]
      MouseMove($pos2[0], $pos2[1])
      MouseClick ( "left", $pos2[0], $pos2[1], 1)
      Sleep(100)
   Next

EndFunc
>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /ShowGui /prod /in "D:\Users\xxx\Desktop\autoit\adven_cap3.au3"
+>09:46:43 Starting AutoIt3Wrapper v.15.920.938.0 SciTE v.3.6.0.0   Keyboard:00000409  OS:WIN_10/  CPU:X64 OS:X64    Environment(Language:0409)
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\xxx\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\xxx\AppData\Local\AutoIt v3\SciTE 
-> No changes made..
>Running AU3Check (3.3.14.2)  from:C:\Program Files (x86)\AutoIt3  input:D:\Users\xxx\Desktop\autoit\adven_cap3.au3
+>09:46:46 AU3Check ended.rc:0
>Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\aut2exe\aut2exe.exe  /in "D:\Users\xxx\Desktop\autoit\adven_cap3.au3" /out "C:\Users\xxx\AppData\Local\AutoIt v3\Aut2exe\~AU103E.tmp.exe" /nopack /comp 2
+>09:46:48 Aut2exe.exe ended.C:\Users\xxx\AppData\Local\AutoIt v3\Aut2exe\~AU103E.tmp.exe. rc:0
+>09:46:48 Created program:D:\Users\xxx\Desktop\autoit\adven_cap3.exe
+>09:46:49 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 5.785

 

Link to comment
Share on other sites

For which AutoIt version did you compile the scripts "long time ago"?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

 

Link to comment
Share on other sites

22 minutes ago, water said:

For which AutoIt version did you compile the scripts "long time ago"?

I'm not sure the exact versions, but I think I started using AutoIt around August 2013 and updated to the newest versions several times between then and now. I know some of them I had compiled with 3.3.14.1

Link to comment
Share on other sites

Hi,

I am pretty sure that you have had run successfully all your mentioned scripts directly from Scite (F5).

if not, did you debug your code i.e. with tracelines or debug-functions (CTRL-SHIFT-D or ALT-D ) which can be found in EXTRAS-menu in Scite?

Why do you think that the "Compiler is not working"?  The EXE-files were successfully created by the compiler, so the Compiler is working!

Edited by AndyG
Link to comment
Share on other sites

Is there an Anti-Virus software blocking AutoIt scripts?
Do the scripts work when run from SciTE?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

 

Link to comment
Share on other sites

Could you please post your solution for future reference by other users?

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.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 (NEW 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

 

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