Jump to content
FrancescoDiMuro

[Solved] #pragma compile issue

Recommended Posts

FrancescoDiMuro
Posted (edited)

Good evening everyone :)
I was trying to compile my executable, adding #pragma directives instead of #AutoIt3Wrapper* directives, and, I don't know why the #pragma compile doesn't add the Author field to the executable.

These are the directives:

#pragma compile(Author, 'Surname Name')

; or

#pragma compile(Author, Surname Name)


and this is the output, in both cases:
 

- #pragma directive Author found but don't understand it so will ignore: #pragma compile(Author, 'Surname Name')
- #pragma directive Author found but don't understand it so will ignore: #pragma compile(Author, Surname Name)

What am I missing?
Thanks :)

Francesco

Edited by FrancescoDiMuro

Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites
Jos
2 minutes ago, FrancescoDiMuro said:

What am I missing?

Where did you find that :

#pragma compile(Author,"")

is an option that is available? ... it isn't, just check the helpfile!

Jos

 


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
FrancescoDiMuro
Posted (edited)

Good evening @Jos, and thank you for your answer :)

I swear I read a post in the AutoIt forum, where there were #pragma compile(Author, ***), but I can't find the post at the moment.
So, the only way to add an Author to the compiled script is this(?):

- ://////=__=
; Without "", is it right?
; I don't know what is happenening with Code section!

#AutoIt3Wrapper_Res_Field=Author|AuthorName

Thanks for the help :)


Francesco

Edited by FrancescoDiMuro
The Code section was broken.

Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites
FrancescoDiMuro

@Jos

I tried with #AutoIt3Wrapper_Res_Field=Author|AuthorName, but it isn't displayed with ResourceHacker nor in the Properties of the .exe.
Any suggestions?

Thanks :)

Francesco


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites
FrancescoDiMuro
Posted (edited)

Good morning @Jos:)
This is the line of code that is not doing what is supposed to do:

 

://////=__=

I can't see the Author with Resource Hacker, nor with Right Click on the compiled script, and Properties.
Thanks :)

Francesco

Edited by FrancescoDiMuro

Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites
FrancescoDiMuro

Here you are @Jos:)
 

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /NoStatus /prod /in "C:\Users\Portatile-60\Documents\Documenti Lavoro\AutoIt\Per_iFIX\DR_MoveExcelFiles\DR_MoveExcelFiles.au3"
+>09:41:17 Starting AutoIt3Wrapper v.16.612.1119.0 SciTE v.3.6.6.0   Keyboard:00000410  OS:WIN_10/  CPU:X64 OS:X64  Environment(Language:0410)  CodePage:0  utf8.auto.check:4
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\Portatile-60\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\Portatile-60\AppData\Local\AutoIt v3\SciTE 
> #pragma Compile(out, YourFileName) and/or #pragma Compile(x64, true/false) found: 
-    Ignoring all #AutoIt3Wrapper_OutFile* and #AutoIt3Wrapper_Compile_both #directives!
>Running AU3Check (3.3.14.2)  from:C:\Program Files (x86)\AutoIt3  input:C:\Users\Portatile-60\Documents\Documenti Lavoro\AutoIt\Per_iFIX\DR_MoveExcelFiles\DR_MoveExcelFiles.au3
+>09:41:17 AU3Check ended.rc:0
>Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\aut2exe\aut2exe.exe  /in "C:\Users\Portatile-60\Documents\Documenti Lavoro\AutoIt\Per_iFIX\DR_MoveExcelFiles\DR_MoveExcelFiles.au3" /nopack /icon "..\Logo_STB_SYS_Automation_S.r.l.ico" /comp 2
+>09:41:22 Aut2exe.exe ended.DR_MoveExcelFiles.exe. rc:0
>09:41:22 Performing the Program Resource Update steps:
> #pragma Compile() found that updates the VERSION Resources.
-    Ignoring all #AutoIt3Wrapper_* #directives that would normally update the VERSION section!
>09:41:23 Program Resource updating finished successfully.
+>09:41:23 Created program (pragma):DR_MoveExcelFiles.exe
+>09:41:23 AutoIt3Wrapper Finished.
>Exit code: 0    Time: 6.43

 


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites
FrancescoDiMuro

@Jos

This one? 

-    Ignoring all #AutoIt3Wrapper_* #directives that would normally update the VERSION section!

 


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites
Jos

Correct, The issue (likely) is that you are using #PRAGMA statements to update the VERSION block of the PE-HEADER and then request AutoIt3Wrapper to do the same.
I have it coded in a way that the old VERSION block is overwritten so that would make you loose the #PRAGMA changes made....hence that warning.

Jos 


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
FrancescoDiMuro

@Jos

27 minutes ago, Jos said:

The issue (likely) is that you are using #PRAGMA statements to update the VERSION block of the PE-HEADER and then request AutoIt3Wrapper to do the same.

This is not very clear for me.
Something like "overwrite" the work of the #pragma by AutoIt3Wrapper or... ?

Thanks :)


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites
Jos
Posted (edited)

AUT2EXE runs first and is using the #PRAGMA statements to update the program's PE-HEADER.
One section of the PE_HEADER is the VERSION block as you can see with Reshacker!
AutoIt3Wrapper will then use the #AutoIt3Wrapper_res_* statements to to the same task, but the changes from AUT2EXE would be lost in case it would continue the update of the VERSION block. Hence the warning and skipping that!

In Other Words: DO not mix #PRAGMA and  #AutoIt3Wrapper_res_* statements to update VERSION information but only use one!

Jos 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
FrancescoDiMuro

@Jos

Thanks for the answer. Now, it is more clear :)
So, for who is reading, don't mix #PRAGMA and AutoIt3Wrapper.

Use only #PRAGMA or only AutoIt3Wrapper, but don't use them simultaneousely! :)

Francesco


Click here to see my signature:

Spoiler

Thoughts:

  • I will always thank you for the time you spent for me.
    I'm here to ask, and from your response, I'd like to learn.
    By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

ALWAYS GOOD TO READ:

 

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

  • Similar Content

    • Dreamfire
      By Dreamfire
      Hi,
      Since today, exe's are being flagged as having a trojan by Windows Defender (Fuery.B!cl)
      Version:  3.3.14.3 - SciTE Version 3.7.3



       

    • drapdv
      By drapdv
      So, I have this odd issue happening with UIAWrappers.  When I run simplespy.au3 through SciTE, it finds the object I'm trying to work with, no problem. But, when I compile simplespy.exe, it can't find it.  Another script that utilizes UIAWrappers is experiencing the same phenomenon. EDIT: Compiling as 32-bit or 64-bit does not affect this behavior.
      The trouble starts at the very first object I try to get via _UIA_getObjectByFindAll, so I included the $properties2Match array and the object properties that were returned by _UIA_getPropertyValue for that first object both when running from SciTE and when compiled.
      It always finds the matches for the title and control type properties.  But when compiled, it fails to find the Automation ID property.  Any ideas as to why this would be happening?  Hoping junkew will see this and have an idea.
       
      These are the $properties2Match
      30005|Screen/PVN - ###.###.##.## - CDK Drive|0|False
      30003|50032|0|False
      30011|Portal|0|False
       
      Object properties when running from SciTE:
      <propertymatching>       
              j:1 propID:[30005] expValue:[Screen/PVN - ###.###.##.## - CDK Drive]actualValue:[Screen/PVN - ###.###.##.## - CDK Drive]1
              j:2 propID:[30003] expValue:[50032]actualValue:[50032]1
              j:3 propID:[30011] expValue:[Portal]actualValue:[Portal]1  
      </propertymatching>
       
      Object properties when script is compiled:
      <propertymatching>
              j:1 propID:[30005] expValue:[Screen/PVN - ###.###.##.## - CDK Drive]actualValue:[Screen/PVN - ###.###.##.## - CDK Drive]1
              j:2 propID:[30003] expValue:[50032]actualValue:[50032]1
              j:3 propID:[30011] expValue:[Portal]actualValue:[]0  
      </propertymatching>
       
    • Barrtrek
      By Barrtrek
      I get the "Unable to add resources" error related to AppData\Local\AutoIt v3\Aut2Exe when compiling with a large FileInstall of a 1.5GB file.  Is there a size limit I need to be aware of?  I've also disabled or removed Trend from three different machines and had the same results.  I've had issues like this in the past but have compiled after the Aut2Exe folder was excluded in AV.  That doesn't seem to be the problem this time around.  If I comment out the FileInstall the script compiles successfully.
    • Earthshine
      By Earthshine
      This baby can do almost any language! I found Gleany on this site and set it up on a fresh win10 install. all i would need to do to make it build an exe of the search files app we discovered is the .NET Target Framework download to build 100 % but the exe works and generates! You also need to add the path the the version of csc.exe that you want to run. MSBuild is part of .NET and can read your .csproj file.
      YOU can develop .NET OR C/C++ on this baby!
      Super lightweight (fit for crappy laptops), and you can use any dev compilers you wish, Ming, MS, etc, whatever.
      To use the build, you need to open the csproj file, else, to check your syntax it can compile individual files as well. The warning are because I do not have the .NET 4.6 Targeting Pack installed... LOL, and I could get rid of the Core warning, yes, I did not want to build a .NET Core.dll I wanted a live x64 exe! Told you MSBUILD could handle .CSPROJ, .VBPROJ, and all others Microsoft. Don't let Visual Code or Visual Studio slow you down, although, this works with Visual Code as well but there is only debugging in CORE.DLL projects

      ListFiles Example.zip
       

    • WoodGrain
      By WoodGrain
      Hi All,
      I'm using UseTraySetIcon("shell32.dll", xx) to set my tray icon to a specific icon while running, is there a way I can specify this icon when I compile my script into an exe so my exe icon is the same?
      Thanks!
×